http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_three.htm#CHDBIAEB
[原文]
Starting SQL*PlusThis chapter describes how to start, login, and connect to a database, how to get help, and how to exit SQL*Plus.
Specific topics discussed are:
-
Login Username and Password
-
Connecting to a Database
-
Starting SQL*Plus
-
Exiting SQL*Plus Command-line
-
SQLPLUS Program Syntax
When you start SQL*Plus, you need a username and password to login to an Oracle Database schema. Your username and password identify you as an authorized user of the Oracle Database schema.
The database administrator (DBA) is responsible for creating your database account with the necessary privileges and giving you the username and password that enables you to access your account.
[译文]
启动Sqlplus
这章节描述怎么启动Sqlplus,登录和连接数据库,怎么获取帮助和退出Sqlplus。主要有下面题目的讨论:
- 登录用户名和口令
- 连接数据库
- 开启Sqlplus
- 退出Sqlplus命令行
- Sqlplus程序的语法
登录的用户名和口令
当运行Sqlplus时,你需要一个用户名和口令来登录到Oracle数据库中。你的用户名和口令表示你是否是Oracle数据库的一个授权用标识。
DBA负责在数据库中分配你的帐号及必要的权限,然后你才能通过用户名和口令进行登录数据库的操作。
[原文]
Default logins are created and you are prompted for associated passwords during Oracle Database installation. Some of the default login usernames created are:
-
SYS
-
SYSTEM
-
HR
Logins are created and displayed in messages during Oracle Database installation.
For further information about the default logins, see the Oracle Database Administrator's Guide.
Once you have logged in, you can connect under a different username using the CONNECT command. The username and password must be valid for the database. For example, to connect the username TODD to the default database using the password FOX, you could enter
CONNECT TODDYou are prompted to enter the password, FOX.
In the command-line interface, if you omit the username and password, SQL*Plus prompts you for them. Because CONNECT first disconnects you from your current database, you will be left unconnected to any database if you use an invalid username and password in your CONNECT command.
If you log on or connect as a user whose account has expired, you are prompted to change your password before you can connect.
If an account is locked, a message is displayed and connection as this user is not permitted until the account is unlocked by your DBA.
You can use the DISCONNECT command to disconnect from a database without leaving SQL*Plus.
[译文]
默认的登录用户名和口令在安装Oracle数据库的时候就被创建,默认的被创建的用户名如下:
- SYS
- SYSTEM
- HR
这些登录信息在创建Oracle数据库时有显示。
------
当你登录了Sqlplus后,就可以使用CONNECT命令,用不同的用户名来连接。这里面使用的用户名和口令必须是数据库中有效的,例如:使用用户名为TODD,口令为FOX的帐号连接数据库,你可以键入:
CONNECT TODD你可以在提示符后面输入口令:FOX。
在命令行的接口界面,如果你省略用户名和口令,Sqlplus提示你进行输入,因为,如果你想要连接就必须先从原来的数据库连接中断开。如果你使用无效的用户名和口令在CONNECT命令中,你将会断开而不会连接到任何数据库。
如果你登录后使用用户名和口令进行连接,使用过期的、失效的帐号,你在能够正常连接前被提示改变你的口令;
如果你的帐号是锁定的,你将会看到一条信息的显示:你的帐号不允许使用,直到帐号被DBA解锁。
你可以使用DISCONNECT命令从数据库上断开连接,而不必退出Sqlplus。
















