|
-
Does one need to grant SELECT on a table referenced in dynamic SQL in a stored proc. in a package? I'm using a standard "definers' rights" type of package in Oracle 8.1.6. I dynamically build a SELECT statement an execute it with an
OPEN cursor FOR sql_string;
sql_string is my dynamically-built SQL command. I'm returning this to ADO in a VB 6 app., using an OLE-DB connect string that specifies the MS OLE-DB provider for Oracle. I grant EXECUTE on the package to scott, connect with scott, and execute the stored proc. in the package. I get an error saying table or view not found. If I grant SELECT on the table to scott, he can execute it without errors. I've also tested this using a role, where I grant EXECUTE on the package to the role, and grant the role to scott - same error! My conclusion is that tables in dynamic SQL must be granted explicitly to all users/ roles using them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|