aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Creating Database Connection profile using connection url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Creating Database Connection profile using connection url" Watch "Creating Database Connection profile using connection url" New topic
Author

Creating Database Connection profile using connection url

Kalyana Sundaram
Ranch Hand

Joined: Mar 18, 2005
Posts: 94
In Eclipse Ganymede, using the Data Tools Platform Project, I tried creating a profile.
Although I gave database host, database name, schema and password, I am unable to establish the connection.

However I am able to connect to the same DB using DB visualizer by directly giving the entry in tnsnames.ora
Is it possible to establis the connection in Eclipse DTPP in the same way.

Eclipse Guru's please help...


Only those who will risk going too far can possibly find out how far one can go !!!
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Elaborate "unable". What happens? What happens not?
Kalyana Sundaram
Ranch Hand

Joined: Mar 18, 2005
Posts: 94
In New Connection Profile
I filled in the details for SID, Host, Port Number, UserName, Password
This formed the connection url automatically

jdbc:oracle:thin:@19.2.12.18:1553:HELLO.WORLD.DB

When I tried to test the connection after creating the profile, I got the following error

Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
19.2.12.18:1553:HELLO.WORLD.DB

I got the same kind of problem while configuring DBVizualizer
However in DBVizualizer, it connected properly when I gave the tnsentry itself in the connection url, for example
jdbc:oracle:thin:@(description=(address=(protocol=tcp)(host=19.2.12.18)(port=1553))(connect_data=(sid=HELLO.WORLD.DB)))

Is it possible to create a new connection profile in Eclipse using the connection url like the one mentioned above.
Please let me know if anyother information is required to resolve this...

Thanks a lot for your interests in answering this query.

Varun Chopra
Ranch Hand

Joined: Jul 10, 2008
Posts: 211
Check the name of oracle instance in database:

Check value of environment variable ORACLE_SID on server or run following query:



-Varun -
(My Blog) - Online Certifications - Webner Solutions
Kalyana Sundaram
Ranch Hand

Joined: Mar 18, 2005
Posts: 94
Thanks for the reply Varun.

Well, I dont have access to the server.
All I have is this TNS entry with me in my oracle client.

Connection got established with DB-Vizualiser but not with Eclipse.
Hence the Real problem is in Eclipse configuration. ....

Varun Chopra
Ranch Hand

Joined: Jul 10, 2008
Posts: 211
Ok, I may be wrong here, but just a guess. HELLO.WORLD.DB looks like the name of global database (that's what SERVICE_NAME is). It is not name of SID. Now since you syntax of
(connect_data=(sid=HELLO.WORLD.DB)
is working, so it is possible Oracle accepts global db name as value to SID (oracle TNS thing syntax is changed several times in past and is still confusing). I would again say, make sure SID name is HELLO.WORLD.DB, and once you resolve this problem do let us know what was the reason of issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Database Connection profile using connection url
 
Similar Threads
Encoding Conversion using JDBC
Immediate help please . Not getting DB connection !!!!!!
DB2 connection error
where should i create the database connection
Create simple WS in eclipse using JBOSS