前不久开发人员编译存储时报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. Python WSGI v1.0 中文版(转)

    add by zhj: WSGI全称Web Server Gateway Interface,即Web网关接口.其实它并不是OSI七层协议中的协议,它就是一个接口而已,即函数,而WSGI规定了该接口的 ...

  2. Java并发—并发工具类

    在JDK的并发包里提供了几个非常有用的并发工具类.CountDownLatch.CyclicBarrier和Semaphore工具类提供了一种并发流程控制的手段,Exchanger工具类则提供了在线程 ...

  3. ceshi1

    图片素材

  4. MySQL之存储引擎(Day39)

    一 什么是存储引擎 mysql中建立的库=====>文件夹 库中建立的表=====>文件 现实生活中我们用来存储数据的文件应该有不同的类型:比如存文本用txt类型,存表格用excel,存图 ...

  5. python连接mongo

    连接mongodb数据库 用到pymongo模块 应该是这样来使用: , 'goods') 然后连接数据库层这么写 def getSpinfo(item,value,depart,comp): res ...

  6. 请求库之requests

    一 介绍 #介绍:使用requests可以模拟浏览器的请求,比起之前用到的urllib,requests模块的api更加便捷(本质就是封装了urllib3) #注意:requests库发送请求将网页内 ...

  7. ceph存储安装配置

    1.修改yum源: 1.安装yum源:sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://dl.fedor ...

  8. CodeForces - 86D Powerful array (莫队)

    题意:查询的是区间内每个数出现次数的平方×该数值的和. 分析:虽然是道莫队裸体,但是姿势不对就会超时.答案可能爆int,所以要开long long 存答案.一开始的维护操作,我先在res里减掉了a[p ...

  9. day1 python调用模块,密码加密

    import getpass #加密密码 username = input("username:") password = getpass.getpass("passwo ...

  10. iOS 在cell中使用倒计时的处理方法(新)

    一.前言 之前的文章iOS 在cell中使用倒计时的处理方法得到大量的支持, 在这先感谢大家的支持. 但是也收到不少人的回复表示不会用, 需要一一解答, 由于之前写的时候没有使用Markdown编辑, ...