手工安装数据库和创建实例


有时候,我们没有xwindows的界面,需要在silent模式下创建数据库,我们可以用如下的方式创建。
下面的例子是以windows xp,oracle 10201版本。
修改安装目录中的response目录下的custom.rsp文件,可以copy一个后修改。
注意下面的#need change!!部分

####################################################################
## Copyright(c) Oracle Corporation 1998,2005. All rights reserved.##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## identifies the variable type.                                  ##
##                                                                ##
## Please specify the values in the following format:             ##
##                                                                ##
##         Type         Example                                   ##
##         String       "Sample Value"                            ##
##         Boolean      True or False                             ##
##         Number       1000                                      ##
##         StringList   {"String value 1","String Value 2"}       ##
##                                                                ##
## The values that are given as
<Value Required> need to be       ##
## specified for a silent installation to be successful.          ##
##                                                                ##
##                                                                ##
## This response file is generated by Oracle Software             ##
## Packager.                                                      ##
####################################################################
 
 
RESPONSEFILE_VERSION=2.2.1.0.0
 
#------------------------------------------------------------------------------
#Name       : FROM_LOCATION
#Datatype   : String
#Description: Complete path to the products.xml.
#Example    : FROM_LOCATION = "../stage/products.xml"
#------------------------------------------------------------------------------
#need change!!
FROM_LOCATION="J:\ora_windows\10G\ora_win_10.2.0.1.0\ora_win_10.2.0.1.0\stage\products.xml"
 
#------------------------------------------------------------------------------
#Name       : NEXT_SESSION_RESPONSE
#Datatype   : String
#Description: Optionally specifies the full path of the next session's response
#             file. If only a file name is specified, the response file is
#             retrieved from the
<TEMP>/oraInstall directory. This variable is
#             only active if NEXT_SESSION is set to true.
#Example: NEXT_SESSION_RESPONSE = "nextinstall.rsp"
#------------------------------------------------------------------------------
NEXT_SESSION_RESPONSE=
<Value Unspecified>
 
#------------------------------------------------------------------------------
#Name       : ORACLE_HOME
#Datatype   : String
#Description: Complete path of the Oracle Home.
#Example    : ORACLE_HOME = "/product/10.2.0/db_1"
#------------------------------------------------------------------------------
#need change!!
ORACLE_HOME="D:\oracle\product\10.2.0\db_1"
 
#------------------------------------------------------------------------------
#Name       : ORACLE_HOME_NAME
#Datatype   : String
#Description: Oracle Home Name. Used in creating folders and services.
#Example    : ORACLE_HOME_NAME = "OraDbHome1"
#------------------------------------------------------------------------------
#need change!!
ORACLE_HOME_NAME="OraDb10g_home1"
 
#------------------------------------------------------------------------------
#Name       : TOPLEVEL_COMPONENT
#Datatype   : StringList
#Description: The top level component to be installed in the current session.
#Example    : TOPLEVEL_COMPONENT = {"oracle.server","10.2.0.1.0"}
#------------------------------------------------------------------------------
TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"}
 
#------------------------------------------------------------------------------
#Name       : DEINSTALL_LIST
#Datatype   : StringList
#Description: List of components to be deinstalled during a deinstall session.
#Example    : DEINSTALL_LIST = {"oracle.server","10.2.0.1.0"}
#------------------------------------------------------------------------------
DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}
 
