create database 文でDBを作ると、 あの scott/tiger がありません。

他には Examples に入っているサンプルスキーマもあります。 一緒にインストールしてみます。

参考文献

SCOTT

$ORACLE_HOME/rdbms/admin/utlsampl.sql に入っています。 sys ユーザでインストールします。

#pre{{ [oracle@ora1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on 土 8月 15 19:27:46 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options に接続されました。 SQL> @?/rdbms/admin/utlsampl.sql Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsと の接続が切断されました。 [oracle@ora1 ~]$ }}

scott/tiger で接続してみます。

#pre{{ [oracle@ora1 ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.1.0.6.0 - Production on 土 8月 15 19:28:14 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options に接続されました。 SQL> select table_name from user_tables;

TABLE_NAME


SALGRADE BONUS EMP DEPT

SQL> }}

サンプルスキーマ

Examples をまずインストールします。

#pre{{ [oracle@ora1 ~]$ unzip linux.x64_11gR1_examples.zip ... [oracle@ora1 ~]$ cd examples/ [oracle@ora1 examples]$ ./runInstaller }}

サンプルスキーマは $ORACLE_HOME/demo/schema/ 以下に インストールされます。

あとはドキュメントに従って順に進めていくだけです。

HR

5つ質問項目があるのでそれぞれ答えていきます。

#pre{{ [oracle@ora1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on 土 8月 15 19:33:31 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options に接続されました。 SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1: 1に値を入力してください: hr

specify default tablespeace for HR as parameter 2: 2に値を入力してください: users

specify temporary tablespace for HR as parameter 3: 3に値を入力してください: temp

specify password for SYS as parameter 4: 4に値を入力してください: xxxxxxxx

specify log path as parameter 5: 5に値を入力してください: $ORACLE_HOME/demo/schema/log/ ... PL/SQL procedure successfully completed.

SQL> SQL> exit Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsと の接続が切断されました。 }}

OE, OC

version は v3 と入れます。

#pre{{ SQL> @?/demo/schema/order_entry/oe_main.sql

specify password for OE as parameter 1: 1に値を入力してください: oe

specify default tablespeace for OE as parameter 2: 2に値を入力してください: users

specify temporary tablespace for OE as parameter 3: 3に値を入力してください: temp

specify password for HR as parameter 4: 4に値を入力してください: hr

specify password for SYS as parameter 5: 5に値を入力してください: xxxxxxxx

specify directory path for the data files as parameter 6: 6に値を入力してください: $ORACLE_HOME/demo/schema/order_entry/

writeable directory path for the log files as parameter 7: 7に値を入力してください: $ORACLE_HOME/demo/schema/log/

specify version as parameter 8: 8に値を入力してください: v3 ... PL/SQL procedure successfully completed.

SQL> SQL> exit Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsと の接続が切断されました。 }}

PM

#pre{{ SQL> @?/demo/schema/product_media/pm_main.sql

specify password for PM as parameter 1: 1に値を入力してください: pm

specify default tablespeace for PM as parameter 2: 2に値を入力してください: users

specify temporary tablespace for PM as parameter 3: 3に値を入力してください: temp

specify password for OE as parameter 4: 4に値を入力してください: oe

specify password for SYS as parameter 5: 5に値を入力してください: xxxxxxxx

specify directory path for the PM data files as parameter 6: 6に値を入力してください: $ORACLE_HOME/demo/schema/product_media/

specify directory path for the PM load log files as parameter 7: 7に値を入力してください: $ORACLE_HOME/demo/schema/log/

specify work directory path as parameter 8: 8に値を入力してください: $ORACLE_HOME/demo/schema/product_media/ ... PL/SQL procedure successfully completed.

SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options }}

IX

これも version は v3 です。

#pre{{ SQL> @?/demo/schema/info_exchange/ix_main.sql

specify password for IX as parameter 1: 1に値を入力してください: ix

specify default tablespeace for IX as parameter 2: 2に値を入力してください: users

specify temporary tablespace for IX as parameter 3: 3に値を入力してください: temp

specify password for SYS as parameter 4: 4に値を入力してください: xxxxxxxx

specify path for log files as parameter 5: 5に値を入力してください: $ORACLE_HOME/demo/log/

specify version as parameter 6: 6に値を入力してください: v3 ... SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options }}

SH

version は v3 です。

#pre{{ SQL> @?/demo/schema/sales_history/sh_main.sql

specify password for SH as parameter 1: 1に値を入力してください: sh

specify default tablespace for SH as parameter 2: 2に値を入力してください: users

specify temporary tablespace for SH as parameter 3: 3に値を入力してください: temp

specify password for SYS as parameter 4: 4に値を入力してください: xxxxxxxx

specify directory path for the data files as parameter 5: 5に値を入力してください: $ORACLE_HOME/demo/schema/sales_history/

writeable directory path for the log files as parameter 6: 6に値を入力してください: $ORACLE_HOME/demo/log/

specify version as parameter 7: 7に値を入力してください: v3 ... PL/SQLプロシージャが正常に完了しました。

現在はスプールしていません。 SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options }}



トップ   差分 履歴 リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2011-01-29 (土) 15:27:48