1、open_links含义open_links_per_instance specifies the maximum number of migratable open connections globally for each d
1、open_links含义
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.
可能出现的错误:
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、查看open_links
connected to oracle database 11g enterprise edition release 11.2.0.1.0
connected as sys
sql> show parameters open_links;
name type value
------------------------------------ ----------- ------------------------------
open_links integer 4
open_links_per_instance integer 4
3、修改open_links
alter system set open_links=255 scope=spfile;
alter system set open_links_per_instance=255 scope=spfile;
4、使修改后的open_links生效
修改后查看,发现值没有变化。
sql> show parameters open_links;
name type value
------------------------------------ ----------- ------------------------------
open_links integer 4
open_links_per_instance integer 4
sql> alter system set open_links=255 scope=spfile;
system altered
sql> alter system set open_links_per_instance=255 scope=spfile;
system altered
sql>
sql> show parameters open_links;
name type value
------------------------------------ ----------- ------------------------------
open_links integer 4
open_links_per_instance integer 4
sql>
重启一下数据库查看,值修改过来了:
[oracle@eds2db ~]$ dbshut
oracle_home_listner is not set, unable to auto-stop oracle net listener
usage: /u01/app/oracle/db/bin/dbshut oracle_home
processing database instance wg97: log file /u01/app/oracle/db/shutdown.log
[oracle@eds2db ~]$ dbstart
oracle_home_listner is not set, unable to auto-start oracle net listener
usage: /u01/app/oracle/db/bin/dbstart oracle_home
processing database instance wg97: log file /u01/app/oracle/db/startup.log
[oracle@eds2db ~]$
sql> show parameters open_links;
name type value
------------------------------------ ----------- ------------------------------
open_links integer 255
open_links_per_instance integer 255
,