#------------------------------------------------------------------------------
#Name       : SHOW_SPLASH_SCREEN
#Datatype   : Boolean
#Description: Set to true if the initial splash screen in OUI needs to be
#             shown.
#Example    : SHOW_SPLASH_SCREEN = true
#------------------------------------------------------------------------------
SHOW_SPLASH_SCREEN=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_WELCOME_PAGE
#Datatype   : Boolean
#Description: Set to true if the Welcome page in OUI needs to be shown.
#Example    : SHOW_WELCOME_PAGE = false
#------------------------------------------------------------------------------
SHOW_WELCOME_PAGE=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_NODE_SELECTION_PAGE
#Datatype   : Boolean
#Description: Set to true if the node selection page in OUI needs to be shown.
#
#             This is only relevent when performing an upgrade of Oracle
#             Clusterware.
#
#Example    : SHOW_NODE_SELECTION_PAGE = false
#------------------------------------------------------------------------------
SHOW_NODE_SELECTION_PAGE=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_SUMMARY_PAGE
#Datatype   : Boolean
#Description: Set to true if the summary page in OUI needs to be shown.
#
#             The summary page shows the list of components that will be
#             installed in this session.
#
#Example    : SHOW_SUMMARY_PAGE = true
#------------------------------------------------------------------------------
SHOW_SUMMARY_PAGE=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_INSTALL_PROGRESS_PAGE
#Datatype   : Boolean
#Description: Set to true if the install progress page in OUI needs to be
#             shown.
#
#             This page shows the current status in the installation. The
#             current status includes the product being installed and the file
#             being copied.
#
#Example    : SHOW_INSTALL_PROGRESS_PAGE = true
#------------------------------------------------------------------------------
SHOW_INSTALL_PROGRESS_PAGE=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_CONFIG_TOOL_PAGE
#Datatype   : Boolean
#Description: Set to true if the config assistants page in OUI needs to be
#             shown.
#
#             This page shows the list of configuration assistants that are
#             part of this installation and are configured to launch
#             automatically.  It shows the status of each assistant, including
#             any failures with detailed information on why it failed.
#
#Example    : SHOW_CONFIG_TOOL_PAGE = true
#------------------------------------------------------------------------------
SHOW_CONFIG_TOOL_PAGE=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_XML_PREREQ_PAGE
#Datatype   : Boolean
#Description: This variable determines whether or not to show the prereq page.
#Example    : SHOW_XML_PREREQ_PAGE = true
#------------------------------------------------------------------------------
SHOW_XML_PREREQ_PAGE=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_ROOTSH_CONFIRMATION
#Datatype   : Boolean
#Description: Set to true if the Confirmation dialog asking to run the root.sh
#             script in OUI needs to be shown.
#Example: SHOW_ROOTSH_CONFIRMATION = false
#------------------------------------------------------------------------------
#need change!!
SHOW_ROOTSH_CONFIRMATION=true
 
#------------------------------------------------------------------------------
#Name       : SHOW_END_SESSION_PAGE
#Datatype   : Boolean
#Description: Set to true if the end of session page in OUI needs to be shown.
#
#             This page shows if the installation is successful or not.
#
#Example    : SHOW_END_SESSION_PAGE = true
#------------------------------------------------------------------------------
SHOW_END_SESSION_PAGE=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_EXIT_CONFIRMATION
#Datatype   : Boolean
#Description: Set to true if the confirmation when exiting OUI needs to be shown.
#Example    : SHOW_EXIT_CONFIRMATION = true
#------------------------------------------------------------------------------
SHOW_EXIT_CONFIRMATION=false
 
#------------------------------------------------------------------------------
#Name       : NEXT_SESSION
#Datatype   : Boolean
#Description: Set to true to allow users to go back to the File Locations page
#             for another installation. This flag also needs to be set to true
#             in order to process another response file
#             (see NEXT_SESSION_RESPONSE).
#Example    : NEXT_SESSION = true
#------------------------------------------------------------------------------
NEXT_SESSION=false
 
#------------------------------------------------------------------------------
#Name       : NEXT_SESSION_ON_FAIL
#Datatype   : Boolean
#Description: Set to true to allow users to invoke another session even if
#             current install session has failed. This flag is only relevant
#             if NEXT_SESSION is set to true.
#Example    : NEXT_SESSION_ON_FAIL = true
#------------------------------------------------------------------------------
NEXT_SESSION_ON_FAIL=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_DEINSTALL_CONFIRMATION
#Datatype   : Boolean
#Description: Set to true if deinstall confimation is needed during a deinstall
#             session.
#Example    : SHOW_DEINSTALL_CONFIRMATION = true
#------------------------------------------------------------------------------
SHOW_DEINSTALL_CONFIRMATION=false
 
#------------------------------------------------------------------------------
#Name       : SHOW_DEINSTALL_PROGRESS
#Datatype   : Boolean
#Description: Set to true if deinstall progress is needed during a deinstall
#             session.
#Example    : SHOW_DEINSTALL_PROGRESS = true
#------------------------------------------------------------------------------
SHOW_DEINSTALL_PROGRESS=false
 
