Solved

jdbc connection on cluster

Posted on 2008-06-18
2
1,080 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: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

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.

Question has a verified solution.

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

Suggested Solutions

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

821 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