Oracle添加SCOTT用户

来源:互联网 发布:java中的final与const 编辑:程序博客网 时间:2024/05/21 22:55

Windows下

1 登录sqlplus

打开cmd

 sqlplus / as sysdba
--以DBA身份登录sql

2、执行@ORACLE_HOME/rdbms/admin/scott.sql 脚本。
SQL> @D:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\scott.sql

如果报错如下:则进入3 
SP2-0310: unable to open file "ORACLE_HOME/rdbms/admin/scott.sql"

3、ed D:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\scott.sql
-- 打开文件,如果没有些文件就会创建这个文件
@D:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\scott.sql
-- 执行文件

这样就可以了!

Linux下

1 登录sqlplus

[oracle@gc ~]$ sqlplus / as sysdba
--以DBA身份登录sql


2  执行脚本

SQL> @$ORACLE_HOME/rdbms/admin/utlsampl.sql

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

创建成功


0 0