#------------------------------------------------------------------------------
#Name       : RESTART_SYSTEM
#Datatype   : Boolean
#Description: Set to true to allow automatic restart of the system, if set to
#             false then installer will exit without restarting, no exit
#             confirmation dialog is shown
#Example    : RESTART_SYSTEM = false
#------------------------------------------------------------------------------
RESTART_SYSTEM=
<Value Unspecified>
 
#------------------------------------------------------------------------------
#Name       : RESTART_REMOTE_SYSTEM
#Datatype   : Boolean
#Description: Set to true to allow automatic restart of the remote systems, if
#             set to false then installer will not restart the remote systems,
#             no exit confirmation dialog is shown
#Example    : RESTART_REMOTE_SYSTEM = false
#------------------------------------------------------------------------------
RESTART_REMOTE_SYSTEM=
<Value Unspecified>
 
#------------------------------------------------------------------------------
#Name       : REMOVE_HOMES
#Datatype   : StringList
#Description: List of the homes to be removed during a deinstall session. Each
#             home is represented by its full path.
#Example    : REMOVE_HOMES = {
<full_path_of_home1>,<full_path_of_home2>, ...}
#------------------------------------------------------------------------------
REMOVE_HOMES=
<Value Unspecified>
 
#------------------------------------------------------------------------------
#Name       : ORACLE_HOSTNAME
#Datatype   : String
#Description: 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).
#
#Example    : ORACLE_HOSTNAME =
#------------------------------------------------------------------------------
ORACLE_HOSTNAME=
<Value Unspecified>
 
#------------------------------------------------------------------------------
#Name       : SHOW_END_OF_INSTALL_MSGS
#Datatype   : Boolean
#Description: Set to true if the text on end of install screen is to be shown.
#             The text is always available under
#             
<Oracle Home>/install/readme.txt.
#Example    : SHOW_END_OF_INSTALL_MSGS = true
#------------------------------------------------------------------------------
SHOW_END_OF_INSTALL_MSGS=false
 
#------------------------------------------------------------------------------
#Name       : CLUSTER_NODES
#Datatype   : StringList
#Description: This variable represents the cluster node names selected by the
#             user for installation.
#Example    : CLUSTER_NODES = {"node1","node2"}
#------------------------------------------------------------------------------
CLUSTER_NODES=
<Value Unspecified>
 
#------------------------------------------------------------------------------
#Name       : COMPONENT_LANGUAGES
#Datatype   : StringList
#Description: Languages in which the components will be installed.
#
#             The following choices are available. The value should contain
#             only one of these choices.
#             en,   : English
#             fr,   : French
#             ar,   : Arabic
#             bn,   : Bengali
#             pt_BR,: Brazilian Portuguese
#             bg,   : Bulgarian
#             fr_CA,: Canadian French
#             ca,   : Catalan
#             hr,   : Croatian
#             cs,   : Czech
#             da,   : Danish
#             nl,   : Dutch
#             ar_EG,: Egyptian
#             en_GB,: English (United Kingdom)
#             et,   : Estonian
#             fi,   : Finnish
#             de,   : German
#             el,   : Greek
#             iw,   : Hebrew
#             hu,   : Hungarian
#             is,   : Icelandic
#             in,   : Indonesian
#             it,   : Italian
#             ja,   : Japanese
#             ko,   : Korean
#             es,   : Latin American Spanish
#             lv,   : Latvian
#             lt,   : Lithuanian
#             ms,   : Malay
#             es_MX,: Mexican Spanish
#             no,   : Norwegian
#             pl,   : Polish
#             pt,   : Portuguese
#             ro,   : Romanian
#             ru,   : Russian
#             zh_CN,: Simplified Chinese
#             sk,   : Slovak
#             sl,   : Slovenian
#             es_ES,: Spanish
#             sv,   : Swedish
#             th,   : Thai
#             zh_TW,: Traditional Chinese
#             tr,   : Turkish
#             uk,   : Ukrainian
#             vi,   : Vietnamese
#
#Example    : COMPONENT_LANGUAGES = {"en"}
#------------------------------------------------------------------------------
COMPONENT_LANGUAGES={"en"}
 
#------------------------------------------------------------------------------
#Name       : INSTALL_TYPE
#Datatype   : String
#Description: Installation type of the component.
#
#             The following choices are available. The value should contain
#             only one of these choices.
#             EE     : Enterprise Edition
#             SE     : Standard Edition
#             Custom : Custom
#Example    : INSTALL_TYPE = "Custom"
#------------------------------------------------------------------------------
INSTALL_TYPE="Custom"
 
