【发布时间】:2017-02-01 22:09:19
【问题描述】:
我正在学习 OCA Oracle Database 11g SQL Fundamentals I 考试指南:考试 1Z0-051。 这本书需要我安装 HR 和 OE 模式,我可以从中安装 HR 模式。我使用以下链接下载模式的脚本: Sample Models and Scripts
我成功安装了 HR 架构,其中包含数据。
但是当我运行oe_main.sql 时,我不知道要提供哪些参数,因为本书的任何地方都没有提到它们,或者 Oracle 的从这里安装示例模式的指南:Installing Sample Schemas
我被困在这一步,我猜这本书的后续章节将需要 OE 模式。我已经在自己的 PC 上安装了 Oracle XE 并同时使用
SQLCommandLine 和 Oracle Developer。
在执行oe_main 的脚本时,我得到以下输出,需要我输入参数:
specify password for OE as parameter 1:
Enter value for 1: root
specify default tablespeace for OE as parameter 2:
Enter value for 2: USERS
specify temporary tablespace for OE as parameter 3:
Enter value for 3: TEMP
specify password for HR as parameter 4:
Enter value for 4: root
specify password for SYS as parameter 5:
Enter value for 5: root
specify directory path for the data files as parameter 6:
Enter value for 6: C:/oraclexe/app/oracle/product/11.2.0/server/demo/schema/order_entry
writeable directory path for the log files as parameter 7:
Enter value for 7: C:/oraclexe/app/oracle/product/11.2.0/server/demo/schema/order_entry
specify version as parameter 8:
Enter value for 8: 1.0
这给了我以下输出:
User dropped.
old 1: CREATE USER oe IDENTIFIED BY &pass
new 1: CREATE USER oe IDENTIFIED BY root
User created.
old 1: ALTER USER oe DEFAULT TABLESPACE &tbs QUOTA UNLIMITED ON &tbs
new 1: ALTER USER oe DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS
User altered.
old 1: ALTER USER oe TEMPORARY TABLESPACE &ttbs
new 1: ALTER USER oe TEMPORARY TABLESPACE TEMP
User altered.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Connected.
Grant succeeded.
Connected.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Connected.
Session altered.
Session altered.
SP2-0310: unable to open file "C:\oraclexe\app\oracle\product\11.2.0\server/demo/schema/order_entry/coe_1.0"
SP2-0310: unable to open file "C:\oraclexe\app\oracle\product\11.2.0\server/demo/schema/order_entry/loe_1.0"
SP2-0310: unable to open file "C:\oraclexe\app\oracle\product\11.2.0\server/demo/schema/order_entry/poe_1.0"
Session altered.
...creating subschema OC in OE
Type created.
Type created.
Type created.
Type created.
Type created.
Type created.
Type created.
Type created.
Type created.
Warning: Type created with compilation errors.
Type created.
Type created.
Type created.
Warning: Type created with compilation errors.
Type created.
Type body created.
Type created.
Type body created.
Type created.
Type body created.
Table created.
FROM inventories i, warehouses w
*
ERROR at line 6:
ORA-00942: table or view does not exist
FROM product_information p
*
ERROR at line 10:
ORA-00942: table or view does not exist
FROM customers c
*
ERROR at line 20:
ORA-00942: table or view does not exist
FROM customers c
*
ERROR at line 20:
ORA-00942: table or view does not exist
FROM customers c
*
ERROR at line 20:
ORA-00942: table or view does not exist
FROM orders o
*
ERROR at line 9:
ORA-00942: table or view does not exist
ON oc_orders FOR EACH ROW
*
ERROR at line 2:
ORA-00942: table or view does not exist
TABLE order_item_list OF oc_orders FOR EACH ROW
*
ERROR at line 2:
ORA-00942: table or view does not exist
Commit complete.
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 5:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 5:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 5:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 5:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
FROM oc_product_information o
*
ERROR at line 4:
ORA-00942: table or view does not exist
1 row created.
1 row created.
1 row created.
1 row created.
Type altered.
3 rows updated.
0 rows updated.
0 rows updated.
0 rows updated.
Commit complete.
Type body altered.
Type body altered.
Type body altered.
PL/SQL procedure successfully completed.
我不知道我哪里出错了,但经过多次尝试,即使在我触发 select 命令时创建了架构,它在任何表中都没有显示任何数据。
【问题讨论】:
-
能否提供在脚本执行过程中要求您输入的参数,让您感到困惑?
-
编辑您的问题以提供详细信息,