1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Oracle Database】スキーマサンプルを入れてみた(備忘録)

Last updated at Posted at 2024-04-20

はじめに

サンプルスキーマのインストール・設定の一通りの流れを備忘録として残します。
基本実行コマンドと結果のみなので、特段解説はありません。

またインストールスキーマサンプルに関しては、以下のGitHubに公開されており、
READMEで詳細が確認できます。

以下、手順

  • GitHubからサンプルスキーマを取得
[oracle@devdays-23c ~]$ wget https://github.com/oracle-samples/db-sample-schemas/archive/refs/tags/v23.2.zip
--2024-04-10 04:59:09--  https://github.com/oracle-samples/db-sample-schemas/archive/refs/tags/v23.2.zip
Resolving github.com (github.com)... 140.82.113.4
Connecting to github.com (github.com)|140.82.113.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/oracle-samples/db-sample-schemas/zip/refs/tags/v23.2 [following]
--2024-04-10 04:59:09--  https://codeload.github.com/oracle-samples/db-sample-schemas/zip/refs/tags/v23.2
Resolving codeload.github.com (codeload.github.com)... 140.82.113.9
Connecting to codeload.github.com (codeload.github.com)|140.82.113.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘v23.2.zip’

v23.2.zip            [     <=>         ]  11.61M  5.73MB/s    in 2.0s    

2024-04-10 04:59:12 (5.73 MB/s) - ‘v23.2.zip’ saved [12172993]

  • 取得したzipファイルを確認
[oracle@devdays-23c ~]$ ls
v23.2.zip
  • 取得したzipファイルを解凍
[oracle@devdays-23c ~]$ unzip
unzipのログは折りたたみを開いてご確認下さい
[oracle@devdays-23c ~]$ unzip
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
  Default action is to extract files in list, except those in xlist, to exdir;
  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment only
  -v  list verbosely/show version info       -T  timestamp archive to latest
  -x  exclude files that follow (in xlist)   -d  extract files into exdir
modifiers:
  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)
  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files
  -j  junk paths (do not make directories)   -aa treat ALL files as text
  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives
  -I CHARSET  specify a character encoding for UNIX and other archives

