签到成功

知道了

CNDBA社区CNDBA社区

open_links_per_instance 和 open_links 参数说明

2016-11-25 15:59 2530 0 原创 Oracle 11g
作者: dave

 

.  先看官网的说明

1.1  OPEN_LINKS

Property

Description

Parameter typehttp://www.cndba.cn/cndba/dave/article/1431

Integer

Default value

4

Modifiable

http://www.cndba.cn/cndba/dave/article/1431

No --即修改需要重启实例

Range of values

0 to 255

 

       OPEN_LINKS specifies the maximum number of concurrent open connections to remote databases in one session. These connections include database links, as well as external procedures and cartridges, each of which uses a separate process.

 http://www.cndba.cn/cndba/dave/article/1431

Oracle counts one open link for the following:

       For each user that references a public or private database link

       For each external procedure or cartridge connection when it is executed for the first timehttp://www.cndba.cn/cndba/dave/article/1431

 http://www.cndba.cn/cndba/dave/article/1431

Both types of connections close when the session ends. You can also close a database link connection explicitly by issuing an ALTER SESSION CLOSE DATABASE LINK statement.

       You should set this parameter to allow for the external procedure and cartridge connections expected during the session plus the number of databases referred to in typical distributed transactions (that is, a single SQL statement that references multiple databases), so that all the databases can be open to execute the statement.

       For example, if queries alternately access databases A, B, and C, and OPEN_LINKS is set to 2, time will be lost waiting while one connection is broken and another made. Increase the value if many different databases are accessed over time.

       This parameter refers only to connections used for distributed transactions. Direct connections to a remote database specified as an application connects are not counted.http://www.cndba.cn/cndba/dave/article/1431

If you set OPEN_LINKS to 0, then no distributed transactions are allowed.

 http://www.cndba.cn/cndba/dave/article/1431

 

1.2  OPEN_LINKS_PER_INSTANCE

Property

Description

Parameter type

Integer

Default value

4

Modifiable

No

Range of values

0 to 4294967295 (4 GB -1)

Oracle RAC

Multiple instances can have different values.

 

       OPEN_LINKS_PER_INSTANCE specifies the maximum number of migratable open connections globally for each database instance. XA transactions use migratable open connections so that the connections are cached after a transaction is committed. Another transaction can use the connection, provided the user who created the connection is the same as the user who owns the transaction.

       OPEN_LINKS_PER_INSTANCE is different from OPEN_LINKS, which indicates the number of connections from a session. The OPEN_LINKS parameter is not applicable to XA applications.

 

 

.  查看并修改

 

http://www.cndba.cn/cndba/dave/article/1431

2.1 查看

SQL> show parameter open

NAME                                 TYPE        VALUE

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

open_cursors                         integer     300

open_links                           integer     4

open_links_per_instance              integer     4

read_only_open_delayed               boolean     FALSE

session_max_open_files               integer     10

 

2.2 与这个参数有关的错误是ORA-02020

 

ORA-02020: too many database links in use

Cause: The current session has exceeded the INIT.ORA open_links maximum.

Action: Increase the open_links limit, or free up some open links by committing or rolling back the transaction and canceling open cursors that reference remote databases.

 

2.3 修改该参数

之前说过, 修改这个参数需要重启实例。可以只修改spfile里的值。 如:

 

SQL> alter system set open_links=10;

http://www.cndba.cn/cndba/dave/article/1431

alter system set open_links=10

                 *

1 行出现错误:

ORA-02095: 无法修改指定的初始化参数

 

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

系统已更改。

 

在次查看:

SQL> show parameter open_links

 

NAME                                 TYPE        VALUE

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

open_links                           integer     4

open_links_per_instance              integer     4

 

修改没有生效,还是需要重启实例的。

 

 http://www.cndba.cn/cndba/dave/article/1431

 

 

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

Blog http://blog.csdn.net/tianlesoftware

网上资源: http://tianlesoftware.download.csdn.net

相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(); DBA2 群:62697977()

DBA3 群:62697850   DBA 超级群:63306533;    

聊天 群:40132017

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

版权声明:本文为博主原创文章,未经博主允许不得转载。

oracle 11g

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2235
    原创
  • 2
    翻译
  • 535
    转载
  • 185
    评论
  • 访问:6517649次
  • 积分:4223
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