Home » SQL & PL/SQL » SQL & PL/SQL » alter session set schema set schema_name
alter session set schema set schema_name [message #350582] Thu, 25 September 2008 08:42 Go to next message
ora1980
Messages: 251
Registered: May 2008
Senior Member
alter session set schema_name = scott;

grant select on scott.emp to rich;

do we need a qualifier if we use alter session set schema_name?
Re: alter session set schema set schema_name [message #350589 is a reply to message #350582] Thu, 25 September 2008 08:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64110
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What happens when you try it?

By the way, the first statement is wrong:
SQL> alter session set schema_name = scott;
alter session set schema_name = scott
                  *
ERROR at line 1:
ORA-02248: invalid option for ALTER SESSION

Regards
Michel

Re: alter session set schema set schema_name [message #351017 is a reply to message #350589] Mon, 29 September 2008 00:23 Go to previous message
manojkb
Messages: 16
Registered: March 2006
Location: Dubai
Junior Member
The statement should be like this:

 alter session set current_schema = scott; 


and you don't require a qualifier to use the other schema's objects.
Previous Topic: Need a Sql Statement for following scenario
Next Topic: whats wrong with this?
Goto Forum:
  


Current Time: Mon Dec 05 11:05:05 CST 2016

Total time taken to generate the page: 0.08843 seconds