Oracle 11g R2 Sample Schemas 安装
最近准备对之前学习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 ko : Korean
# ar : Arabic es : Latin American Spanish
# bn : Bengali lv : Latvian
# pt_BR: Brazilian Portuguese lt : Lithuanian
# bg : Bulgarian ms : Malay
# fr_CA: Canadian French es_MX: Mexican Spanish
# ca : Catalan no : Norwegian
# hr : Croatian pl : Polish
# cs : Czech pt : Portuguese
# da : Danish ro : Romanian
# nl : Dutch ru : Russian
# ar_EG: Egyptian zh_CN: Simplified Chinese
# en_GB: English (Great Britain) sk : Slovak
# et : Estonian sl : Slovenian
# fi : Finnish es_ES: Spanish
# de : German sv : Swedish
# el : Greek th : Thai
# iw : Hebrew zh_TW: Traditional Chinese
# hu : Hungarian tr : Turkish
# is : Icelandic uk : Ukrainian
# in : Indonesian vi : Vietnamese
# it : Italian
#
# all_langs : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
#-------------------------------------------------------------------------------
ORACLE_HOME=
#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
#-------------------------------------------------------------------------------
ORACLE_BASE=
#------------------------------------------------------------------------------
# Specify the auto-updates option. It can be one of the following:
# - MYORACLESUPPORT_DOWNLOAD
# - OFFLINE_UPDATES
# - SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=
#------------------------------------------------------------------------------
# In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
# the updates are to be downloaded.
# In case OFFLINE_UPDATES option is chosen, specify the location where the updates
# are present.
#------------------------------------------------------------------------------
oracle.installer.autoupdates.downloadUpdatesLoc=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username which has the patches download privileges
# to be used for software updates.
# Example : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
#------------------------------------------------------------------------------
# Specify the Proxy server name. Length should be greater than zero.
#
# Example : PROXY_HOST=proxy.domain.com
#------------------------------------------------------------------------------
PROXY_HOST=
#------------------------------------------------------------------------------
# Specify the proxy port number. Should be Numeric and at least 2 chars.
#
# Example : PROXY_PORT=25
#------------------------------------------------------------------------------
PROXY_PORT=
#------------------------------------------------------------------------------
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_USER=username
#------------------------------------------------------------------------------
PROXY_USER=
#------------------------------------------------------------------------------
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_PWD=password
#------------------------------------------------------------------------------
PROXY_PWD=
#------------------------------------------------------------------------------
# Specify the proxy realm.
#
# Example : PROXY_REALM=metalink
#------------------------------------------------------------------------------
PROXY_REALM=
可以对模版响应文件进行简化处理,去掉相应的注释内容和空行,复制生成一份响应文件dbabd_demos_install.rsp,关于响应文件中选项的设置可以参考另一篇博文关于响应文件的部分说明:CentOS 7静默安装Oracle 11g R2数据库软件
$ cat /tmp/examples/response/demos_install.rsp | grep -v '^$' | grep -v '^#' > /tmp/examples/response/dbabd_demos_install.rsp
$ cat /tmp/examples/response/dbabd_demos_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_demosinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=dbabd
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/data/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/data/app/oracle
oracle.installer.autoupdates.option=
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
执行静默安装
响应文件完成之后就可以进行静默安装了,需要使用oracle
用户进行安装。
# su - oracle
$ cd /tmp/examples/
$ /tmp/examples/runInstaller -silent -force -ignorePrereq -ignoreSysPrereqs -responseFile /tmp/examples/response/dbabd_demos_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 36731 MB Passed
Checking swap space: must be greater than 150 MB. Actual 5103 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-05-18_08-54-52PM. Please wait ...
You can find the log of this install session at:
/data/app/oraInventory/logs/installActions2019-05-18_08-54-52PM.log
The installation of Oracle Database 11g Examples was successful.
Please check '/data/app/oraInventory/logs/silentInstall2019-05-18_08-54-52PM.log' for more details.
Successfully Setup Software.
通过简要的安装信息可以看出安装成功,如果需要详细的日志信息可以查询提示信息中涉及的日志文件。
完成安装
至此,关于数据库示例(Oracle Database Examples)对应的安装介质就安装完成了。通过查看目录$ORACLE_HOME/rdbms/demo
下的以ulcase命名的一系列文件就是Oracle针对SQL*Loader示例学习文件。在没有安装之前,这个目录下是没有文件的。
$ cd $ORACLE_HOME/rdbms/demo
$ ls ulcase*
ulcase10.ctl ulcase11.sql ulcase2.dat ulcase4.dat ulcase5.sql ulcase7.ctl ulcase8.ctl ulcase92.dat ulcase96.dat
ulcase10.sql ulcase1.ctl ulcase3.ctl ulcase4.sql ulcase6.ctl ulcase7.dat ulcase8.dat ulcase93.dat ulcase9.ctl
ulcase11.ctl ulcase1.sql ulcase3.sql ulcase5.ctl ulcase6.dat ulcase7e.sql ulcase8.sql ulcase94.dat ulcase9.sql
ulcase11.dat ulcase2.ctl ulcase4.ctl ulcase5.dat ulcase6.sql ulcase7s.sql ulcase91.dat ulcase95.dat ulcase.sh
其中ulcase.sh的内容如下:
$ cat ulcase.sh
#!/bin/sh
#
# $Header: ulcase.sh 06-sep-2007.13:54:17 jstenois Exp $
#
# ulcase.sh
#
# Copyright (c) 1999, 2007, Oracle. All rights reserved.
#
# NAME
# ulcase.sh - run sqlldr demos
#
# DESCRIPTION
# Shell script to run sqlldr demos.
# Please append to script as more ulcase* demos are added.
#
# MODIFIED (MM/DD/YY)
# jstenois 09/06/07 - remove password from demo script
# krich 01/26/04 - adding case study 11
# cmlim 07/20/99 - create shell script for running all sqlldr demos
# cmlim 07/20/99 - Creation
#
echo " "
echo "- This script runs through all of the SQL Loader demos."
echo "- It uses SQLPlus to create the necessary objects and then"
echo "- calls SQL Loader to load data. This script uses schema"
echo "- SCOTT for all of the tests. Whenever the script executes"
echo "- SQLPlus or SQL Loader utilities, it will prompt you for"
echo "- password of the SCOTT user. You will need to enter this"
echo "- password every time for the script to continue. The"
echo "- default password for user SCOTT is TIGER."
echo " "
# CASE1
echo " "
echo " Starting case 1"
echo " Calling SQL Plus to do setup for case 1"
sqlplus scott @ulcase1
echo " Calling SQL Loader to load data for case 1"
sqlldr scott ulcase1.ctl
# CASE2
echo " "
echo " Starting case 2"
echo " Calling SQL Loader to load data for case 2"
sqlldr scott ulcase2
# CASE3
echo " "
echo " Starting case 3"
echo " Calling SQL Plus to do setup for case 3"
sqlplus scott @ulcase3
echo " Calling SQL Loader to load data for case 3"
sqlldr scott ulcase3
# CASE4
echo " "
echo " Starting case 4"
echo " Calling SQL Plus to do setup for case 4"
sqlplus scott @ulcase4
echo " Calling SQL Loader to load data for case 4"
sqlldr scott ulcase4
# CASE5
echo " "
echo " Starting case 5"
echo " Calling SQL Plus to do setup for case 5"
sqlplus scott @ulcase5
echo " Calling SQL Loader to load data for case 5"
sqlldr scott ulcase5
# CASE6
echo " "
echo " Starting case 6"
echo " Calling SQL Plus to do setup for case 6"
sqlplus scott @ulcase6
echo " Calling SQL Loader to load data for case 6"
sqlldr scott ulcase6 direct=true
# CASE7
echo " "
echo " Starting case 7"
echo " Calling SQL Plus to do setup for case 7"
sqlplus scott @ulcase7s
echo " Calling SQL Loader to load data for case 7"
sqlldr scott ulcase7
echo " Calling SQL Plus to do cleanup for case 7"
sqlplus scott @ulcase7e
# CASE8
echo " "
echo " Starting case 8"
echo " Calling SQL Plus to do setup for case 8"
sqlplus scott @ulcase8
echo " Calling SQL Loader to load data for case 8"
sqlldr scott ulcase8
# CASE9
echo " "
echo " Starting case 9"
echo " Calling SQL Plus to do setup for case 9"
sqlplus scott @ulcase9
echo " Calling SQL Loader to load data for case 9"
sqlldr scott ulcase9
# CASE10
echo " "
echo " Starting case 10"
echo " Calling SQL Plus to do setup for case 10"
sqlplus scott @ulcase10
echo " Calling SQL Loader to load data for case 10"
sqlldr scott ulcase10
# CASE11
echo " "
echo " Starting case 11"
echo " Calling SQL Plus to do setup for case 11"
sqlplus scott @ulcase11
echo " Calling SQL Loader to load data for case 11"
sqlldr scott ulcase11
参考
https://docs.oracle.com/cd/E11882_01/server.112/e10831/toc.htm
https://docs.oracle.com/cd/E11882_01/install.112/e24501/toc.htm#BABGFCIH
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html
☆〖本人水平有限,文中如有错误还请留言批评指正!〗☆
Oracle 11g R2 Sample Schemas 安装的更多相关文章
- CentOS5.5 正式开始安装 Oracle 11g r2(图形界面安装)
一.下载oracle 官方网站, 可以下载最新版本 Oracle Database 11g Release http://www.oracle.com/index.html CentOS5. i386 ...
- oracle 11g R2(静默安装)
参考博客地址:https://blog.csdn.net/jameshadoop/article/details/48223645 https://www.abcdocker.com/abcdocke ...
- [转]Oracle 11g R2 RAC高可用连接特性 – SCAN详解
原文地址:http://czmmiao.iteye.com/blog/2124373 昨天帮朋友解决11g RAC SCAN问题,当时为这朋友简单解答了一些SCAN特性相关的问题,但我知道这仅仅是 ...
- CentOS 7 下oracle 11G R2 ADG 搭建
本文记录ADG搭建操作步骤,首先在虚拟机CentOS中安装并配置好oracle 11g R2(具体安装步骤在我的另一篇博客中),然后拷贝一份虚拟机,修改新虚拟机的主机名和ip配置,这时候主库和备库是一 ...
- Oracle Linux 6.3下安装Oracle 11g R2(11.2.0.3)
本文主要描写叙述了在Oracle Linux 6.3下安装Oracle 11gR2(11.2.0.3).从Oracle 11g開始,Oracle官方站点不再提供其Patch的下载链接,须要使用Meat ...
- 【转载】Oracle 11g R2 for Win7旗舰版(64位)- 安装
免责声明: 本文转自网络文章,转载此文章仅为个人收藏,分享知识,如有侵权,请联系博主进行删除. 原文作者:bluepoint2009 原文地址:http://www.cnbl ...
- Oracle 11g R2 for Win7旗舰版(64位)的安装步骤
1.下载Oracle 11g R2 for Windows的版本 下载地址:http://www.oracle.com/technetwork/database/enterprise-edition/ ...
- windows 7 64位 安装oracle 11g R2
1.下载Oracle 11g R2 for Windows的版本 下载地址: http://www.oracle.com/technetwork/database/enterprise-edition ...
- ORACLE 11g R2数据库安装硬件环境要求
物理内存要求:最小1G,在windows7,windows8,windows8.1上最小2G. 虚拟内存(或分页空间)容量要求: Available RAM Swap Space Required B ...
随机推荐
- Java学习笔记(2)--- 对象和类入门,java包,this 和 super区别
1.对象和类(Object and class): 一个 Java 程序可以认为是一系列对象的集合,而这些对象通过调用彼此的方法来协同工作. 面对对象编程是java非常重要的一部分,作者本身之前学过c ...
- 卷积层输出feature maps尺寸的计算
默认feature maps的宽和高相等. 常规卷积 输入的feature maps尺寸为i,卷积核的尺寸为k,stride为s,padding为p,则输出的feature maps的尺寸o为 当pa ...
- python如何实现元素等待
一.为什么要元素等待? 在UI自动化过程中,元素的出现受网络环境.设备性能等多种元素影响.因此,元素加载和脚本运行到该元素的时间不一致,会报错:元素无法定位. 简单举下例子:实际UI自动化测试中,点击 ...
- Octave教程
Windows安装Octave http://wiki.octave.org/Octave_for_Microsoft_Windows 基本操作(Basic Operations) octave:1& ...
- jquery ajax 重写
(function($){ //备份jquery的ajax方法 var _ajax=$.ajax; //重写jquery的ajax方法 $.ajax=function(opt){ //备份opt中er ...
- VS2017项目升级 error LNK2005: "public: __thiscall ATL::CTime::
我是将项目升级到从VS2012 升级VS2017, 报错如下 1>atlsd.lib(atltime.obj) : error LNK2005: "public: __thiscall ...
- 物联网架构成长之路(46)-Rancher部署应用入门
0.前言 上一篇已经安装好Rancher了,这一篇主要是简单的操作一下Rancher,了解一些常用功能.1.集群信息 选择对应的集群,查看对应集群信息. 还可以执行kubectl命令,命令可以参考前几 ...
- Java连载8-基本数据类型2
一.基本数据类型 1.字符串“abc”不属于基本数据类型,属于引用数据类型 2. 基本数据类型 占用空间大小(单位:字节) byte 1 short ...
- 快速入门:Python简单实例100个(入门完整版)
Python3 100例 文章目录 Python3 100例 实例001:数字组合 实例002:“个税计算” 实例003:完全平方数 实例004:这天第几天 实例005:三数排序 实例006:斐波那契 ...
- TensofFlow函数: tf.image.crop_and_resize
tf.image.crop_and_resize( image, boxes, box_ind, crop_size, method='bilinear', extrapolation_value=0 ...