Oracle 清理用户所有的表
PLSQL中执行语句
select 'drop '||object_type||' '||object_name||';' from user_objects;
结果集是所有的删除表语句,将查询结果保存为clear.sql
在sql>提示符下@clear.sql 执行该脚本
SQL*Plus 登录
1.直接敲sqlplus并回车就是启动SQL*PLUS,输入user及password将使用户登陆到缺省的数据库
C:Documents and SettingsAdministrator>sqlplus
SQL*Plus: Release 9.2.0.1.0 - Production on
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
请输入用户名:
2.sqlplus user/password@SERVICE_NAME将连接到指定的数据库
C:Documents and SettingsAdministrator>sqlplus dbusername/password@SERVICE_NAME
SQL*Plus: Release 9.2.0.1.0 - Production on
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL>
3.但如果敲 sqlplus /nolog就是使SQL*PLUS启动,但不登陆Oracle数据库。然后需要使用connect命令连接Oracle
C:Documents and SettingsAdministrator>sqlplus /nolog
SQL*Plus: Release 9.2.0.1.0 - Production on
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect dbusername/password@SERVICE_NAME
已连接。
SQL>