052-248(新增70题2018)

You connected to the database using the following connection string:

CONNECT hr/hr@test.us.oracle.com:1521/mydb

Which three statements are correct regarding the connection string? (Choose three.)

A. mydb is a service name.

B. test.us.oracle.com is a database name.

C. 1521 is the listener port number.

D. mydb is a host name.

E. test.us.oracle.com is a net service name.

F. hr is a username.

G. test.us.oracle.com is an instance name.

Answer: ACF

connect username/password@IP:port/service(sid)

CONNECT

Connects a given username to the specified database.

Format

CONNECT username [@connect-identifier];

Command Parameters

username

Represents the username with which you want to connect to the database. You will be prompted for a password after you enter a username and optionally, a connect-identifier.

connect-identifier

This parameter is optional. It is an Oracle Net Services connect identifier for the database to which you want to connect. The exact syntax depends upon the Oracle Net Services communications protocol your Oracle installation uses.

Usage Notes

  • The username and password must be valid for the database to which you are trying to connect. The username you specify must have the SYSDBA privilege. You do not have to include AS SYSDBA on the CONNECT command because SYSDBA is the default setting for this command.

  • If the CONNECT command returns an error, check to see that you specified a valid connect-identifier.

Command Examples

Example 1   

This example connects to the default database on the local system.

DGMGRL> CONNECT sys;
Password: password
Connected.
Example 2   

This example connects to a remote database whose connect-identifier is North_Sales.example.com.

DGMGRL> CONNECT sys@North_Sales.example.com;
Password: password
Connected.
Example 3   

This example connects to a database using CONNECT '/' so that connection credentials are not visible on the command line:

DGMGRL> CONNECT /@North_Sales.example.com;

You must set up Oracle Wallet or SSL to use CONNECT '/'. By setting up Oracle Wallet or SSL, you can write a script to securely start and run the observer as a background job without specifying database credentials in the script.

原文地址:https://www.cnblogs.com/Babylon/p/8624365.html