Once you are in SQL*Plus, you can connect to another database or change
your connection by using the
CONNECT
command, with this syntax:
CONNECT
<username>/<password>@<connectstring>
The slash separates the username and password. The connect string following
@
is the database alias name. If you omit the password, you will be
prompted to enter it. You may omit the connect string to connect to a local
database.
For DOS and Unix platforms, SQL*Plus comes in character mode. You can
invoke and connect to SQL*Plus using the
sqlplus
command, with this syntax:
sqlplus
username/password@connectstring
If you invoke the tool with just
sqlplus
, you will be prompted for username
and password. If you invoke SQL*Plus with a username, you will be
prompted for a password. Figure 2.2 shows an example of invoking
SQL*Plus from Unix.
Use the
DISCONNECT
command to disconnect your session from the database.
To connect again, use the
CONNECT
command.
SQL> DISCONNECT
Disconnected from Oracle9i Enterprise Edition Release
9.0.1.1.1 -
Production
With the Partitioning option
JServer Release 9.0.1.1.1 - Production
SQL> SELECT * FROM tab;
SP2-0640: Not connected
SQL> CONNECT hr/hr@sql9i
Connected.
SQL>
your connection by using the
CONNECT
command, with this syntax:
CONNECT
<username>/<password>@<connectstring>
The slash separates the username and password. The connect string following
@
is the database alias name. If you omit the password, you will be
prompted to enter it. You may omit the connect string to connect to a local
database.
For DOS and Unix platforms, SQL*Plus comes in character mode. You can
invoke and connect to SQL*Plus using the
sqlplus
command, with this syntax:
sqlplus
username/password@connectstring
If you invoke the tool with just
sqlplus
, you will be prompted for username
and password. If you invoke SQL*Plus with a username, you will be
prompted for a password. Figure 2.2 shows an example of invoking
SQL*Plus from Unix.
Use the
DISCONNECT
command to disconnect your session from the database.
To connect again, use the
CONNECT
command.
SQL> DISCONNECT
Disconnected from Oracle9i Enterprise Edition Release
9.0.1.1.1 -
Production
With the Partitioning option
JServer Release 9.0.1.1.1 - Production
SQL> SELECT * FROM tab;
SP2-0640: Not connected
SQL> CONNECT hr/hr@sql9i
Connected.
SQL>
解决方案 »
- 请问下sql语句!
- decode的用法,空置怎么处理
- 请教PLSQL语句的2个小程序
- 如何让oracle只绑定机器名,不要绑定IP,我安在本本上来回换地方,服务都起不来。烦
- oracle修改表中记录时出的错误
- oracle 10g 新建的数据库无法启动!提示要更改数据库状态!!!
- 怎么样自动添加数据?????????
- 急,在线等!如何从oracle数据库中导出数据到.txt文件中
- ora怎么创建存储过程,然后在delphi里如何调用这个存储过程
- oracle 9.2连接???
- 看看笑话,顺便散分
- 初学pro*c,遇到i386ld fatal: Symbol referencing errors. No output written to a.out问题
connect user/password@db_service_name