前不久开发人员编译存储时报ORA -02020 错,如下是解决方案步骤.
 
报错全信息:
Error:OR A -04052在查: 找远程对象 NIP.PB_PERADDRESSLIST@DB_NIP 时出错
       ORA-00604 : 递归 SQL 级别 1 出现错误
        ORA-02020 : 过多的数据库链接在使用中
 
查看一下有关link的参数
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
 
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咧.
----------------------
How to view open dblink connections (Doc ID 387848.1)

GOAL

To find out the number of database links opened.

SOLUTION

OPEN_LINKS
Default: 4 Range: 0 to 255
Specifies the maximum number of concurrent open connections to remote databases in one session.
These connections include database links plus external procedures and cartridges each of which uses a separate process.

The following view shows the database link connections that are currently open in your current session:

V$DBLINK - Lists all open database links in your session, that is, all database links with the IN_TRANSACTION column set to YES.

NOTE:  It is important to state that the section above "Lists all open database links in your session" is important, as this is only YOUR open dblinks that can be seen.

For example, you can create and execute the script below to determine which links are open (sample output included):

COL DB_LINK FORMAT A25 
COL OWNER_ID FORMAT 99999 HEADING "OWNID" 
COL LOGGED_ON FORMAT A5 HEADING "LOGON" 
COL HETEROGENEOUS FORMAT A5 HEADING "HETER" 
COL PROTOCOL FORMAT A8 
COL OPEN_CURSORS FORMAT 999 HEADING "OPN_CUR" 
COL IN_TRANSACTION FORMAT A3 HEADING "TXN" 
COL UPDATE_SENT FORMAT A6 HEADING "UPDATE" 
COL COMMIT_POINT_STRENGTH FORMAT 99999 HEADING "C_P_S"

SELECT * FROM V$DBLINK 
/

SQL> @dblink

DB_LINK OWNID LOGON HETER PROTOCOL OPN_CUR TXN UPDATE C_P_S 
------------------------- ------ ----- ----- -------- ------- --- ------ ------ 
INST2.ACME.COM 0 YES YES UNKN 0 YES YES 255 

Note that above displays ONLY details about database links open in the session within which you are working.

If looking for details about database links open by different sessions, might use below:

sqlplus /nolog

connect / as sysdba

select username, osuser, status, sid, serial#, machine,
process, terminal, program from v$session
where saddr in (select k2gtdses from sys.x$k2gte );

USERNAME OSUSER STATUS
------------------------------ ------------------------------ --------
SID SERIAL#
---------- ----------
MACHINE
----------------------------------------------------------------
PROCESS TERMINAL
------------------------ ------------------------------
PROGRAM
------------------------------------------------
SCOTT bugmnt INACTIVE
68 11
celclnx1.us.oracle.com

29318 pts/15
sqlplus@celclnx1.us.oracle.com (TNS V1-V3)

REPADMIN bugmnt INACTIVE
232 5
celclnx1.us.oracle.com

28081 pts/14
sqlplus@celclnx1.us.oracle.com (TNS V1-V3)

SQL>

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

SQL> alter system set open_links=255 scope=spfile;
alter system set open_links=255 scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup

SQL> alter system set open_links=255 scope=both;
alter system set open_links=255 scope=both
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

SQL> alter system set open_links_per_instance=255 scope=spfile;
alter system set open_links_per_instance=255 scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup

SQL> alter system set open_links_per_instance=255 scope=both;
alter system set open_links_per_instance=255 scope=both
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