See "unzip -hh" or unzip.txt for more help.  Examples:
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
[oracle@devdays-23c ~]$ unzip v23.2.zip 
Archive:  v23.2.zip
a780e5b01ae238266f94bb1e6ab1edce028b41e0
   creating: db-sample-schemas-23.2/
  inflating: db-sample-schemas-23.2/CONTRIBUTING.md  
  inflating: db-sample-schemas-23.2/LICENSE.txt  
  inflating: db-sample-schemas-23.2/README.md  
  inflating: db-sample-schemas-23.2/README.txt  
  inflating: db-sample-schemas-23.2/SECURITY.md  
   creating: db-sample-schemas-23.2/customer_orders/
  inflating: db-sample-schemas-23.2/customer_orders/README.md  
  inflating: db-sample-schemas-23.2/customer_orders/README.txt  
  inflating: db-sample-schemas-23.2/customer_orders/co_create.sql  
  inflating: db-sample-schemas-23.2/customer_orders/co_install.sql  
  inflating: db-sample-schemas-23.2/customer_orders/co_populate.sql  
  inflating: db-sample-schemas-23.2/customer_orders/co_uninstall.sql  
   creating: db-sample-schemas-23.2/human_resources/
  inflating: db-sample-schemas-23.2/human_resources/README.md  
  inflating: db-sample-schemas-23.2/human_resources/README.txt  
  inflating: db-sample-schemas-23.2/human_resources/hr_code.sql  
  inflating: db-sample-schemas-23.2/human_resources/hr_create.sql  
  inflating: db-sample-schemas-23.2/human_resources/hr_install.sql  
  inflating: db-sample-schemas-23.2/human_resources/hr_populate.sql  
  inflating: db-sample-schemas-23.2/human_resources/hr_uninstall.sql  
   creating: db-sample-schemas-23.2/order_entry/
   creating: db-sample-schemas-23.2/order_entry/2002/
   creating: db-sample-schemas-23.2/order_entry/2002/Apr/
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/AMCEWEN-20021009123336171PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/AMCEWEN-20021009123336271PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/EABEL-20021009123336251PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/PTUCKER-20021009123336191PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/PTUCKER-20021009123336291PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/SBELL-20021009123336231PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/SBELL-20021009123336331PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/SKING-20021009123336321PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/SMCCAIN-20021009123336151PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/SMCCAIN-20021009123336341PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Apr/VJONES-20021009123336301PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Aug/
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/AWALSH-20021009123337203PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/AWALSH-20021009123337303PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/CJOHNSON-20021009123337283PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/DAUSTIN-20021009123337103PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/JCHEN-20021009123337123PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/JCHEN-20021009123337223PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/LSMITH-20021009123337323PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/SBELL-20021009123337353PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/SKING-20021009123337153PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/SMCCAIN-20021009123337173PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Aug/TFOX-20021009123337243PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Dec/
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/AMCEWEN-20021009123338445PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/CJOHNSON-20021009123338595PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/DAUSTIN-20021009123338645PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/EABEL-20021009123338324PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/JCHEN-20021009123338475PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/LSMITH-20021009123338535PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/PTUCKER-20021009123338565PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/SBELL-20021009123338304PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/SBELL-20021009123338505PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/TFOX-20021009123338354PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Dec/VJONES-20021009123338374PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Feb/
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/AMCEWEN-20021009123335600PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/AMCEWEN-20021009123335701PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/DAUSTIN-20021009123335811PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/EABEL-20021009123335791PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/PTUCKER-20021009123335721PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/PTUCKER-20021009123335821PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/SBELL-20021009123335771PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/SMCCAIN-20021009123335681PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/WSMITH-20021009123335650PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/WSMITH-20021009123335741PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Feb/WSMITH-20021009123335751PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Jan/
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/AMCEWEN-20021009123335370PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/AWALSH-2002100912333570PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/CJOHNSON-20021009123335170PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/LSMITH-20021009123335500PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/PTUCKER-20021009123335430PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/SBELL-20021009123335280PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/SKING-20021009123335560PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/SMCCAIN-20021009123335470PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/TFOX-20021009123335520PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/VJONES-20021009123335350PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jan/WSMITH-20021009123335450PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Jul/
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/AMCEWEN-20021009123336902PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/CJOHNSON-2002100912333783PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/DAUSTIN-2002100912333702PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/DAUSTIN-2002100912333742PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/LSMITH-2002100912333722PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/SBELL-2002100912333763PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/SKING-20021009123336952PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/SMCCAIN-20021009123336972PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/TFOX-20021009123336872PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/TFOX-20021009123336912PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jul/VJONES-20021009123336932PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Jun/
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/AMCEWEN-20021009123336762PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/AWALSH-20021009123336642PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/CJOHNSON-20021009123336712PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/LSMITH-20021009123336852PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/SKING-20021009123336622PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/SKING-20021009123336822PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/SMCCAIN-20021009123336842PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/TFOX-20021009123336582PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/TFOX-20021009123336782PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/VJONES-20021009123336602PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Jun/VJONES-20021009123336802PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Mar/
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/AWALSH-20021009123335871PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/AWALSH-20021009123335911PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/AWALSH-20021009123336101PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/CJOHNSON-20021009123335851PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/DAUSTIN-20021009123335931PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/JCHEN-20021009123335961PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/LSMITH-2002100912333661PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/SBELL-2002100912333601PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/SKING-20021009123336131PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/TFOX-2002100912333681PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Mar/VJONES-20021009123335971PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/May/
  inflating: db-sample-schemas-23.2/order_entry/2002/May/CJOHNSON-20021009123336482PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/EABEL-20021009123336382PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/JCHEN-20021009123336462PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/LSMITH-20021009123336562PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/PTUCKER-20021009123336452PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/SBELL-20021009123336362PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/SBELL-20021009123336532PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/SKING-20021009123336392PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/SMCCAIN-20021009123336512PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/VJONES-20021009123336502PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/May/WSMITH-20021009123336412PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Nov/
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/AWALSH-20021009123337954PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/AWALSH-2002100912333844PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/CJOHNSON-20021009123338124PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/CJOHNSON-2002100912333824PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/LSMITH-20021009123338234PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/SBELL-20021009123338204PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/SKING-20021009123337974PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/SKING-20021009123338294PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/SMCCAIN-2002100912333894PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/TFOX-20021009123337994PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Nov/WSMITH-20021009123338154PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Oct/
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/AMCEWEN-20021009123337874PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/DAUSTIN-20021009123337613PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/JCHEN-20021009123337633PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/JCHEN-20021009123337733PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/JCHEN-20021009123337764PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/SBELL-20021009123337673PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/SKING-20021009123337703PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/TFOX-20021009123337653PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/TFOX-20021009123337784PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/VJONES-20021009123337814PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Oct/WSMITH-20021009123337924PDT.xml  
   creating: db-sample-schemas-23.2/order_entry/2002/Sep/
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/AWALSH-20021009123337483PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/DAUSTIN-20021009123337423PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/DAUSTIN-20021009123337553PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/JCHEN-20021009123337443PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/SKING-20021009123337383PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/SKING-20021009123337503PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/SMCCAIN-20021009123337403PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/TFOX-20021009123337463PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/TFOX-20021009123337563PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/VJONES-20021009123337363PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/2002/Sep/VJONES-20021009123337583PDT.xml  
  inflating: db-sample-schemas-23.2/order_entry/POList.json  
  inflating: db-sample-schemas-23.2/order_entry/PurchaseOrders.dmp  
  inflating: db-sample-schemas-23.2/order_entry/README.md  
  inflating: db-sample-schemas-23.2/order_entry/bi_oe_oi.ctl  
  inflating: db-sample-schemas-23.2/order_entry/bi_oe_oi.dat  
  inflating: db-sample-schemas-23.2/order_entry/bi_oe_or.ctl  
  inflating: db-sample-schemas-23.2/order_entry/bi_oe_or.dat  
  inflating: db-sample-schemas-23.2/order_entry/bi_oe_pi.ctl  
  inflating: db-sample-schemas-23.2/order_entry/bi_oe_pi.dat  
  inflating: db-sample-schemas-23.2/order_entry/ccus_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/cidx_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/cmnt_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/coe_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/coe_xml.sql  
  inflating: db-sample-schemas-23.2/order_entry/cord_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/createFolders.sql  
  inflating: db-sample-schemas-23.2/order_entry/createResources.sql  
  inflating: db-sample-schemas-23.2/order_entry/createUser.sql  
  inflating: db-sample-schemas-23.2/order_entry/cwhs_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/doe_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/doe_xml.sql  
  inflating: db-sample-schemas-23.2/order_entry/empdept.xsl  
  inflating: db-sample-schemas-23.2/order_entry/filelist.xml  
  inflating: db-sample-schemas-23.2/order_entry/loe_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/oc_comnt.sql  
  inflating: db-sample-schemas-23.2/order_entry/oc_cre.sql  
  inflating: db-sample-schemas-23.2/order_entry/oc_drop.sql  
  inflating: db-sample-schemas-23.2/order_entry/oc_main.sql  
  inflating: db-sample-schemas-23.2/order_entry/oc_popul.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_analz.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_comnt.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_cre.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_drop.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_idx.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_main.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ar.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ca.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_cs.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_cus.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_d.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_dk.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_e.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_el.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_esa.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_f.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_frc.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_hu.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_i.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_inv.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_itm.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_iw.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ja.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ko.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_n.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_nl.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ord.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_pd.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_pi.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_pl.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_pt.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ptb.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ro.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_ru.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_s.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_sf.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_sk.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_th.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_tr.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_us.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_whs.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_zhs.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_p_zht.sql  
  inflating: db-sample-schemas-23.2/order_entry/oe_views.sql  
  inflating: db-sample-schemas-23.2/order_entry/pcus_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/poe_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/pord_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/purchaseOrder.xml  
  inflating: db-sample-schemas-23.2/order_entry/purchaseOrder.xsd  
  inflating: db-sample-schemas-23.2/order_entry/purchaseOrder.xsl  
  inflating: db-sample-schemas-23.2/order_entry/pwhs_v3.sql  
  inflating: db-sample-schemas-23.2/order_entry/xdb03usg.sql  
  inflating: db-sample-schemas-23.2/order_entry/xdbConfiguration.sql  
  inflating: db-sample-schemas-23.2/order_entry/xdbSupport.sql  
  inflating: db-sample-schemas-23.2/order_entry/xdbUtilities.sql  
   creating: db-sample-schemas-23.2/product_media/
  inflating: db-sample-schemas-23.2/product_media/README.md  
  inflating: db-sample-schemas-23.2/product_media/dimm2.mpa  
  inflating: db-sample-schemas-23.2/product_media/dimm2.rm  
  inflating: db-sample-schemas-23.2/product_media/formatted_doc.doc  
  inflating: db-sample-schemas-23.2/product_media/formatted_doc.gif  
  inflating: db-sample-schemas-23.2/product_media/formatted_doc.html  
  inflating: db-sample-schemas-23.2/product_media/formatted_doc.pdf  
  inflating: db-sample-schemas-23.2/product_media/formatted_doc.rtf  
 extracting: db-sample-schemas-23.2/product_media/formatted_doc.txt  
  inflating: db-sample-schemas-23.2/product_media/keyboard.jpg  
  inflating: db-sample-schemas-23.2/product_media/keyboard3106_final.txt  
  inflating: db-sample-schemas-23.2/product_media/keyboard3106_source.txt  
  inflating: db-sample-schemas-23.2/product_media/keyboard_3106.txt  
  inflating: db-sample-schemas-23.2/product_media/keyboard_comp_ad.gif  
  inflating: db-sample-schemas-23.2/product_media/keyboard_comp_ad.html  
  inflating: db-sample-schemas-23.2/product_media/keyboard_comp_ad.jpg  
  inflating: db-sample-schemas-23.2/product_media/keyboard_comp_ad.pdf  
  inflating: db-sample-schemas-23.2/product_media/keyboard_german.txt  
  inflating: db-sample-schemas-23.2/product_media/keyboard_graphic.jpg  
  inflating: db-sample-schemas-23.2/product_media/keyboard_logo.jpg  
  inflating: db-sample-schemas-23.2/product_media/keyboard_photo.jpg  
  inflating: db-sample-schemas-23.2/product_media/long2lob.ctl  
  inflating: db-sample-schemas-23.2/product_media/long2lob.dat  
  inflating: db-sample-schemas-23.2/product_media/long2lob.sql  
  inflating: db-sample-schemas-23.2/product_media/modem.jpg  
  inflating: db-sample-schemas-23.2/product_media/modem2268_final.txt  
  inflating: db-sample-schemas-23.2/product_media/modem2268_source.txt  
  inflating: db-sample-schemas-23.2/product_media/modem_2268.txt  
  inflating: db-sample-schemas-23.2/product_media/modem_comp_ad.gif  
  inflating: db-sample-schemas-23.2/product_media/modem_comp_ad.html  
  inflating: db-sample-schemas-23.2/product_media/modem_comp_ad.jpg  
  inflating: db-sample-schemas-23.2/product_media/modem_comp_ad.pdf  
  inflating: db-sample-schemas-23.2/product_media/modem_german.txt  
  inflating: db-sample-schemas-23.2/product_media/modem_graphic.jpg  
  inflating: db-sample-schemas-23.2/product_media/modem_logo.jpg  
  inflating: db-sample-schemas-23.2/product_media/modem_photo.jpg  
  inflating: db-sample-schemas-23.2/product_media/monitor.jpg  
  inflating: db-sample-schemas-23.2/product_media/monitor2056_final.txt  
  inflating: db-sample-schemas-23.2/product_media/monitor2056_source.txt  
  inflating: db-sample-schemas-23.2/product_media/monitor_3060.doc  
  inflating: db-sample-schemas-23.2/product_media/monitor_3060.rtf  
  inflating: db-sample-schemas-23.2/product_media/monitor_3060.txt  
  inflating: db-sample-schemas-23.2/product_media/monitor_comp_ad.gif  
  inflating: db-sample-schemas-23.2/product_media/monitor_german.txt  
  inflating: db-sample-schemas-23.2/product_media/monitor_graphic.jpg  
  inflating: db-sample-schemas-23.2/product_media/monitor_logo.jpg  
  inflating: db-sample-schemas-23.2/product_media/mousepad.jpg  
  inflating: db-sample-schemas-23.2/product_media/mousepad2056_final.txt  
  inflating: db-sample-schemas-23.2/product_media/mousepad2056_source.txt  
  inflating: db-sample-schemas-23.2/product_media/mousepad_2056.txt  
  inflating: db-sample-schemas-23.2/product_media/mousepad_comp_ad.gif  
  inflating: db-sample-schemas-23.2/product_media/mousepad_comp_ad.html  
  inflating: db-sample-schemas-23.2/product_media/mousepad_comp_ad.jpg  
  inflating: db-sample-schemas-23.2/product_media/mousepad_comp_ad.pdf  
  inflating: db-sample-schemas-23.2/product_media/mousepad_german.txt  
  inflating: db-sample-schemas-23.2/product_media/mousepad_graphic.jpg  
  inflating: db-sample-schemas-23.2/product_media/mousepad_logo.jpg  
  inflating: db-sample-schemas-23.2/product_media/mousepad_photo.jpg  
  inflating: db-sample-schemas-23.2/product_media/pm_analz.sql  
  inflating: db-sample-schemas-23.2/product_media/pm_cre.sql  
  inflating: db-sample-schemas-23.2/product_media/pm_drop.sql  
  inflating: db-sample-schemas-23.2/product_media/pm_main.sql  
  inflating: db-sample-schemas-23.2/product_media/pm_p_lob.ctl  
  inflating: db-sample-schemas-23.2/product_media/pm_p_lob.dat  
  inflating: db-sample-schemas-23.2/product_media/pm_p_lob.sql  
   creating: db-sample-schemas-23.2/sales_history/
  inflating: db-sample-schemas-23.2/sales_history/README.md  
  inflating: db-sample-schemas-23.2/sales_history/costs.csv  
  inflating: db-sample-schemas-23.2/sales_history/customers.csv  
  inflating: db-sample-schemas-23.2/sales_history/promotions.csv  
  inflating: db-sample-schemas-23.2/sales_history/sales.csv  
  inflating: db-sample-schemas-23.2/sales_history/sh_create.sql  
  inflating: db-sample-schemas-23.2/sales_history/sh_install.sql  
  inflating: db-sample-schemas-23.2/sales_history/sh_populate.sql  
  inflating: db-sample-schemas-23.2/sales_history/sh_uninstall.sql  
  inflating: db-sample-schemas-23.2/sales_history/supplementary_demographics.csv  
  inflating: db-sample-schemas-23.2/sales_history/times.csv  

  • 解凍したファイルを確認
