• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

ORA-1113:Can not open database

 
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting "ORA-1113:Can not open database" and ORA-01034:Oracle not available" when I am trying to connect to oracle database.

I haven't found any solution to it on net.

Anyone faced similar issue? How did you make it working?

Thanks.
 
author
Posts: 4107
28
Google Web Toolkit Eclipse IDE Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure your Oracle database is up and can you connect to it using a SQL client? Oracle is often the most complicated server to connect with a basic client. I'd verify you can connect with a program such as Toad before trying it out in java.

Afterwards, if that doesn't highlight your problem, I'd recommend posting what code you are using to connect.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Scott Selikoff:
Are you sure your Oracle database is up and can you connect to it using a SQL client? Oracle is often the most complicated server to connect with a basic client. I'd verify you can connect with a program such as Toad before trying it out in java.

Afterwards, if that doesn't highlight your problem, I'd recommend posting what code you are using to connect.



I am trying to connect to it with a client only (SQL+ environment) - not with JDBC code.
[ April 08, 2008: Message edited by: ankur rathi ]
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
If you are usre that the DB is up and running, you can use the foll piece of code to establish a connection


Jhakda
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jhakda Velu:
Hi
If you are usre that the DB is up and running,
Jhakda



No, I am not sure. I guess it's not up. But how do I make it running? I am on Windows 98. Not sure how to view (and run) services in Windows 98. Not sure if it's been selected to run it as a windows service at the time of installation. Any idea?

Thanks.
 
author & internet detective
Posts: 39399
763
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankur,
You can view/start/stop services through the control panel. Select the admin folder and then services.
 
Jhakda Velu
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankur
Could you resolve your problem?
Jhakda
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Ankur,
You can view/start/stop services through the control panel. Select the admin folder and then services.



Ankur,

Assuming that Oracle is installed on the same machine as where you want to run JAVA.

You could also execute tnsping "DB_SID" from a command prompt. The result should be "OK".

If this was succesful try to connect using sqplus "username"/"password"@"DB_SID" from a command prompt.

If you get connected, you are sure the DB is up and running.

regards,

Romano
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Ankur,
You can view/start/stop services through the control panel. Select the admin folder and then services.



There is no admin folder in control panel.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Ankur,
You can view/start/stop services through the control panel. Select the admin folder and then services.



I searched for services.msc file and found it in D:\WINDOWS\system32 folder. But when I click on this file, I get this message:


The selected file is not a microsoft management console document.




[ April 15, 2008: Message edited by: ankur rathi ]
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Romano Londt:


Ankur,

Assuming that Oracle is installed on the same machine as where you want to run JAVA.

You could also execute tnsping "DB_SID" from a command prompt. The result should be "OK".

If this was succesful try to connect using sqplus "username"/"password"@"DB_SID" from a command prompt.

If you get connected, you are sure the DB is up and running.

regards,

Romano



When I execute DB_SID and sqplus command from command prompt, I get 'Bad Command or file name' error. Which JAR shall I take into path?
[ April 15, 2008: Message edited by: ankur rathi ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


There is no admin folder in control panel.


This is to do with how you have configured your Windows start menu. Run services.msc from the Run... prompt or open the Control Panel from My Computer.


I searched for services.msc file and found it in D:\WINDOWS\system32 folder. But when I click on this file, I get this message:
The selected file is not a microsoft management console document.


Sounds like you Windows install is a little flaky.


When I execute DB_SID and sqplus command from command prompt, I get 'Bad Command or file name' error. Which JAR shall I take into path?


tnsping and sqlplus are on your path after you install Oracle client. Do you have Oracle installed? If you don't, you can't uses these tools (though you do not need Oracle installed to connect via JDBC)
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is to do with how you have configured your Windows start menu. Run services.msc from the Run... prompt or open the Control Panel from My Computer.



I think, services.msc doesn't work on Windows 98. At least, it's not working for me.


Sounds like you Windows install is a little flaky.



Didn't get. What do I do now? It's was working before...


tnsping and sqlplus are on your path after you install Oracle client. Do you have Oracle installed? If you don't, you can't uses these tools (though you do not need Oracle installed to connect via JDBC)



Yeah, with thin driver it's possible to connect oracle server without oracle client.

But I do have installed oracle server on my machine.

Thanks.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Oracle are you using? I don't know of one that is supported on Windows 98.

services.msc will not run on Windows 98. As far as I can remember Windows 98 doesn't have the concept of managed services. How come you have services.msc on your machine at all?

sqlplus and tnsping are part of the Oracle install. If you have Oracle installed you should have these tools, but your PATH may be corrupt. Check this.

You are right, you don't need the client to use the thin driver. However they are useful for debugging listener issues.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul for your time.


Which version of Oracle are you using? I don't know of one that is supported on Windows 98.



It's Oracle 8i. It's supported because it was working before.


services.msc will not run on Windows 98. As far as I can remember Windows 98 doesn't have the concept of managed services. How come you have services.msc on your machine at all?



Okay. I think services.msc is there because I have both XP and 98 on my machine. But I can't open this file from 98 - getting 'The selected file is not a microsoft management console document' error.


sqlplus and tnsping are part of the Oracle install. If you have Oracle installed you should have these tools, but your PATH may be corrupt. Check this.



Could be. But how sqlplus and tnsping can solve this problem?

Thanks again.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


because I have both XP and 98 on my machine


...so why are you using 98? Apart from XP being a far, far better OS than the (long unsupported) Windows 98 it means you can follow the advice given above.


But how sqlplus and tnsping can solve this problem?


As Romano Londt suggests, these are useful tools to check your service is running.

What do you currently use to manage your Oracle instance?

(NB: is this for production code? Oracle discontinued support for 8i in December 2004)
[ April 17, 2008: Message edited by: Paul Sturrock ]
 
Jeanne Boyarsky
author & internet detective
Posts: 39399
763
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is starting to sound quite Oracle specific. I'm going to move it to our Oracle forum.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!