1z0-062 Exam QuestionsBrowse all questions from this exam

1z0-062 Exam - Question 247


Examine this command executed on a client that is remote from the database server.

SQL> CONNECT hr/hr@orcl -

Which two are required for this command to connect the SQLPLUS client to a database instance? (Choose two.)

Show Answer
Correct Answer: BC

To connect the SQLPLUS client to a database instance using the provided command, two requirements must be met. Firstly, an orcl TNS entry must be defined in the client-side tnsnames.ora file. This is necessary for the client to know how to locate and connect to the database instance. Secondly, a service name must be defined to the listener that matches the service name in the orcl TNS entry, ensuring that the listener knows how to handle incoming connection requests for the specified service.

Discussion

2 comments
Sign in to comment
sherifelia
Nov 23, 2019

Answer BC because the service name in tns file maybe isn't orcl

NorthKorean
Apr 7, 2020

BC confirmed

eskias
Sep 16, 2021

AE A. tnsname.ora should be configured on both host and clint E. the service name orcl should be configured on tnsnames.ora c not correct There is no service name parameter on listener file

Ray_gk
Apr 21, 2022

B,C is correct A is incorrect. You CAN have tnsnames.ora configured on both the local and remote server. However, for the purpose of successful connection to the DB server, the client initiating the above command MUST have a tnsnames.ora file with the net service name being used (in this case orcl) on their server. The tnsnames.ora in the remote DB does NOT have to have the exact same tns entry for successful connection. The requirement is that the net service name be registered with the listener it is using to request connection to the DB server. So B is correct as opposed to A. C is correct. I believe the question means "register" when they reference define. In that case C is correct. The DB attempting a connection MUST be registered with the listener it will use to request connection to a DB server.