I am new to using Oracle... I am trying to connect to an Oracle9i database from Java, but in order for that to happen, I need a TNS service name, and somehow I can't get even the test connection to succeed from the net configuration assistant. I keep getting "ORA-12535 TNS timed out error." So I was surfing your site for it and there you have specified a solution to the problem by writing out those lines in a DOS window, but I am not sure what the SID is for my database. Is there a way to check that? > Any > help would be highly appreciated.
Your Java program is a little different. Instead of using the thick JDBC drivers, which require Oracle Net 8 software and a TNS alias, why don't you use the thin JDBC drivers? With those drivers, you specify the host, port and ORACLE_SID right in your JDBC connect string.
As for your ORACLE_SID, you'll have to sign on to the database and issue the following:
SELECT instance_name FROM v$instance;
If you can't gain access to the Oracle database, then you'll have to ask your DBA for more assistance.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.