Two Laptop Bag*
The moose likes JDBC 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
Bookmark "unable to connect to oracle database" Watch "unable to connect to oracle database" New topic
Author

unable to connect to oracle database

N.srinivas chowdary
Greenhorn

Joined: Jan 02, 2006
Posts: 1
hi,
iam able to compile the class,i have set the path to classes12.zip,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
e

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java:429)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:248)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at DBTest.main(DBTest.java:11)
David O'Meara
Rancher

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

Dave
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
(http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76999/e900.htm#1656):

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.
 
Consider Paul's rocket mass heater.
 
subject: unable to connect to oracle database
 
Similar Threads
exception while connecting to the database
java.sql.SQLException: Protocol violation
Connection Pooling in Borland App Server
oracle.jdbc.driver.OracleDriver
Connection not available