When i try to connect to oracle through SQL Developer or my java application i get below error, though i am able to connect from SQL PLUS (command line tool)
Listener refused the connection with the following error :
ORA-12505, TNS:listener does not currently know
of SID given in connect descriptor
I face this problem whenever i do system restart. Though 1 out of 10 time after system restart , i am able to connect successfully.
I can see all of the oracle services including OracleOraDb11g_home1TNSListener are up under services section. Just for information
my SID name is orcl
After going thru Luke answer at ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
looks like at the time of restart oracle database gets started earlier than OracleOraDb11g_home1TNSListener. so its not able
to register with listener.
I think solution should be make listener up first then start the database. How can i configure to start database after some time lag after reboot ?
alter system registeras SYS from SQL*Plus? If not does your IP address change on reboot, and is thelocal_listenerinit parameter set? (Erm, except the listener is on localhost from another comment, so it probably isn't an IP issue...) - Alex Pooleshow parameters listenerwould tell you if that is set, but there would have to be a discrepancy amd something odd for it to matter. If it isn't set it defaults to localhost:1521, which is what your listener is on anyway. - Alex Poole