#------------------------------------------------------------------------------
#Name       : oracle.server:DEPENDENCY_LIST
#Datatype   : StringList
#Description: List of products that you would like to install.
#
#             The following choices are available. You may specify any
#             combination of these choices.  The components you choose should
#             be specified in the form "
<internal component name>:<version>"
#             Below is a list of components you may specify to install.
#
#             oracle.rdbms:10.2.0.1.0 - Oracle Database 10g
#             oracle.options:10.2.0.1.0 - Enterprise Edition Options
#             oracle.network:10.2.0.1.0 - Oracle Net Services
#             oracle.sysman.console.db:10.2.0.1.0 - Database Control
#             oracle.rdbms.oci:10.2.0.1.0 - Oracle Call Interface (OCI)
#             oracle.precomp:10.2.0.1.0 - Oracle Programmer
#             oracle.xdk:10.2.0.1.0 - Oracle XML Development Kit
#             oracle.sqlplus.isqlplus:10.2.0.1.0 - iSQL*Plus
#
#Example    : DEPENDENCY_LIST = {"oracle.rdbms:10.2.0.1.0"}
#------------------------------------------------------------------------------
oracle.server:DEPENDENCY_LIST={"oracle.rdbms:10.2.0.1.0","oracle.options:10.2.0.1.0","oracle.network:10.2.0.1.0","oracle.sysman.console.db:10.2.0.1.0","oracle.rdbms.oci:10.2.0.1.0","oracle.precomp:10.2.0.1.0","oracle.xdk:10.2.0.1.0","oracle.sqlplus.isqlplus:10.2.0.1.0"}
 
#------------------------------------------------------------------------------
#Name       : oracle.options:DEPENDENCY_LIST
#Datatype   : StringList
#Description: List of Enterprise Edition Options you would like to install.
#
#             The following choices are available. You may specify any
#             combination of these choices.  The components you choose should
#             be specified in the form "
<internal component name>:<version>"
#             Below is a list of components you may specify to install.
#
#             oracle.network.aso:10.2.0.1.0 - Oracle Advanced Security
#             oracle.rdbms.partitioning:10.2.0.1.0 - Oracle Partitioning
#             oracle.sdo:10.2.0.1.0 - Oracle Spatial
#             oracle.rdbms.lbac:10.2.0.1.0 - Oracle Label Security
#             oracle.oraolap:10.2.0.1.0 - Oracle OLAP
#             oracle.rdbms.dmse:10.2.0.1.0 - Oracle Data Mining Scoring Engine
#
#Example    : DEPENDENCY_LIST = {"oracle.rdbms.partitioning:10.2.0.1.0"}
#------------------------------------------------------------------------------
oracle.options:DEPENDENCY_LIST={"oracle.network.aso:10.2.0.1.0","oracle.rdbms.partitioning:10.2.0.1.0","oracle.sdo:10.2.0.1.0","oracle.oraolap:10.2.0.1.0"}
 
#------------------------------------------------------------------------------
#Name       : oracle.network:DEPENDENCY_LIST
#Datatype   : StringList
#Description: List of Oracle Net products you would like to install.
#
#             The following choices are available. You may specify any
#             combination of these choices.  The components you choose should
#             be specified in the form "
<internal component name>:<version>"
#             Below is a list of components you may specify to install.
#
#             oracle.network.listener:10.2.0.1.0 - Oracle Net Listener
#             oracle.network.cman:10.2.0.1.0 - Oracle Connection Manager
#
#Example: DEPENDENCY_LIST = {"oracle.network.listener:10.2.0.1.0"}
#------------------------------------------------------------------------------
oracle.network:DEPENDENCY_LIST={"oracle.network.listener:10.2.0.1.0"}
 
 
###############################################################################
#                                                                             #
# Dialog: PRIVILEGED OPERATING SYSTEM GROUPS                                  #
# ------------------------------------------                                  #
# If you include oracle.rdbms:10.2.0.1.0 in the oracle.server:DEPENDENCY_LIST #
# above, you will need to provide values for the OS groups you wish to grant  #
# OSDBA and OSOPER privileges.                                                #
#                                                                             #
###############################################################################
 
