Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Undocumented feature ALTER SESSION SET CURRENT_SCHEMA = xxx
Jerome,
This is quite interesting because I know that there is a 'BECOME USER' system privilege but I never found a way to make use of it. I wonder if your finding requires this privilege?
I cannot really answer the questions you posed, but it does sound dangerous to depend upon undocumented features in Oracle. Future releases
may perform differently.
In the past, I have used private synonyms to solve the multiple schema issue so that the application code could be written without being schema-specific, even though several similar schemas existed in the same instance. The private synonym for 'object' points to the specific 'schema.object'.
Au revoir.
Jerome Grandjanny wrote:
> Hello folks,
>
> I discovered that the imp utility uses an undocumented feature of
> Oracle. The syntax is :
>
> ALTER SESSION SET CURRENT_SCHEMA = xxx ;
>
> I tested this statement under SQL*Plus and it works fine : it is then
> possible to type :
>
> SELECT * FROM tbl ;
>
> instead of :
>
> SELECT * FROM xxx.tbl ;
>
> This could be very usefull in some of our applications because we
> use the same application against multiple schemas.
>
> What I want to know is :
>
> - Did anyone use this statement ?
> - Does anyone knows if it is supported ?
> - Does anyone knows if it will exist in future releases ?
> - Is it wise to rely on this feature ?
>
> Any advice greatly appreciated.
> Thanks in advance.
> Jerome.
-- ======================================================================= Jerry Apfelbaum Eastern Sun Group Inc. Toronto, Canada ----------------------------------------------------------------------- (Due to proliferation of spammers, remove 'nospam.' from email address.)Received on Sun Dec 14 1997 - 00:00:00 CST