Solved

jdbc connection on cluster

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

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

Title # Comments Views Activity
Oracle SQL 6 57
Oracle 10g - insert string with special characters 8 55
oracle 11g 23 78
Oracle - Query link database loop 8 37
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to recover a database from a user managed backup

785 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