oracle dblink性能,Oracle DBLink连接数过多的问题(Ora-02020)

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>

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值