sql*plus命令 之 数据库操作命令

来源:互联网 发布:软件开发的发展前景 编辑:程序博客网 时间:2024/05/16 13:52

数据库操作命令

 

1) 连接数据库

CONN[ECT] [username/[password][@<连接标识符>]] [AS{SYSOPER|SYSDBA|SYSASM}] | DISC[ONNECT]

如果不指定连接标识符,sql*plus会使用初始化参数db_name中的值 | 断开连接

 

 

SQL> show parameter db_name

NAME                                 TYPE        VALUE                                             
------------------------------------ ----------- ------------------------------                    
db_name                              string      orcl                                              
SQL> conn zch/zch
已连接。
SQL> disc
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
SQL> conn zch/zch@orcl
已连接。
SQL> disc
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
SQL> conn as sysdba
请输入用户名:  sys
已连接。
SQL> disc
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
SQL> conn test/test as sysdba
已连接。
SQL> disc
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开