| DBMS_SQL usages [message #578187] |
Mon, 25 February 2013 08:53  |
manubatham20
Messages: 307 Registered: September 2010 Location: Noida, India
|
Senior Member |

|
|
Hi,
This is the first time I came across through DBMS_SQL.
I have a scenario which is:
1. User A have a table "test_tbl".
2. Another user B, that has the select priviledge on "test_tbl" of A user.
I just want to execute query from user B without giving schema prefix
From User B, can I set the schema for table A, in DBMS_SQL while executing the query?
So the query should be look like-
Thanks,
Manu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: DBMS_SQL usages [message #578204 is a reply to message #578202] |
Mon, 25 February 2013 10:14   |
 |
Michel Cadot
Messages: 54246 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Quote:Does oracle reads the contents inside "execute immediate" on compile time???
No.
Quote:And now it validates the bonus table inside Scott schema.
In my example, it does it at execution time. ("it" is dbms_sql.parse function)
Regards
Michel
[Updated on: Mon, 25 February 2013 10:15] Report message to a moderator
|
|
|
|
| Re: DBMS_SQL usages [message #578207 is a reply to message #578204] |
Mon, 25 February 2013 10:57   |
cookiemonster
Messages: 9169 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
If you want to do this without dynamic sql then your only choices are:
1) add the schema prefix in the code
2) use synonyms
|
|
|
|
|
|