#------------------------------------------------------------------------------
# Name       : s_nameForDBAGrp
# Datatype   : String
# Description: The OS group to be granted OSDBA privileges
#
# Pre-requsites for setting this variable:
#  "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST
#
# Example    : s_nameForDBAGrp = "dba"
#------------------------------------------------------------------------------
s_nameForDBAGrp=""
 
#------------------------------------------------------------------------------
# Name       : s_nameForOPERGrp
# Datatype   : String
# Description: The OS group to be granted OSOPER privileges
#
# Pre-requsites for setting this variable:
#  "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST
#
# Example    : s_nameForDBAGrp = "oper"
#------------------------------------------------------------------------------
s_nameForOPERGrp=""
 
 
###############################################################################
#                                                                             #
# Dialog: CREATE DATABASE                                                     #
# -----------------------                                                     #
# If you include oracle.rdbms:10.2.0.1.0 in the oracle.server:DEPENDENCY_LIST #
# above, and if you choose not to upgrade any existing databases on your      #
# system, you have the option of creating a database, configuring an ASM      #
# instance or installing only software and not performing any configuration.  #
# You can specify which of these options you wish to select using the         #
# the variables listed below.                                                 #
#                                                                             #
###############################################################################
 
#------------------------------------------------------------------------------
# Name       : varSelect
# Datatype   : Number
# Description: Determines the type of configuration to perform for the session.
#
#              This entry should be specified as an number.  The valid values
#              that you can use map to the following options:
#              1 - Create a Database
#              2 - Configure an ASM instance
#              3 - Install Software Only
#
# Pre-requsites for setting this variable:
#  "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST
#  n_performUpgrade=0
#
# Example    : varSelect=1
#------------------------------------------------------------------------------
#need change!!
varSelect=3
 
 
#------------------------------------------------------------------------------
# Name       : s_responseFileName
# Datatype   : String
# Description: Specifies the location of the DBCA response file to use for
#              custom database configuration.
#
#              If you choose to create a database or configure an ASM instance,
#              the Database Configuration Assistant (DBCA) will be launched to
#              allow you to completely customize your database or ASM instance.
#              For example, you can specify the value of any init parameter,
#              size your tablespaces, or create more than one disk group for
#              datafile storage.
#
#              If you wish to do this directly from this silent installation,
#              you can do so by filling out the appropriate values in the DBCA
#              response file located in the response/ directory on the
#              the installation media.  Once this response file has been
#              customized to your needs, you can specify the location of this
#              response file using this variable, and the Custom Install and
#              Custom Configuration will be chained together.
#
# Pre-requsites for setting this variable:
#  "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST
#  varSelect=1 or 2
#  n_performUpgrade=0
#
# Example    : oracle.assistants.server:s_responseFileName="/tmp/dbca.rsp"
#------------------------------------------------------------------------------
oracle.assistants.server:s_responseFileName=
<Value Unspecified>
 
 
###############################################################################
#                                                                             #
# Dialog: UPGRADE AN EXISTING DATABASE                                        #
# ------------------------------------                                        #
# Databases prior to 10.2.0.1.0 may be upgraded after the installation using  #
# the Database Upgrade Assistant.  If you have databases prior to 10g         #
# Release 2 (10.2.0.1.0) on your system, then the installation displays a     #
# dialog allowing you to upgrade one of those databases directly from the     #
# installation.  If any of your databases use ASM for storage, you can choose #
# to upgrade just the ASM instance, just the database, or both.               #
#                                                                             #
###############################################################################
 
#------------------------------------------------------------------------------
# Name       : n_performUpgrade
# Datatype   : Number
# Description: Determines whether to perform an upgrade during the installation
#              or not.
#
#              If n_performUpgrade=1, then an upgrade will be performed at the
#              end of the installation.  In this case, you must also specify
#              the values of one or both of the following:
#              - n_upgradeDB
#              - n_upgradeASM
#
#              IMPORTANT INFO: If n_performUpgrade=0, then an upgrade will not
#              be performed, and you can choose to create a new database using
#              the variables as documented above.  However, if you set
#              n_performUpgrade=0, then use the following values ONLY for the
#              respective variables:
#              - n_upgradeDB=0
#              - s_dbOHSelectedForUpgrade=""
#              - s_dbSIDSelectedForUpgrade=""
#              - n_upgradeASM=0
#              - s_dbSelectedUsesASM="no"
#
# Example    : n_performUpgrade=0
#------------------------------------------------------------------------------
n_performUpgrade=0
 
