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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值