Solved

not able to connect database throgh JDBC connection

Posted on 2012-04-03
2
746 Views
Last Modified: 2012-04-06
not able to connect database through jdbc connections getiing the below errors . listerner is up.

1,"2012-04-03 15:31:36.481","","DBConnectionPool.configurePool()               dbUrl set to [jdbc:oracle:thin:@dbrmsproddb:1521:rmsprd]"
1,"2012-04-03 15:31:36.501","","DBConnectionPool.getNewConnection() -- Invoked..."
3,"2012-04-03 15:34:06.292","","SalesFeed() encountered the following exception [DBConnectionPool encountered the following Exception [Invalid URL format]]"


ORA-12504: TNS:listener was not given the SID in CONNECT_DATA
0
Comment
Question by:dba1234
2 Comments
 
LVL 12

Expert Comment

by:praveencpk
ID: 37804424
TNSNAMES.ORA file has been configured in your server, if yes can you paste the details of it.

As per the error goes it clearly mention that to check  the connect descriptor corresponding to the service name in TNSNAMES.ORA has an SID component in the CONNECT_DATA.

and also check that your database is register with your listener i.e

locally log into your database with DBA credentials and check these parameters.

SQL>show parameter local_listener;

This should return <<LISTENER_NAME>> which you have created the default name is LISTENER, if not then

SQL> alter system set LOCAL_LISTENER='<<LISTENER_NAME>>' scope=both;
SQL> alter system register;
SQL> show parameter service_names

This should return the services name which is registered to the database.
0
 
LVL 47

Accepted Solution

by:
schwertner earned 500 total points
ID: 37806342
The normal connection string looks like:

jdbc:oracle:thin:[user/password]@[host][:port]:SID

But you possibly sent this:

 jdbc:oracle:thin:@dbrmsproddb:1521:rmsprd

So please provide user and password for the Oracle instance.
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

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to recover a database from a user managed backup

708 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

12 Experts available now in Live!

Get 1:1 Help Now