HI,
Using V8.0 and 9.0 of PL/SQL Developer against Oracle SE1 (11.1), we run scripts in a command window to create/replace packages. We do this for different schemas in the DB. We login as USER_A but set our current schema to USER_B, USER_C, etc ...
The "alter session set current_schema" command works for the compilation of the unqualified package name.
But the check for errors defaults to my current user NOT the current schema. It seems Command Window partially supports "set current_schema". Any way to make this work? Am I missing a config setting for this consistent behavior?
This does work consistently in SQL*Plus command line and Oracle SQL Developer. Any unqualified object reference uses the CURRENT_SCHEMA value not the default user value.
Example of output run in PL/SQL Developer:
select sys_context('userenv', 'current_schema') from dual;
USER_A
show user
User is "user_a"
ALTER SESSION SET CURRENT_SCHEMA=USER_B
show user
User is "user_a"
select sys_context('userenv', 'current_schema') from dual;
USER_B
.
.. Packages ..
.
PACKAGE PKG_DOTTN
Package created
Errors for PACKAGE USER_A.PKG_DOTTN:
Using V8.0 and 9.0 of PL/SQL Developer against Oracle SE1 (11.1), we run scripts in a command window to create/replace packages. We do this for different schemas in the DB. We login as USER_A but set our current schema to USER_B, USER_C, etc ...
The "alter session set current_schema" command works for the compilation of the unqualified package name.
But the check for errors defaults to my current user NOT the current schema. It seems Command Window partially supports "set current_schema". Any way to make this work? Am I missing a config setting for this consistent behavior?
This does work consistently in SQL*Plus command line and Oracle SQL Developer. Any unqualified object reference uses the CURRENT_SCHEMA value not the default user value.
Example of output run in PL/SQL Developer:
select sys_context('userenv', 'current_schema') from dual;
USER_A
show user
User is "user_a"
ALTER SESSION SET CURRENT_SCHEMA=USER_B
show user
User is "user_a"
select sys_context('userenv', 'current_schema') from dual;
USER_B
.
.. Packages ..
.
PACKAGE PKG_DOTTN
Package created
Errors for PACKAGE USER_A.PKG_DOTTN: