The tnsnames.ora file has an entry for the service alias ORCL as follows:
The TNS ping command executes successfully when tested with ORCL; however, from the same
OS user session, you are not able to connect to the database instance with the following
command:
SQL > CONNECT scott/tiger@orcl
What could be the reason for this?
A.
The listener is not running on the database node.
B.
The TNS_ADMIN environment variable is set to the wrong value.
C.
The orcl.oracle.com database service is not registered with the listener.
D.
The DEFAULT_DOMAIN parameter is set to the wrong value in the sqlnet.ora file.
E.
The listener is running on a different port.
Explanation:
Service registration enables the listener to determine whether a database service
and its service handlers are available. A service handler is a dedicated server process or
dispatcher that acts as a connection point to a database. During registration, the LREG process
provides the listener with the instance name, database service names, and the type and
addresses of service handlers. This information enables the listener to start a service handler
when a client request arrives.
A: [INCORRECT]
If the listener is down, ‘tnsping’ will give you a TNS-12541 error.
B: [INCORRECT]
If ‘tnsping’ works, then the @ORCL will work.
C: [CORRECT]
If the orcl.oracle.com service is not registered you will get an ORA-12514
error when you use the @ORCL string, though ‘tnsping’ will work ok.
D: [INCORRECT]
If the DEFAULT_DOMIN is wrong in SQLNET.ORA then ‘tnsping’ will give you a
TNS-03505 error.
E: [INCORRECT]
If the LISTENER is on the wrong port, ‘tnsping’ will give you a TNS-12541 error.
C
everything else would cause tnsping to fail too
C