Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

unable to connect to oracle database

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic