than ORA-24777: not allowed to use non-portable database links more depressing things

Source: Internet
Author: User
Tags dedicated server

There is a sync function error on the scene, the contents are as follows:java.sql.BatchUpdateException: ORA-24777: Non-portable database link not allowed At Oracle.jdbc.driver.OraclePreparedStatement.executeBatch (oraclepreparedstatement.java:10317)At Oracle.jdbc.driver.OracleStatementWrapper.executeBatch (oraclestatementwrapper.java:216)At Weblogic.jdbc.wrapper.PreparedStatement.executeBatch (preparedstatement.java:210)
1. Understand the function, as follows:There is a, B two database, a database built a dblink, under the XA JDBC driver, through the Dblink this error occurs.
2. This error is somewhat uncommon, directly check metalink see Appendix. Two solutions to choose from: A. Configure the database to allow the use of the shared servers

ALTER SYSTEM SET dispatchers= "(protocol=tcp)" Scope=both;

ALTER SYSTEM SET shared_servers = Scope=both;

B. Define the database link being utilised as a shared database link CREATE SHARED DATABASE LINK dblink_name [CONNECT to username identified by password]|    [CONNECT to Current_User] Authenticated by schema_name identified by password [USING ' service_name '];
3. On-Site adjustmentThe first use of a scheme in the B database adjustment, with the B program in a database has been adjusted, test not. Then use a scheme to adjust on a database, test or not.
4. Find the problem at the scenefound synonyms is wrong, is not used to this shared Dblink, 艹, this is too depressing, adjusted for a long, no use.   I think the conclusion is: as long as the dblink in a library is changed to a shared way. Using Database Links in Oracle XA applications

Oracle XA applications can access other Oracle database instances through database links with these restrictions:

  • They must use the shared server configuration.

    the Transaction processing monitors (TPMS) use GKFX servers to open the connection-an Oracle Database A. Then the operating system network connection required for the database link was opened by the dispatcher instead of a D edicated server process. This allows different services or threads-operate on the transaction.

    If This restriction isn't satisfied, then when you use the database links within an XA transaction, it creates an operating s Ystem Network connection between the dedicated server process and the other Oracle Database B. Because This network connection cannot is moved from the one dedicated server process to another, you cannot detach from this Dedicated server process of database A. Then, you access the database B through a database link and you receive an ORA-24777 error.

  • The other database being accessed must is another Oracle database.

if These restrictions is satisfied, Oracle Database allows such links and propagates the transaction Protocol (prepare, rollback, and commit) to the other Oracle Database instances.

If using the shared server configuration is not possible and then access the remote database through the pro*c/c++ applicatio n by using EXEC SQL AT syntax.

Theinit.oraParameterOPEN_LINKS_PER_INSTANCESpecifies the number of open database link connections that can be migrated. ThesedblinkConnections is used by XA transactions So, the connections is cached after a transaction is committed. Another transaction can use the database link connection if the user who created the connection also created the Transacti On. This parameter was different from theinit.oraParameterOPEN_LINKS, which specifies the maximum number of concurrent open connections (including database links) to remote databases in one Session. TheOPEN_LINKSParameter does not apply to XA applications.


ORA-24777 reported when using a database link from within an XA coordinated transaction (document ID 1506756.1) Go to bottom

In this Document

Symptoms
Cause
Solution

This document was being delivered to your via Oracle support ' s Rapid Visibility (RaV) process and therefore have not been sub Ject to an independent technical review.
Applies to:oracle server-enterprise edition-version 10.2.0.5 to 11.2.0.3 [Release 10.2 to 11.2]
Information in this document applies to any platform.
Symptoms

ORA-24777 reported by a JDBC/XA application when utilising a database link between the Oracle databases.

Cause

An ORA-24777 was a warning that's trying to utilise a database link within an XA coordinated transaction and the Conn Ection to the source database which are trying to use the database link have been made through a dedicated server connection .

This isn't allowed and this is documented in following entry

As per http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/adfns_xa.htm#ADFNS809

In the following sections ' Using Database Links in Oracle XA applications '.

Solution

The options

1. Configure the database to allow the use of a shared servers and then let the application use these as per the following D Ocumentation

http://docs.oracle.com/cd/E11882_01/server.112/e25494/manproc003.htm#ADMIN00502

or establish whether the Java application needs to start an XA transaction.

OR

2. Define the database link being utilised as a shared database link, i.e,

CREATE SHARED DATABASE LINK .

As per

http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_5005.htm#SQLRF01205


than ORA-24777: not allowed to use non-portable database links more depressing things

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.