java.sql.SQLException:ORA-24778:无法打开连接
2014-12-10 10:10
831 查看
weblogic日志中报:java.sql.SQLException:ORA-24778:无法打开连接。分析功能是有多次对远程表的操作,先查看关于db_link的参数:
SQL> show parameter open_links
NAME TYPE VALUE
------------------------------------ ----------- -------
open_links integer 4
open_links_per_instance integer 4
修改参数后重启系统:
alter system set open_links=50 scope=spfile;
alter system set open_links_per_instance=255 scope=spfile;
官方文档大致的意思是:
open_links是单个会话打开远程连接的最大数目,包括外部的存储过程,外部的进程(反正就是外部的东西)。默认值是4,最大值是255,当设置为0的时候说明没有分布式事务。
open_links_per_instance是一个实例打开远程连接的最大数目。默认值是4,最大是4294967295,运用于JDBC的XA驱动,而open_links不运用于JDBC的XA驱动。
我认为open_links_per_instance大小设置应该是open_links的几倍,且在刚建立数据库时就应该明确,后期修改重启有点郁闷。
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
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
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
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.
is not applicable to XA applications.
SQL> show parameter open_links
NAME TYPE VALUE
------------------------------------ ----------- -------
open_links integer 4
open_links_per_instance integer 4
修改参数后重启系统:
alter system set open_links=50 scope=spfile;
alter system set open_links_per_instance=255 scope=spfile;
官方文档大致的意思是:
open_links是单个会话打开远程连接的最大数目,包括外部的存储过程,外部的进程(反正就是外部的东西)。默认值是4,最大值是255,当设置为0的时候说明没有分布式事务。
open_links_per_instance是一个实例打开远程连接的最大数目。默认值是4,最大是4294967295,运用于JDBC的XA驱动,而open_links不运用于JDBC的XA驱动。
我认为open_links_per_instance大小设置应该是open_links的几倍,且在刚建立数据库时就应该明确,后期修改重启有点郁闷。
OPEN_LINKS
Property | Description |
---|---|
Parameter type | Integer |
Default value | 4 |
Modifiable | No |
Range of values | 0 to 255 |
OPEN_LINKSspecifies 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 LINKstatement.
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_LINKSis 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_LINKSto
0, then no distributed transactions are allowed.
OPEN_LINKS_PER_INSTANCE
Property | Description |
---|---|
Parameter type | Integer |
Default value | 4 |
Modifiable | No |
Range of values | 0 to 4294967295 (4 GB -1) |
Real Application Clusters | Multiple instances can have different values. |
OPEN_LINKS_PER_INSTANCEspecifies 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_INSTANCEis different from
OPEN_LINKS, which indicates the number of connections from a session. The
OPEN_LINKSparameter
is not applicable to XA applications.
相关文章推荐
- Cause: java.sql.SQLException: ORA-02018: 同名的数据库链接具有打开的连接
- Cause: java.sql.SQLException: ORA-02018: 同名的数据库链接具有打开的连接
- 安装 Oracle 10G 的 OWB java.sql.SQLException: ORA-22905: 无法从非嵌套表项访问行
- 【JAVA】PL/SQL连接:ORA-12154:TNS:无法解析指定的连接标识符
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数
- javax.transaction.xa.XAException: java.sql.SQLException: 无法创建 XA 控制连接。(SQL 2000,SQL2005,SQL2008)
- 【MySQL】连接MySQL时,字符无法识别(java.sql.SQLException: Unknown character set index for field '224' received )
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数
- Java 连接Oracle 报错: java.sql.SQLException: ORA-28040: No matching authentication protocol
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数
- java.sql.SQLException: ORA-22905: 无法从非嵌套表项访问行,问题及解决
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数
- javax.transaction.xa.XAException: java.sql.SQLException: 无法创建 XA 控制连接。(SQL 2000,SQL2005,SQL2008)
- javax.transaction.xa.XAException: java.sql.SQLException: 无法创建 XA 控制连接。(SQL 2000,SQL2005,SQL2008)
- javax.transaction.xa.XAException: java.sql.SQLException: 无法创建 XA 控制连接。错误: 未能找到存储过程 'master..xp_sqljdbc_xa_init'
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数 解决方法
- Oracle ORA-3137[12333] 关闭的连接 java.sql.SQLRecoverableException: 无法从套接字读取更多的数据 _optim_peek_user_binds
- java.sql.SQLException: ORA-01400: 无法将 NULL 插入 ("LVJIAN"."T_ITEMS"."ITEM_NAME")
- java.sql.SQLException: ORA-01000: 超出打开游标的最大数