Solved

jdbc connection on cluster

Posted on 2008-06-18
2
1,072 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
2 Comments
 
LVL 16

Assisted Solution

by:rolutola
rolutola earned 200 total points
Comment Utility
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 47

Accepted Solution

by:
schwertner earned 300 total points
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

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.  …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now