#------------------------------------------------------------------------------
# Name       : n_upgradeDB
# Datatype   : Number
# Description: Specifies whether the user wishes to perform an upgrade of a
#              database (in addition to or as opposed to upgrading an ASM
#              instance)
#
#              This value must be specified as a number, which maps to the
#              following behavior:
#              1 - Upgrade a database
#              0 - Do Not Upgrade a Database
#
#              If n_upgradeDB=1, then you must also specify values for the
#              following variables:
#              - s_dbOHSelectedForUpgrade
#              - s_dbSIDSelectedForUpgrade
#
# Pre-requsites for setting this variable:
#  n_performUpgrade=1
#
# Example    : n_upgradeDB = 1
#------------------------------------------------------------------------------
n_upgradeDB=0
 
#------------------------------------------------------------------------------
# Name       : s_dbOHSelectedForUpgrade
# Datatype   : String
# Description: Specifies the Oracle Home of the database you wish to upgrade.
#
#              If s_dbOHSelectedForUpgrade is set to something other than "",
#              then you must also specify values for the following variable:
#              - s_dbSelectedUsesASM
#
# Pre-requsites for setting this variable:
#  n_performUpgrade=1
#  n_upgradeDB=1
#
# Example    : s_dbOHSelectedForUpgrade = "/u01/app/oracle/9.2.0/db"
#------------------------------------------------------------------------------
s_dbOHSelectedForUpgrade=""
 
#------------------------------------------------------------------------------
# Name       : s_dbSIDSelectedForUpgrade
# Datatype   : String
# Description: Specifies the SID (for single instance) or database name (for
#              RAC of the database you wish to upgrade.
#
# Pre-requsites for setting this variable:
#  n_performUpgrade=1
#  n_upgradeDB=1
#
# Example    : s_dbSIDSelectedForUpgrade = "orcl"
#------------------------------------------------------------------------------
s_dbSIDSelectedForUpgrade=""
 
#------------------------------------------------------------------------------
# Name       : n_upgradeASM
# Datatype   : Number
# Description: Specifies whether the user wishes to perform an upgrade of the
#              ASM instance (in addition to or as opposed to upgrading a
#              database)
#
#              This value must be specified as a number, which maps to the
#              following behavior:
#              1 - Upgrade ASM
#              0 - Do Not Upgrade ASM
#
# Pre-requsites for setting this variable:
#  n_performUpgrade=1
#
# Example    : n_upgradeASM = 1
#------------------------------------------------------------------------------
n_upgradeASM=0
 
#------------------------------------------------------------------------------
#Name       : s_dbSelectedUsesASM
#Datatype   : Boolean
#Description: "Yes" if db selected uses ASM, else "No"
#Component  : oracle.server
# Pre req:
#  n_performUpgrade=1
#  n_upgradeDB=1
#------------------------------------------------------------------------------
s_dbSelectedUsesASM="no"
 
 
 
###############################################################################
#                                                                             #
# ENTRIES LISTED IN THIS SECTION SHOULD NOT BE MODIFIED.  THEY ARE NEEDED IN  #
# THE RESPONSE FILE FOR PROPER FUNCTIONING OF THE SILENT INSTALLATION, BUT    #
# THEY SHOULD NOT BE MODIFIED.                                                #
#                                                                             #
###############################################################################
 
 
#------------------------------------------------------------------------------
#Name       : sl_upgradableSIDBInstances
#             sl_upgradableRACDBInstances
#Datatype   : Boolean
#Description: Contains the upgradable DB instances
#Component  : oracle.server
#------------------------------------------------------------------------------
############################################
# DO NOT MODIFY THE VALUE OF THIS VARIABLE #
############################################
 
sl_upgradableSIDBInstances={}
sl_upgradableRACDBInstances={}
 
#------------------------------------------------------------------------------
#Name       : n_dbSelection
#Datatype   : Number
#Description: row selected in the spread table of upgradable DB instances
#Component  : oracle.server
#------------------------------------------------------------------------------
############################################
# DO NOT MODIFY THE VALUE OF THIS VARIABLE #
############################################
 
n_dbSelection=0
 
