Solved

not able to connect database throgh JDBC connection

Posted on 2012-04-03
2
752 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.

Question has a verified solution.

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

Suggested Solutions

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…
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 how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

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