Problem setting up a datasource for Oracle database

While setting up a datasource to connect to my Oracle database in Sun java studio creator 2 update 1, I got the following error message:[Sunm][Oracle JDBC Driver][Oracle]ORA-12505 Connection refused,the specified SID(myDatabaseName)was not recognised by the Oracle server. .

I need help.

[308 byte] By [JohnnyFlip] at [2007-11-26 8:47:36]
# 1

I would suggest trying to connect to the Oracle server from outside the Creator IDE using the same specifications for SID etc..It seems that the SID value might be incorrect.

Also, the following urls will be of interest:

System requirements:

http://developers.sun.com/prodtech/javatools/jscreator/features/sysreqs/dbserve rs_jdbcdrivers.html

Database FAQs:

http://developers.sun.com/prodtech/javatools/jscreator/reference/faqs/technical /dbaccess/

Why are Oracle JDBC Drivers unsuitable for Sun Java Studio Creator?

Will any JDBC driver work with Java Studio Creator?

Rradhika at 2007-7-6 22:34:57 > top of Java-index,Development Tools,Java Tools...
# 2

Hi Johny,

SID is a name of Oracle service. Most probably SID you entered (myDatabaseName) is non-existing. Check its name and enter it properly.

You can determine SID using Oracle client software. If you have Oracle installed on your local machine, SID can be determined as the command line parameter of Oracle running process.

Thanks, Misha

(Creator team)

Mikhail_Matveev at 2007-7-6 22:34:57 > top of Java-index,Development Tools,Java Tools...
# 3

Thanks for your response ,I'm really greatful but I tried the steps you suggested but i'm still having the same problems:

[sunm][Oracle JDBC Driver][Oracle]ORA-12505 Connection refused,the specified SID(appnig) was not recognized by the Oracle server.

appnig is my DataBase name,pls help me , if there is anythnig i'm doing wrong.

JohnnyFlip at 2007-7-6 22:34:57 > top of Java-index,Development Tools,Java Tools...
# 4
When I set this up as a JNDI connection I needed to specify a seperate attribute for SID, and the value, even though it was defined as part of the url. try this.Richard
rbremner at 2007-7-6 22:34:57 > top of Java-index,Development Tools,Java Tools...
# 5

Check if your SID from TNSNAMES.ORA matches the database URL in the Creator IDE.

SIDNAME =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)

(HOST =)(PORT = 1521))

)

(CONNECT_DATA =

(SID= SIDNAME)

and the database url:

jdbc:sun:oracle://#HOSTNAME:1521;SID=SIDNAME

Rradhika at 2007-7-6 22:34:57 > top of Java-index,Development Tools,Java Tools...
# 6
Are you able to connect to your database from this machine using any other client like "SQLPLUS"?Regards,Sakthi
sakthivelgopal at 2007-7-6 22:34:57 > top of Java-index,Development Tools,Java Tools...