#------------------------------------------------------------------------------
#Name       : b_stateOfUpgradeASMCheckbox
#Datatype   : Boolean
#Description: stores the state of checkbox in UI
#Component  : oracle.server
#------------------------------------------------------------------------------
############################################
# DO NOT MODIFY THE VALUE OF THIS VARIABLE #
############################################
 
b_stateOfUpgradeASMCheckbox=false
 
#------------------------------------------------------------------------------
#Name       : b_stateOfUpgradeDBCheckbox
#Datatype   : Boolean
#Description: stores the state of checkbox in UI
#Component  : oracle.server
#------------------------------------------------------------------------------
############################################
# DO NOT MODIFY THE VALUE OF THIS VARIABLE #
############################################
 
b_stateOfUpgradeDBCheckbox=false

编辑完成后,在命令行输入:

C:\Documents and Settings\hejianmin>cd J:\ora_windows\10G\ora_win_10.2.0.1.0\ora_win_10.2.0.1.0
 
C:\Documents and Settings\hejianmin>j:
 
J:\ora_windows\10G\ora_win_10.2.0.1.0\ora_win_10.2.0.1.0>setup -silent -responseFile C:\custom.rsp

待软件安装完成后,进行创建数据库instance。
先建立相关目录:

mkdir D:\oracle\product\10.2.0\admin\oralocal\adump
mkdir D:\oracle\product\10.2.0\admin\oralocal\bdump
mkdir D:\oracle\product\10.2.0\admin\oralocal\cdump
mkdir D:\oracle\product\10.2.0\admin\oralocal\dpdump
mkdir D:\oracle\product\10.2.0\admin\oralocal\pfile
mkdir D:\oracle\product\10.2.0\admin\oralocal\udump
mkdir D:\oracle\product\10.2.0\db_1\cfgtoollogs\dbca\oralocal
mkdir D:\oracle\product\10.2.0\db_1\database
mkdir D:\oracle\product\10.2.0\flash_recovery_area
mkdir D:\oracle\product\10.2.0\oradata
mkdir D:\oracle\product\10.2.0\oradata\oralocal

在命令行中设置数据库的sid,用oradim建立服务:

set ORACLE_SID=oralocal
 
D:\oracle\product\10.2.0\db_1\bin\oradim.exe -new -sid ORALOCAL -startmode manual -spfile

在命令行中建立密码文件

D:\oracle\product\10.2.0\db_1\bin\orapwd.exe file=D:\oracle\product\10.2.0\db_1\database\PWDoralocal.ora password=change_on_install force=y

新建一个pfile:

vi $ORACLE_HOME/database/initoralocal.ora
##############################################################################
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
##############################################################################
 
###########################################
# NLS
###########################################
nls_language="SIMPLIFIED CHINESE"
nls_territory="CHINA"
 
###########################################
# SGA Memory
###########################################
sga_target=167772160
 
###########################################
# Job Queues
###########################################
job_queue_processes=10
 
###########################################
# Shared Server
###########################################
dispatchers="(PROTOCOL=TCP) (SERVICE=oralocalXDB)"
 
###########################################
# Miscellaneous
###########################################
compatible=10.2.0.1.0
 
###########################################
# Security and Auditing
###########################################
audit_file_dest=D:\oracle\product\10.2.0\admin\oralocal\adump
remote_login_passwordfile=EXCLUSIVE
 
###########################################
# Archive
###########################################
log_archive_format=oralocal_%S_%R_%T.arc
 
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=16777216
 
###########################################
# Database Identification
###########################################
db_domain=""
db_name=oralocal
 
###########################################
# File Configuration
###########################################
control_files=("D:\oracle\product\10.2.0\oradata\oralocal\control01.ctl", "D:\oracle\product\10.2.0\oradata\oralocal\control02.ctl", "D:\oracle\product\10.2.0\oradata\oralocal\control03.ctl")
db_recovery_file_dest=D:\oracle\product\10.2.0\flash_recovery_area
db_recovery_file_dest_size=2147483648
 
###########################################
# Cursors and Library Cache
###########################################
open_cursors=300
 
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_tablespace=UNDOTBS1
 
###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=D:\oracle\product\10.2.0\admin\oralocal\bdump
core_dump_dest=D:\oracle\product\10.2.0\admin\oralocal\cdump
user_dump_dest=D:\oracle\product\10.2.0\admin\oralocal\udump
 
