Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: oracle7 procedure question(DDL in a procedure how?)
Yes, but bear in mind that when using DBMS_SQL, roles are not active so if
you have been granted privs to create indexes to your schema via a role, it
will not work in within dbms_sql. The create any index has to be explicitly
granted to you in order for it to work
M
Noah Arliss wrote in message ...
>will this work with creating indexes as well?
>
>Noah
>Jonathan Lewis wrote in message
><930772554.15974.0.nnrp-06.9e984b29_at_news.demon.co.uk>...
>>The commonest way is to use package dbms_sql
>>(see my web page for a couple of examples).
>>
>>There is also a 'dbms_utility.exec_ddl_statement()'
>>facility.
>>
>>You will need execute privileges on these packages,
>>which are owned by sys.
>>
>>--
>>
>>Jonathan Lewis
>>Yet another Oracle-related web site: www.jlcomp.demon.co.uk
>>
>>Noah Arliss wrote in message ...
>>>How can I embed DDL into a procedure.. I have written a function to test
>>>whether a table exists in a database that returns a boolean, after
testing
>>>this boolean value in a procedure I would like to create an index on that
>>>table.. SQL+ however does not like seeing the CREATE call within the
>>>procedure.. does anyone know how to embed DDL into a procedure?
>>>
>>>
>>
>>
>
>
Received on Fri Jul 02 1999 - 03:24:15 CDT
![]() |
![]() |