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>

解决方案 »

  1.   

    pl/sql?? 还是 PL/SQL Developer??连接的时候用 conn username/password@service_name 就可以了service_name是你要连接的服务名,是要配置的
      

  2.   

    是PL/SQL Developer,service_name怎么配置了阿
      

  3.   

    在Net8 Configuration Assistant里配服务名
      

  4.   

    用 Net8 Assitant配置 配置好了 在PLSQL Developer中的 DATABASE下拉列表中会有的 也可以取消然后在Command Window里用 conn username/password@service_name 登录
      

  5.   

    在pl/sql环境下或在Developer的COMMAND窗口中
    connect user/password@db_service_name
      

  6.   

    我在Net8 Configuration Assistant里配置了一下,最后测试的时侯连接不成功,后来我索性在PL/SQL登录时在DataBase里什么也不填,结果登录成功了,这是怎么回事阿
      

  7.   

    首先你需要要安装oracle 的客户端软件,然后使用net? configuration assistant 建立本地服务名,然后使用 sqlplus username/password@service_name 就可以使用了
      

  8.   

    to china_hongyue(冷酷到底) 登录到本地可以不要的