More depressing than ORA-24777: do not allow the use of unportable database links, ora-24777 links

Source: Internet
Author: User
Tags dedicated server

More depressing than ORA-24777: do not allow the use of unportable database links, ora-24777 links
An error is reported when the synchronization function is on site. The content is as follows: java. SQL. BatchUpdateException:ORA-24777: do not allow use of portable database linksAt oracle.jdbc.driver.OraclePreparedStatement.exe cuteBatch (OraclePreparedStatement. java: 10317) at least cuteBatch (OracleStatementWrapper. java: 216) at least cuteBatch (PreparedStatement. java: 210)
1. I learned about the functions as follows:There are two databases A and B, and A dblink is built on database A. This error occurs through dblink under the JDBC drive of XA.
2. This error is a bit uncommon. Check metalink directly in the appendix. Two solutions are available:A. Configure the database to allow the use of shared servers

Alter system set dispatchers = "(PROTOCOL = TCP)" scope = both;

Alter system set SHARED_SERVERS = 10 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 adjustmentUse solution a to adjust database B, and use solution B to adjust database A. The test fails. The a solution is used to adjust database A, and the test still fails.
4. Locate problems on siteIf the synonym is found to be incorrect, the shared dblink and metadata are not used. This is so depressing that it has not been used for a long time. I think the conclusion is that you only need to change the dblink in database A to shared. 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 shared servers to open the connection to an Oracle Database. then the operating system network connection required for the database link is opened by the dispatcher instead of a dedicated server process. this allows different services or threads to operate on the transaction.

    If this restriction is not satisfied, then when you use database links within an XA transaction, it creates an operating system network connection between the dedicated server process and the other Oracle Database B. because this network connection cannot be moved from one dedicated server process to another, you cannot detach from this dedicated server process of database. then when you access the database B through a database link, you receive an ORA-24777 error.

  • The other database being accessed must be another Oracle Database.

If these restrictions are 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, then access the remote database through the Pro * C/C ++ application by usingEXECSQL ATSyntax.

Theinit.oraParameterOPEN_LINKS_PER_INSTANCESpecifies the number of open database link connections that can be migrated. ThesedblinkConnections are used by XA transactions so that the connections are cached after a transaction is committed. another transaction can use the database link connection if the user who created the connection also created the transaction. this parameter is different frominit.oraParameterOPEN_LINKS, Which specifies the maximum number of concurrent open connections (including database links) to remote databases in one session.OPEN_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 the bottom

In this Document

Symptoms
  Cause
  Solution

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject 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 two Oracle databases.

CAUSE

An ORA-24777 is a warning that you are trying to utilise a database link within an XA coordinated transaction and the connection to the source database which is trying to use the database link has been made through a dedicated server connection.

This is not allowed and this is already ented in following entry

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

In the following section 'using Database Links in Oracle XA Applications '.
 

SOLUTION

Two options

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

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


Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.