Oracle DBLink连接数过多的问题(Ora-02020)的更多相关文章

  1. 《oracle每日一练》Oracle DBLink连接数过多的问题(Ora-02020)

    本文转自Oracle DBLink连接数过多的问题(Ora-02020) 今天在处理资料同步问题,需要将其它几个DB Server的资料同步到一个目地资料库,采用的方式是:DBLink+Job ,然而 ...

  2. Oracle连接数过多释放机制

    Oracle连接数过多释放机制  sqlplus /nolog   打开sqlplus          connect /as sysdba    使用具有dba权限得用户登陆oracle      ...

  3. Oracle session连接数和inactive的问题记录

    Oracle session连接数和inactive的问题记录 http://timnity.javaeye.com/blog/280383 从上周起,服务器Oracle数据库出现问题,用不到半天,就 ...

  4. oracle默认连接数150

    当oracle连接数超过最大的150登录不上 sqlplus / as sysdba   ###报错,提示连接数未释放! ---释放网络连接数 ps -ef |grep ora |grep " ...

  5. 修改DB-LINK连接数方法

    原因分析有可能是DB-LINK连接数的限制,请做如下修改验证: 以oracle用户登录数据库节点. 连接数据库. $ sqlplus "/as sysdba"修改DataBase ...

  6. 修改Oracle最大连接数

    1.修改Oracle最大连接数的方法 http://my.oschina.net/shootercn/blog/11193 a.以sysdba身份登陆PL/SQL 或者 Worksheet sqlpl ...

  7. oracle dblink 查询 tns:无法解析指定的连接标识符

    问题情景是这样的:我在数据库服务器(windows server 2008r2 ,64bit)oracle(11gr2,64bit)中通过dblink连接到另外一台服务器(hp-ux)的oracle( ...

  8. Oracle查看及修改Oracle最大连接数

    Oracle查看及修改Oracle最大连接数 .查询oracle的最大连接数: select * from v$parameter where name='processes'; .oracle 11 ...

  9. oracle 错误码查看命令oerr ora及常用错误码总结--不断更新

    oracle 错误码查看命令oerr ora及常用错误码总结--不断更新 1.ORA-00907: 缺失右括号 我自己的问题出在 字段的default 和 not null 顺序反了,defalut ...

随机推荐

  1. 我的Android进阶之旅------>解决:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    错误描述 今天在Android Studio项目中加入了jackson的开发包,编译运行时候,引发了如下的错误: Error:Execution failed for task ':app:trans ...

  2. ZOJ 2770 Burn the Linked Camp 差分约束

    链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do? problemCode=2770 Burn the Linked Camp Time Limi ...

  3. [今日干货]一个吸粉效果也不错的APP

    最近陌陌被封很厉害,今天给大家分享一个吸粉效果也不错的APP——悦跑圈,日吸几百粉没问题~ 1.首先下载APP悦跑圈,用手机号码注册. 2.改写资料和头像,最好用一个女性头像,真实点的,不是网图,增加 ...

  4. Android图片加载框架Picasso最全使用教程2

    前言 前面我们已经介绍了Picasso的基本用法及如何将一张图片加载到ImageView中,下面我们就利用Picasso在ListView中加载图片;Let’s Go! 一个ListView的简单应用 ...

  5. const,var,let区别(转载)

    1.const定义的变量不可以修改,而且必须初始化. const b = 2;//正确 // const b;//错误,必须初始化 console.log('函数外const定义b:' + b);// ...

  6. 关于shared pool的深入探讨(四)

    我们进一步来讨论一下shared pool的处理: 先进行相应查询,获得测试数据: [oracle@jumper udump]$ sqlplus "/ as sysdba" SQL ...

  7. Memcached基础介绍

    1.memcached是什么,有什么作用? )memcached是一个开源的.高性能的内存的缓存软件,从名称上看mem就是内存的意思,而cache就是缓存的意思. )memcached通过在事先规划好 ...

  8. tomcat 启动报错(tomcat org.apache.catalina.core.StandardContext startInternal)

    转载:https://blog.csdn.net/chenlong316048157/article/details/18698611 org.apache.catalina.core.Standar ...

  9. 『NiFi 学习之路』入门 —— 下载、安装与简单使用

    一.概述 "光说不练假把式." 官网上的介绍多少让人迷迷糊糊的,各种高大上的词语仿佛让 NiFi 离我们越来越远. 实践是最好的老师.那就让我们试用一下 NiFi 吧! 二.安装 ...

  10. c++中指针作为函数参数的详细理解

    在C语言中,函数的参数不仅可以是整数.小数.字符等具体的数据,还可以是指向它们的指针.用指针变量作函数参数可以将函数外部的地址传递到函数内部,使得在函数内部可以操作函数外部的数据,并且这些数据不会随着 ...