ORA-02020

报错全信息:

Error:OR A -04052在查: 找远程对象 NIP.PB_PERADDRESSLIST@DB_NIP 时出错

ORA-00604 : 递归 SQL 级别 1 出现错误

ORA-02020 : 过多的数据库链接在使用中

开发人员编写存储过程中使用了大量的DBlink,产生以上报错。

网上找到与此参数有关:open_links

  SQL>show parameter open_links;

NAME                                TYPE        VALUE

------------------------------------ ----------- ------------------------------

open_links                          integer    4

open_links_per_instance              integer    4

SQL>

参数的解释:

***open_links :每个session最多允许的dblink数量;

***open_links_per_instance:指每个实例最多允许的dblink个数

扩大允许使用dblink 量;

SQL> alter system set open_links=50 scope=spfile;

System altered                                                                          

SQL> alter system set open_links_per_instance=50 scope=spfile;

System altered                              -----------------------------DB 使用pfile开启,既无法修改此参数,现场創建spfile重啟DB

SQL> show parameter open_links

NAME                                TYPE        VALUE

------------------------------------ ----------- ------------------------------

open_links                                                  integer    4

open_links_per_instance              integer    4

SQL> 

重启后生效...

SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
Oracle 例程已经关闭。
SQL> 

SQL> startup
ORACLE 例程已经启动。

Total System Global Area  293601280 bytes
Fixed Size                  1248600 bytes
Variable Size              96469672 bytes
Database Buffers          188743680 bytes
Redo Buffers                7139328 bytes
数据库装载完毕。
数据库已经打开。
SQL> 

参数检查:

SQL>  show parameter open_links

NAME                                TYPE        VALUE

------------------------------------ ----------- ------------------------------

open_links                          integer    50

open_links_per_instance              integer    50

SQL>

再编译就OK了。

posted @ 2017-02-14 13:41  枯夜留心  阅读(803)  评论(0编辑  收藏  举报