Solved

jdbc connection on cluster

Posted on 2008-06-18
2
1,083 Views
Last Modified: 2013-12-18
Hi

I have a problem with jdbc connection.

I have a cluster data base the instance name are inst1 and inst2, when I run a shells on an application server with jdbc some times I get and error and some times it works.

The error that I got on application server is

Exception in thread "main" org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction;

When i check on database server i got these erros

TNS-01184: Listener rejected registration or update of service handler "DEDICATED"
 TNS-01185: Registration attempted from a remote node

I attach a file with the tnsnames.ora, listener.ora and jdbc.properties

Sometimes it works and sometimes it doesn´t but if I stop one of the tow listeners it works or it I configure the jdbc directly to one instance it works.

Thanks for your help

Regards



configurationbolts.txt
0
Comment
Question by:asotoh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Assisted Solution

by:Richard Olutola
Richard Olutola earned 200 total points
ID: 21820430
Have you tried static registration?

Also, show the output of lsnrctl services

What about the tnsnames.ora from you client. What is that doing?

Finally I compared your server-side tnsnames.ora with mine and I am missing the following lines commented out:


DBSCM =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cx011-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = cx012-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
#    (FAILOVER = ON)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DBSCM)
#      (FAILOVER_MODE = (TYPE=SESSION)
#      (METHOD=BASIC))
    )
  )

Open in new window

0
 
LVL 48

Accepted Solution

by:
schwertner earned 300 total points
ID: 21820744
You have no registered instances on the Listener.
This could be easilly checked so:

% lsnrctl services

There are two methods to assure registration.
The easiest is:

Backup LISTENER.ORA file!!!!!!!

In ...\network\admin open listener.ora

see

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\Ora10g)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = test)
      (ORACLE_HOME = D:\Ora10g)
    )
  )

Add the entry
    (SID_DESC =
      (SID_NAME = test)
      (ORACLE_HOME = D:\Ora10g)
    )
with regard to the particular Oracle Home and SID Name.

Restart the listener:
c:>lsnrctl stop
c:>lsnctl start

The workaround is to use dynamic registration

The init.ora file parameters must be set to support dynamic service registration:
SERVICE_NAMES
INSTANCE_NAME
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question