Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Changing the default schema for a session
Somewhere among the many Oracle reference books I ran across an
undocumented command that allows a user session to change the default
session schema.
Scenario...user1 establishes a connection via SQLPLUS
to select from table1 owned by user1 the command is
select * from table1 or select * from user1.table (not necessary to specify schema is this case) in order for user1 to select from table2 owned by user2 the command is select * from user2.table2 (assuming no synonym and granted privileges) There is a command that user1 can issue that is something like Alter session set schemaname = user2Now, even though connected as user1, the session uses user2 as the default schema and user1 can now issue the command as
select * from table2
Is anyone familiar with this particular command, and do you know the correct syntax? Received on Thu Apr 17 1997 - 00:00:00 CDT