Hi there. I installed Oracle 10g Enterprise Edition (10.2.0.1.0 for Win32) on one computer, and the 10g Instant Client on another. When I try to connect from the other computer with
I get an ORA-12560 (TNS protocol adaptor error), even though my tnsnames.ora, sqlnet.ora are correct and my ORACLE_SID is set. If I use the fully qualified user/pass@sid, then it connects OK. If I connect from the other computer as "sys/pass@sid as sysdba" it's good. From there if I "shutdown immediate" it's still good -- I can shut the database down. But, when I then "startup" from the other computer, or exit SQL*Plus and try to reconnect, I get the ORA-12514. Why would that be, and why do I need to give the SID in the connect string? The listener is configured correctly (otherwise I would always get the 12514).
When connecting to a remote database, the ORACLE_SID environment variable has no meaning. This environment variable is used for local databases only. Instead, you will have to use a TNS alias as defined in your TNSNAMES.ORA config file. This why you can connect with user/pass@tns_alias. And you have shown this in being able to shut down your instance remotely. The reason you cannot connect to start it back up is that the instance uses "dynamic registration" to register the instance with the Oracle Listener. When the instance is shut down, the Listener does not know anything about it, hence the ORA-12514 error. If you want to be able to start the instance remotely, you will need to configure Static Registration. Please refer to your Net Administrator's Guide for details.
Dig Deeper on Oracle database design and architecture