Home » Developer & Programmer » JDeveloper, Java & XML » ora-12505 (win 7)
ora-12505 [message #517878] Fri, 29 July 2011 02:30 Go to next message
reco2
Messages: 4
Registered: July 2011
Location: sudan
Junior Member
hello i am elementary using oracle
use oracle 11g and JDeveloper Studio 11.1.1.1.0 but cant connection between database and jdeveloper becouse these message error

Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Picture after the annex to the author of this code"isnrctl service"
But under the error appears sometimes
/forum/fa/9232/0/

[Updated on: Fri, 29 July 2011 02:32]

Report message to a moderator

Re: ora-12505 [message #517879 is a reply to message #517878] Fri, 29 July 2011 02:34 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
 *Cause:  The listener received a request to establish a connection to a
 database or other service. The connect descriptor received by the listener
 specified a SID for an instance (usually a database instance) that either
 has not yet dynamically registered with the listener or has not been
 statically configured for the listener. This may be a temporary condition
 such as after the listener has started, but before the database instance
 has registered with the listener.
 *Action:
  - Wait a moment and try to connect a second time.
  - Check which instances are currently known by the listener by executing:
    lsnrctl services <listener name>
  - Check that the SID parameter in the connect descriptor specifies
    an instance known by the listener.
  - Check for an event in the listener.log file.

Regards
Michel
Re: ora-12505 [message #517882 is a reply to message #517878] Fri, 29 July 2011 02:59 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Probably your database instance isn't started, which is why the service isn't registered with the listener. Do you know how to check whether the database is running?
Re: ora-12505 [message #517885 is a reply to message #517882] Fri, 29 July 2011 03:18 Go to previous messageGo to next message
reco2
Messages: 4
Registered: July 2011
Location: sudan
Junior Member
John Watson wrote on Fri, 29 July 2011 02:59
Probably your database instance isn't started, which is why the service isn't registered with the listener. Do you know how to check whether the database is running?


Did you mean check how the service is in the annex
/forum/fa/9233/0/
  • Attachment: oracle.png
    (Size: 44.51KB, Downloaded 3344 times)
Re: ora-12505 [message #517890 is a reply to message #517885] Fri, 29 July 2011 03:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Service started does not mean database opened (not even instance started).

Regards
Michel
Re: ora-12505 [message #517896 is a reply to message #517890] Fri, 29 July 2011 04:51 Go to previous messageGo to next message
reco2
Messages: 4
Registered: July 2011
Location: sudan
Junior Member
Michel Cadot wrote on Fri, 29 July 2011 03:46
Service started does not mean database opened (not even instance started).

Regards
Michel


How do I make sure it is working
Thanks
Listen
Re: ora-12505 [message #517898 is a reply to message #517896] Fri, 29 July 2011 04:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try to connect to it LOCALLY.

Regards
Michel
Re: ora-12505 [message #517904 is a reply to message #517896] Fri, 29 July 2011 07:07 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
How do you check whether a database is open on WIndows? I've been meaining to write this for a while. If anyone wants to add more or make corrections, let me know, and I'll put it on the blog.

Do all this from a DOS prompt:

First, set your Oracle Home, your search path, and your Oracle SID. The exact path and the SID will depend on your installation, but for 11g it will probably be something like this:

set ORACLE_HOME=c:\app\john\product\11.2.0\dbhome_1
set PATH=%ORACLE_HOME%\bin;%PATH%
set ORACLE_SID=orcl


Second, confirm that the above is indeed correct with these commands (note that the first (or only) SQL*Plus must be in the same Oracle Home as that off which the database is running):

echo %ORACLE_HOME%
echo %PATH%
echo %ORACLE_SID%
where sqlplus.exe


Third, check that the Windows service for the orcl instance is running. Start it if it isn't:

net start oracleserviceorcl


Fourth, check that the database instance is running and that the database is open READ-WRITE. Start and open if it isn't:

sqlplus / as sysdba
startup
select open_mode from v$database;


Fifth, check that your listener is running and start it if it isn't:

lsnrctl start listener


Sixth, check that your database instance is registered with the listener:

lsnrctl status listener


If the database is not registered with listener, you can force registration from withoin SQL*Plus:

alter system register;


and check again.

I think that's about it.


Re: ora-12505 [message #517984 is a reply to message #517904] Sat, 30 July 2011 10:50 Go to previous message
reco2
Messages: 4
Registered: July 2011
Location: sudan
Junior Member
Thanks
Previous Topic: regarding grants in oracle
Next Topic: ADF
Goto Forum:
  


Current Time: Thu Mar 28 04:36:11 CDT 2024