最近准备对之前学习SQL*Loader的笔记进行整理,希望通过官方文档中的示例学习(Case Studies)来进行,但是官方文档中示例学习相关的脚本文件在数据库软件安装完成之后默认并没有提供,而是整合在另外一个安装介质中,需通过安装Oracle Examples介质来获取相应的示例学习脚本。
数据库示例(Oracle Database Examples)包含了一系列的示例脚本和产品功能演示的Schema信息,在学习Oracle数据库的过程中可以通过这些示例更好的掌握数据库相关的选项和功能特性。关于Oracle的示例Schema,更详细的说明可以参考官方文档:Database Sample Schemas
根据我的数据库版本,需要下载Oracle 11g R2对应的examples安装介质。如果数据库版本是11.2.0.1
,则可以到官网上进行下载示例安装介质:Oracle Database 11g Release 2 Examples。本文使用的数据库版本为11.2.0.4
,相应的examples安装介质可通过Oracle MOS上进行获取,根据11.2.0.4
的Patch说明,对应的examples安装介质为:p13390677_112040_platform_6of7.zip。
安装准备
首先上传对应压缩包p13390677_112040_platform_6of7.zip到相应的目录下。
# rz
rz waiting to receive.
Upload Zmodem
p13390677_112040_Linux-x86-64_6of7.zip (465.75 MB, 0:10 min = 46.57 MB/sec)
对压缩包进行解压,将文件放在/tmp
目录下。
# unzip p13390677_112040_Linux-x86-64_6of7.zip -d /tmp/
# ls /tmp/examples/
install readme.html response runInstaller stage welcome.html
变更安装文件的属主和属组。
# chown -R oracle.oinstall /tmp/examples/
# ls -ld /tmp/examples/
drwxr-xr-x 5 oracle oinstall 109 Aug 27 2013 /tmp/examples/
查看安装介质解压后的文件结构,Oracle Database Examples可以使用Oracle Installer软件安装器进行安装,其中安装种类可以通过图形界面或是静默安装的方式,为了更快速的完成安装,这里通过静默安装,同时需要结合response响应文件指定安装选项。
准备响应文件
安装介质中提供了一个响应文件模板,位于response目录下。
$ ls /tmp/examples/response/
demos_install.rsp
查看响应文件对应的文件内容,其中有各个选项的说明。
$ cat /tmp/examples/response/demos_install.rsp
###############################################################################
## Copyright(c) Oracle Corporation 1998,2013. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
###############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_demosinstall_response_schema_v11_2_0
#-------------------------------------------------------------------------------
# This variable holds the hostname of the system as set by the user.
# It can be used to force the installation to use an alternative
# hostname rather than using the first hostname found on the system
# (e.g., for systems with multiple hostnames and network interfaces).
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=
#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=
#-------------------------------------------------------------------------------
# Inventory location.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=
#-------------------------------------------------------------------------------
# Languages in which the components will be installed.
#
# en : English ja : Japanese
# fr : French k