File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes unable to connect to oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "unable to connect to oracle database" Watch "unable to connect to oracle database" New topic

unable to connect to oracle database

N.srinivas chowdary

Joined: Jan 02, 2006
Posts: 1
iam able to compile the class,i have set the path to,but when iam running the class iam getting the following error.plz help me in this regard.
Exception in thread "main" java.sql.SQLException: ORA-01034: ORACLE not availabl

at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.ttc7.TTIoer.processError(
at oracle.jdbc.ttc7.O3log.receive1st(
at oracle.jdbc.ttc7.TTC7Protocol.logon(
at oracle.jdbc.driver.OracleConnection.<init>(

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at DBTest.main(
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

ORA-01034: ORACLE not available

Is oracle available? Make sure it is running and able to be accessed by (for example) sqlplus and SquirrelSQL

Adam Richards
Ranch Hand

Joined: Nov 03, 2005
Posts: 135
The problem is not Java in this case. You are loading the Oracle driver correctly, or you wouldn't be getting an Oracle error message. Here's the description of the error, from the official Oracle documentation at

ORA-01034 ORACLE not available

Cause: Oracle was not started. Possible causes include the following:

The SGA requires more space than was allocated for it.

The operating-system variable pointing to the instance is improperly defined.

Action: Refer to accompanying messages for possible causes and correct the problem mentioned in the other messages. If Oracle has been initialized, then on some operating systems, verify that Oracle was linked correctly. See the platform-specific Oracle documentation.
I agree. Here's the link:
subject: unable to connect to oracle database
It's not a secret anymore!