Solved

jdbc connection on cluster

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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…
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…
Suggested Courses

623 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