如何安装示例模式?

时间:2014-05-20 11:37:56

标签: oracle oracle12c

我正在使用书籍Oracle Database 12c Install, Configure & Maintain Like a Pro学习Oracle 12c。我安装了数据库,但我没有找到示例模式(客户,销售,产品等表格)。所以我下载Oracle Database 12c Release 1 Examples (12.1.0.1.0) for Microsoft Windows (x64)并安装它;但我仍然不知道如何获得样本表。

从SQL Developer我运行mksample.sql来安装所有示例模式,但我得到了:

Error starting at line 119 in command:
DROP USER hr CASCADE
SQL Error: ORA-01918: user 'HR' does not exist
01918. 00000 -  "user '%s' does not exist"
*Cause:    User does not exist in the system.
*Action:   Verify the user name is correct.

Error starting at line 120 in command:
DROP USER oe CASCADE
Error report:
SQL Error: ORA-01918: user 'OE' does not exist
01918. 00000 -  "user '%s' does not exist"
*Cause:    User does not exist in the system.
*Action:   Verify the user name is correct.

Error starting at line 121 in command:
DROP USER pm CASCADE
Error report:
SQL Error: ORA-01918: user 'PM' does not exist
01918. 00000 -  "user '%s' does not exist"
*Cause:    User does not exist in the system.
*Action:   Verify the user name is correct.
....

我该如何解决这个问题?

更新:当我运行hr_main.sql时,我输入5次密码后会收到此信息:

specify password for HR as parameter 1:
specify default tablespeace for HR as parameter 2:
specify temporary tablespace for HR as parameter 3:
specify password for SYS as parameter 4:
specify log path as parameter 5:

Error starting at line 63 in command:
DROP USER hr CASCADE
Error report:
SQL Error: ORA-01918: user 'HR' does not exist
01918. 00000 -  "user '%s' does not exist"
*Cause:    User does not exist in the system.
*Action:   Verify the user name is correct.

Error starting at line 72 in command:
CREATE USER hr IDENTIFIED BY oracle12c
Error at Command Line:72 Column:13
Error report:
SQL Error: ORA-65096: invalid common user or role name


Error starting at line 74 in command:
ALTER USER hr DEFAULT TABLESPACE &tbs
              QUOTA UNLIMITED ON &tbs
Error report:
SQL Error: ORA-01918: user 'HR' does not exist
01918. 00000 -  "user '%s' does not exist"
*Cause:    User does not exist in the system.
*Action:   Verify the user name is correct.

Error starting at line 77 in command:
ALTER USER hr TEMPORARY TABLESPACE &ttbs
Error report:
SQL Error: ORA-01918: user 'HR' does not exist
01918. 00000 -  "user '%s' does not exist"
*Cause:    User does not exist in the system.
*Action:   Verify the user name is correct.

Error starting at line 79 in command:
GRANT CREATE SESSION, CREATE VIEW, ALTER SESSION, CREATE SEQUENCE TO hr
Error report:
SQL Error: ORA-01917: user or role 'HR' does not exist
01917. 00000 -  "user or role '%s' does not exist"
*Cause:    There is not a user or role by that name.
*Action:   Re-specify the name.

Error starting at line 80 in command:
GRANT CREATE SYNONYM, CREATE DATABASE LINK, RESOURCE , UNLIMITED TABLESPACE TO hr
Error report:
SQL Error: ORA-01917: user or role 'HR' does not exist
01917. 00000 -  "user or role '%s' does not exist"
*Cause:    There is not a user or role by that name.
*Action:   Re-specify the name.
Connected

Error starting at line 87 in command:
GRANT execute ON sys.dbms_stats TO hr
Error report:
SQL Error: ORA-01917: user or role 'HR' does not exist
01917. 00000 -  "user or role '%s' does not exist"
*Cause:    There is not a user or role by that name.
*Action:   Re-specify the name.
Error starting at line 93 in command:
CONNECT hr/&pass
Error report:
Connection Failed
Commit

0 个答案:

没有答案