1Z0-052 · Question #129
The tnsnames.ora file has an entry for the service alias ORCL as follows: ORCL = ( DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.156.24.216)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)…
The correct answer is C. The orcl.oracle.com database service is not registered with the listener. TNSPING verifies listener reachability but not service registration; a successful TNSPING with a failed connection indicates the database service is not registered with the listener.
Question
The tnsnames.ora file has an entry for the service alias ORCL as follows:
ORCL = ( DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.156.24.216)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.oracle.com) ) ) The TNSPING command executes successfully when tested with ORCL, but 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?
Options
- AThe listener is not running on the database node.
- BThe TNS_ADMIN environmental variable is set to a wrong value.
- CThe orcl.oracle.com database service is not registered with the listener.
- DThe DEFAULT_DOMAIN parameter is set to a wrong value in the sqlnet.ora file.
How the community answered
(39 responses)- A13% (5)
- B3% (1)
- C77% (30)
- D8% (3)
Why each option
TNSPING verifies listener reachability but not service registration; a successful TNSPING with a failed connection indicates the database service is not registered with the listener.
If the listener were not running, TNSPING would fail with TNS-12541 rather than succeed, so a successful TNSPING rules out a stopped listener.
An incorrect TNS_ADMIN path would prevent TNSPING from locating tnsnames.ora at all, causing TNSPING itself to fail rather than succeed.
TNSPING only confirms the Oracle listener is running and can resolve the TNS alias to a host and port; it does not verify that a specific database service is actually registered with that listener. For a SQL*Net connection to succeed, the service name (orcl.oracle.com) must be dynamically registered via PMON or statically defined in listener.ora. If the database is down or PMON has not registered the service, TNSPING still succeeds but the actual connection fails with ORA-12514 or a similar error.
An incorrect DEFAULT_DOMAIN in sqlnet.ora affects name resolution and would cause TNSPING to fail on the alias lookup, not just the subsequent SQL connection.
Concept tested: Oracle Net listener service registration vs TNS alias resolution
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/netag/configuring-and-administering-oracle-net-listener.html
Topics
Community Discussion
No community discussion yet for this question.