数据库操作命令
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 断开