1.1  OPEN_LINKS

Property

Description

Parameter type

Integer

Default value

4

Modifiable

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.

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 time

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.

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

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.

二.  查看并修改

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;

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

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

修改时报错:ORA-32001: 已请求写入 SPFILE, 但是没有正在使用的 SPFILE

显示spfile是未启动状态

首先确定数据库是以spfile启动的还是pfile启动

用show parameter spfile 查看如果values对应有值,表示是spfile启动的。否则就是pfile启动的。

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string     
值为空,表示数据库以pfile启动

要动态修改一定要用spfile启动。如果现在是用pfile启动,可以这样切换成spfile启动:

sqlplus "/ as sysdba"连接数据库

create spfile from pfile;

最新文章

  1. 日志管理log4js的配置
  2. 高阶c++
  3. ASDM through site to site VPN
  4. xml存储bug
  5. Print Common Nodes in Two Binary Search Trees
  6. 如何解决SWAT模型数据移动目录后出现的“SWAT2005.mdb database specified in your MasterProgress table does not exists. Please correct and try again”的问题
  7. javascript为目标位置div等设置高度
  8. ms08-067
  9. jQuery实现拖动布局并将排序结果保存到数据库
  10. hosts etc css-js
  11. 集成JPA+springmvc+spring+EJB中的Java EE应用
  12. 指令汇B新闻客户端开发(二) 主页面布局
  13. too many open files linux服务器 golang java
  14. linux搭建FastDFS文件服务器
  15. 第三节,使用OpenCV 3处理图像(模糊滤波、边缘检测)
  16. 『TensorFlow』读书笔记_Inception_V3_下
  17. Angular 添加路由
  18. android addJavascriptInterface 不能生效 解决办法
  19. [转帖]高通推出八核笔电处理器骁龙8cx 能超英特尔吗?
  20. LoadRunner--Analysis各项指标详解

热门文章

  1. Windows下免安装版mysql5.7的初始密码
  2. codeblocks设置背景主题
  3. Laravel-admin 七牛云上传文件到七牛云出现卡顿失败情况
  4. pip: unsupported locale setting
  5. sshpass笔记
  6. ACM KMP 格式输入导致TLE
  7. Java9相关资料(JShell简易教程等)
  8. IntelliJ IDEA下Git的配置与使用(命令行下)
  9. Bootstrap3 代码-程序输出
  10. nginx时间设置解析函数