Creation of database using response file
Before creation of database we need to create the listener using the netca.rsp file.
1) Create the netca.rsp file with below content.
******************************************************
[GENERAL]
RESPONSEFILE_VERSION=”11.2″
CREATE_TYPE=”CUSTOM”
#—————————————————–
# Name : SHOW_GUI
# Datatype : Boolean
# Description: This variable controls appearance/suppression of the NetCA GUI,
# Pre-req : N/A
# Default : TRUE
# Note:
# This must be set to false in order to run NetCA in silent mode.
# This is a substitute of “/silent” flag in the NetCA command line.
# The command line flag has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#—————————————————
#SHOW_GUI=false
#—————————————————
# Name : LOG_FILE
# Datatype : String
# Description: If present, NetCA will log output to this file in addition to the
# standard out.
# Pre-req : N/A
# Default : NONE
# Note:
# This is a substitute of “/log” in the NetCA command line.
# The command line argument has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#—————————————————
#LOG_FILE=””/oracle11gHome/network/tools/log/netca.log””
[oracle.net.ca]
#INSTALLED_COMPONENTS;StringList;list of installed components
# The possible values for installed components are:
# “net8″,”server”,”client”,”aso”, “cman”, “javavm”
INSTALLED_COMPONENTS={“server”,”net8″,”javavm”}
#INSTALL_TYPE;String;type of install
# The possible values for install type are:
# “typical”,”minimal” or “custom”
INSTALL_TYPE=””typical””
#LISTENER_NUMBER;Number;Number of Listeners
# A typical install sets one listener
LISTENER_NUMBER=1
#LISTENER_NAMES;StringList;list of listener names
# The values for listener are:
# “LISTENER”,”LISTENER1″,”LISTENER2″,”LISTENER3″, …
# A typical install sets only “LISTENER”
LISTENER_NAMES={“LISTENER”}
#LISTENER_PROTOCOLS;StringList;list of listener addresses (protocols and parameters separated by semicolons)
# The possible values for listener protocols are:
# “TCP;1521″,”TCPS;2484″,”NMP;ORAPIPE”,”IPC;IPCKEY”,”VI;1521″
# A typical install sets only “TCP;1521”
LISTENER_PROTOCOLS={“TCP;1521”}
#LISTENER_START;String;name of the listener to start, in double quotes
LISTENER_START=””LISTENER””
#NAMING_METHODS;StringList;list of naming methods
# The possible values for naming methods are:
# LDAP, TNSNAMES, ONAMES, HOSTNAME, NOVELL, NIS, DCE
# A typical install sets only: “TNSNAMES”,”ONAMES”,”HOSTNAMES”
# or “LDAP”,”TNSNAMES”,”ONAMES”,”HOSTNAMES” for LDAP
NAMING_METHODS={“TNSNAMES”,”ONAMES”,”HOSTNAME”}
#NOVELL_NAMECONTEXT;String;Novell Directory Service name context, in double quotes
# A typical install does not use this variable.
#NOVELL_NAMECONTEXT = “”NAMCONTEXT””
#SUN_METAMAP;String; SUN meta map, in double quotes
# A typical install does not use this variable.
#SUN_METAMAP = “”MAP””
#DCE_CELLNAME;String;DCE cell name, in double quotes
# A typical install does not use this variable.
#DCE_CELLNAME = “”CELL””
#NSN_NUMBER;Number;Number of NetService Names
# A typical install sets one net service name
NSN_NUMBER=1
#NSN_NAMES;StringList;list of Net Service names
# A typical install sets net service name to “EXTPROC_CONNECTION_DATA”
NSN_NAMES={“EXTPROC_CONNECTION_DATA”}
#NSN_SERVICE;StringList;Oracle11g database’s service name
# A typical install sets Oracle11g database’s service name to “PLSExtProc”
NSN_SERVICE={“PLSExtProc”}
#NSN_PROTOCOLS;StringList;list of coma separated strings of Net Service Name protocol parameters
# The possible values for net service name protocol parameters are:
# “TCP;HOSTNAME;1521″,”TCPS;HOSTNAME;2484″,”NMP;COMPUTERNAME;ORAPIPE”,”VI;HOSTNAME;1521″,”IPC;IPCKEY”
# A typical install sets parameters to “IPC;EXTPROC”
NSN_PROTOCOLS={“TCP;HOSTNAME;1521”}
*******************************************************
2) Install the listener using the response file generated above
cd $ORACLE_HOME/bin
[oracle@node2 bin]$ ./netca -silent -responseFile /u01/SOFTWARE/netca.rsp
Parsing command line arguments:
Parameter “silent” = true
Parameter “responsefile” = /u01/SOFTWARE/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/11.1.0/dbhome_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
Now listener is installed successfully.
******** Creation of database using the dbca.rsp file in silent mode ******************
1) Create the dbca.rsp file with below content.
RESPONSEFILE_VERSION = “11.2.0”
OPERATION_TYPE = “createDatabase”
GDBNAME = “mydb.oracle.com”
SID = “mydb”
TEMPLATENAME = “General_Purpose.dbc”
SYSPASSWORD = “Mydb#1234”
SYSTEMPASSWORD = “Mydb#1234”
SYSMANPASSWORD = “Mydb#1234”
DBSNMPPASSWORD = “Mydb#1234”
CHARACTERSET = “US7ASCII”
NATIONALCHARACTERSET= “UTF8”
LISTENERS = “LISTENER”
MEMORYPERCENTAGE = “50”
DATABASETYPE = “DATA_WAREHOUSING”
AUTOMATICMEMORYMANAGEMENT = “TRUE”
TOTALMEMORY = “500”
2) export the variables like SID,ORACLE_HOME,ORACLE_BASE,TNS_ADMIN
[oracle@node2 bin]$ export ORACLE_HOME=/u01/app/oracle/product/11.1.0/dbhome_1
[oracle@node2 bin]$ export ORACLE_SID=mydb
[oracle@node2 bin]$ export ORACLE_BASE=/u01/app/oracle
[oracle@node2 bin]$ export TNS_ADMIN=/u01/app/oracle/product/11.1.0/dbhome_1/network/admin
3) Create the database using the dbca in silent mode
[oracle@node2 bin]$ ./dbca -silent -responseFile /u01/SOFTWARE/database/response/dbca.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file “/u01/app/oracle/cfgtoollogs/dbca/mydb/mydb.log” for further details.
Creation of database using the dbca.rsp is completed. It took less than 5 mins.
[oracle@node2 bin]$ ./sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sat Mar 5 00:32:06 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
——— ——————–
MYDB READ WRITE