0

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

从 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
4

0 回答 0