ORA-00022: 无效的会话 ID; 访问被拒绝

遇到错误:
ORA-02068: following severe error from BUSISYS.REGRESS.RDBMS.DEV.US.ORACLE.COM
ORA-00022: 无效的会话 ID; 访问被拒绝
 
Error:  ORA 22  
Text:   invalid session id; access denied
-------------------------------------------------------------------------------
Cause:  Either the session specified does not exist, or the caller does not
        have the privilege to access it.
Action: Specify a valid session ID.
        This requires ownership of the session id or the CHANGE_USER privilege.

以上的正常的解释。
下面是可能遇到的不同情况
Distributed Transaction In MTS Using Shared Dblink Fails With Ora-00022 [ID 280247.1]
 

Symptoms

When using shared dblinks to do a distributed transaction from
MTS to MTS the client might see errors of the form

ORA-02050: transaction 840.21.16 rolled back, some remote DBs may be in-doubt
ORA-02068: following severe error from ...
ORA-00022: invalid session ID; access denied

Cause

Shared servers closed down there by closing the dblink

Solution

Set shared_servers = max_shared_servers in the remote instance
 
既然是使用shared database link 那我们就查询下是否有这样的dblink
SQL> select NAME from sys.link$ where AUTHUSR is not null;
 
NAME
--------------------------------------------------------------------------------
BUSISYS.REGRESS.RDBMS.DEV.US.ORACLE.COM
确实存在,我们只需要drop 掉然后建立非shared database link。
关于shared database link 文章
上一篇:openresty 前端开发入门四之Redis篇


下一篇:在linux 安装oracle10g时遇到的问题