###########################################
# Processes and Sessions
###########################################
processes=150
 
###########################################
# Cache and I/O
###########################################
db_block_size=8192
db_file_multiblock_read_count=16

以下开始手工create instance

sqlplus "/ as sysdba"
 
startup nomount pfile='?/database/initoralocal.ora';
 
#### create database
CREATE DATABASE "oralocal"
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\system01.dbf' SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\sysaux01.dbf' SIZE 300M REUSE
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE 'D:\oracle\product\10.2.0\oradata\oralocal\temp01.dbf' SIZE 20M REUSE
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\undotbs01.dbf' SIZE 200M REUSE
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('D:\oracle\product\10.2.0\oradata\oralocal\redo01.log') SIZE 51200K,
GROUP 2 ('D:\oracle\product\10.2.0\oradata\oralocal\redo02.log') SIZE 51200K,
GROUP 3 ('D:\oracle\product\10.2.0\oradata\oralocal\redo03.log') SIZE 51200K;
 
#### create dbfile
CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE 'D:\oracle\product\10.2.0\oradata\oralocal\users.dbf' SIZE 50M REUSE EXTENT MANAGEMENT LOCAL UNIFORM SIZE 512K SEGMENT SPACE MANAGEMENT  AUTO;
ALTER DATABASE DEFAULT TABLESPACE "USERS";
 
#### create db catalog
connect sys/change_on_install as SYSDBA
set echo on
@?/
rdbms/admin/catalog.sql;
@?/
rdbms/admin/catblock.sql;
@?/
rdbms/admin/catproc.sql;
@?/
rdbms/admin/catoctk.sql;
@?/
rdbms/admin/owminst.plb;
 
connect SYSTEM/manager
@?/
sqlplus/admin/pupbld.sql;
@?/
sqlplus/admin/help/hlpbld.sql helpus.sql;
 
#### create jserver
connect sys/change_on_install as SYSDBA
set echo on
@?/
javavm/install/initjvm.sql;
@?/
xdk/admin/initxml.sql;
@?/
xdk/admin/xmlja.sql;
@?/
rdbms/admin/catjava.sql;
@?/
rdbms/admin/catexf.sql;
 
#### create odm
@?/
rdbms/admin/dminst.sql SYSAUX TEMP;
 
#### create context
connect sys/change_on_install as SYSDBA
set echo on
@?/
ctx/admin/catctx change_on_install SYSAUX TEMP NOLOCK;
connect CTXSYS/change_on_install
@?/
ctx/admin/defaults/dr0defin.sql "AMERICAN";
 
#### create xdb_protocol
conn / as sysdba
@?/
rdbms/admin/catqm.sql change_on_install SYSAUX TEMP;
@?/
rdbms/admin/catxdbj.sql;
@?/
rdbms/admin/catrul.sql;
 
#### create ordinst
conn / as sysdba
set echo on
@?/
ord/admin/ordinst.sql SYSAUX SYSAUX;
 
#### create interMedia
conn / as sysdba
set echo on
@?/
ord/im/admin/iminst.sql;
 
#### create cwmlite
@?/
olap/admin/olap.sql SYSAUX TEMP;
 
#### create spatial
@?/
md/admin/mdinst.sql;
 
#### postDBCreation
conn / as sysdba
set echo on
create spfile from pfile;
shutdown immediate;
connect / as sysdba
startup;
execute utl_recomp.recomp_serial();

至此,数据库创建完毕。

· 【文章发布信息】发表于: 2008-11-11 @ 15:03:44 · ||分类: ..experience, Working case

3 条评论 »

  1. NetFire(Fire.Rolland.Han) 于 2008-11-11 @ 17:52:49 留言

    好东西,mark
    Linux和Solaris应该同理可用

  2. 小荷 于 2008-11-11 @ 18:01:09 留言

    注,windows下还需要手工添加注册表项:HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE->KEY_OraDb10g_home1->新建字符串值:ORACLE_SID,值为oralocal。
    如没加该项,需要每次在sqlplus “/ as sysdba”之前需要手工的set ORACLE_SID。

  3. orphean 于 2008-11-12 @ 16:19:49 留言

    好东西!!!

RSS 为此帖反馈评论 · 反向跟踪 网站

留条评论