Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-02421: missing or invalid schema authorization identifier

user3636719Aug 15 2011 — edited Aug 15 2011
Hello Evryone,

I am having a problem with schema user session. I am not able to change the schema even it exists.
SQL>ALTER session SET CURRENT_SCHEMA='QA'
Error report:
SQL Error: ORA-02421: missing or invalid schema authorization identifier
02421. 00000 -  "missing or invalid schema authorization identifier"
*Cause:    the schema name is missing or is incorrect in an authorization
           clause of a create schema statement.
*Action:   If the name is present, it must be the same as the current
           schema.


SQL>select username, account_status from DBA_USERS where username='QA';

USERNAME                       ACCOUNT_STATUS                   
------------------------------ -------------------------------- 
QA                                        OPEN                             

SQL>SHOW user

USER is SYSTEM

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for HPUX: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
This post has been answered by mseberg on Aug 15 2011
Jump to Answer

Comments

mseberg
Try

ALTER SESSION SET CURRENT_SCHEMA=QA



There's also an Oracle note on this :

ALTER SESSION returns ORA-02421 missing or invalid schema authorization identifier. [ID 848248.1]

Best Regards

mseberg
user3636719
Where can I find the note?
mseberg
Answer
Try it without the single quotes.

Best Regards

mseberg


Test on mine :

Release 11.2.0.1.0 - 64bit Productio

I get the same error with quotes

ERROR at line 1:
ORA-02421: missing or invalid schema authorization identifier

Edited by: mseberg on Aug 15, 2011 2:50 PM

So this and then the verify
ALTER SESSION SET CURRENT_SCHEMA=QA
You can verify using this :
select sys_context('USERENV','SESSION_SCHEMA') from dual;
Edited by: mseberg on Aug 15, 2011 3:08 PM
Marked as Answer by user3636719 · Sep 27 2020
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 12 2011
Added on Aug 15 2011
3 comments
30,416 views