【问题标题】:How to install OE schema on Oracle XE(HR schema installed successfully)?如何在 Oracle XE 上安装 OE 架构(HR 架构安装成功)?
【发布时间】: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 并同时使用 SQLCommandLineOracle 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 命令时创建了架构,它在任何表中都没有显示任何数据。

【问题讨论】:

  • 能否提供在脚本执行过程中要求您输入的参数,让您感到困惑?
  • 编辑您的问题以提供详细信息,

标签: oracle schema


【解决方案1】:

那些是数据模型 - 没有数据。

“示例模型和脚本”——它可以帮助您开始使用 Oracle SQL Developer Data Modeler 进行数据建模和设计工作。

如果您需要架构和数据,请转至GitHub

【讨论】:

  • 谢谢。我是这么想的!当我查看 oe_main.sql 脚本时,我发现只有创建命令。我似乎从其他网站/博客下载了相同的脚本。将从您的链接下载并尝试。但是我需要执行哪些来填充表格,这些需要任何参数吗?谢谢。
  • gitbhub 资源有说明 - 如果您有具体问题,请告诉我
  • 我尝试执行脚本 mksample 并得到以下错误:DROP USER oe CASCADE * ERROR at line 1: ORA-01918: user 'OE' does not exist DROP USER pm CASCADE * ERROR at line 1: ORA-01918: user 'PM' does not exist DROP USER ix CASCADE * ERROR at line 1: ORA-01918: user 'IX' does not exist DROP USER sh CASCADE * ERROR at line 1: ORA-01918: user 'SH' does not exist DROP USER bi CASCADE * ERROR at line 1: ORA-01918: user 'BI' does not exist
  • Connected SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_main.sql" Connected SP2-0310: unable to open file "__SUB__CWD__/order_entry/oe_main.sql" Connected SP2-0310: unable to open file "__SUB__CWD__/product_media/pm_main.sql" Connected. SP2-0310: unable to open file "__SUB__CWD__/info_exchange/ix_main.sql" Connected. SP2-0310: unable to open file "__SUB__CWD__/sales_history/sh_main.sql" Connected. SP2-0310: unable to open file "__SUB__CWD__/bus_intelligence/bi_main.sql" Connected. not spooling currently SP2-0310: unable to open file "__SUB__CWD__/mkverify.sql"
  • 我还删除了现有的 hr 架构。现在失去了一切。 :( 这个方法对我来说太复杂了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-08-18
  • 1970-01-01
  • 2013-10-23
  • 2011-10-09
  • 1970-01-01
  • 1970-01-01
  • 2021-01-10
相关资源
最近更新 更多