[oracle@devdays-23c ~]$ ls
db-sample-schemas-23.2  v23.2.zip
  • sysユーザでPDBに接続
[oracle@devdays-23c ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Wed Apr 10 05:03:25 2024
Version 23.3.0.23.09

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


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 FREEPDB1                       READ WRITE NO

SQL> alter session set container = FREEPDB1;            

Session altered.
  • PDBにインストールする
SQL> @./db-sample-schemas-23.2/human_resources/hr_install.sql

実行ログはこちら
SQL> @./db-sample-schemas-23.2/human_resources/hr_install.sql
Thank you for installing the Oracle Human Resources Sample Schema.
This installation script will automatically exit your database session
at the end of the installation or if any error is encountered.
The entire installation will be logged into the 'hr_install.log' log file.

Enter a password for the user HR: 


Enter a tablespace for HR [USERS]: 
Do you want to overwrite the schema, if it already exists? [YES|no]: 
******  Creating REGIONS table ....

Table created.


Index created.


Table altered.

******  Creating COUNTRIES table ....

Table created.


Table altered.

******  Creating LOCATIONS table ....

Table created.


Index created.


Table altered.


Sequence created.

******  Creating DEPARTMENTS table ....

Table created.


Index created.


Table altered.


Sequence created.

******  Creating JOBS table ....

Table created.


Index created.


Table altered.

******  Creating EMPLOYEES table ....

Table created.


Index created.


Table altered.


Table altered.


Sequence created.

******  Creating JOB_HISTORY table ....

Table created.


Index created.


Table altered.

******  Creating EMP_DETAILS_VIEW view ...

View created.

******  Creating indexes ...

Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.


Index created.

******  Adding table column comments ...

Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Comment created.


Session altered.

****** Populating REGIONS table ....

PL/SQL procedure successfully completed.

****** Populating COUNTRIES table ....

PL/SQL procedure successfully completed.

****** Populating LOCATIONS table ....

PL/SQL procedure successfully completed.

****** Populating DEPARTMENTS table ....

Table altered.


PL/SQL procedure successfully completed.

****** Populating JOBS table ....

PL/SQL procedure successfully completed.

****** Populating EMPLOYEES table ....

PL/SQL procedure successfully completed.

****** Populating JOB_HISTORY table ....

PL/SQL procedure successfully completed.


Commit complete.


Table altered.


Procedure created.


Trigger created.


Trigger altered.


Procedure created.


Trigger created.


Commit complete.


Installation
-------------
Verification:

Table         provided     actual
----------- ---------- ----------
regions              5          5
countries           25         25
departments         27         27
locations           23         23
employees          107        107
jobs                19         19
job_history         10         10

Thank you!
--------------------------------------------------------
The installation of the sample schema is now finished.
Please check the installation verification output above.

You will now be disconnected from the database.

Thank you for using Oracle Database!

Disconnected from Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09


  • 作成したHRユーザでPDBに接続
[oracle@devdays-23c ~]$ sqlplus hr/WelCome123#123#@localhost:1521/freepdb1

SQL*Plus: Release 23.0.0.0.0 - Production on Wed Apr 10 05:09:15 2024
Version 23.3.0.23.09

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


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09
  • HRユーザのテーブルを確認
SQL> select table_name from user_tables;

TABLE_NAME
--------------------------------------------------------------------------------
REGIONS
COUNTRIES
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
JOB_HISTORY

7 rows selected.
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?