Tuesday 3 December 2013

Create Oracle database -- GUI and Response file



To use DBCA to create the Oracle database.
• Use DBCA GUI mode
• Use Response file with DBCA
• Post configuration for adding Oracle auto start after host reboot

Use GUI

 
 

















 

Use response file
dbca -silent -responseFile
 
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "oradb1.shilpa.localdomain"
SID = "oradb1"
EMCONFIGURATION = "LOCAL"
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "XXXX"
SYSTEMPASSWORD = "XXXX"
EMCONFIGURATION = "LOCAL"
SYSMANPASSWORD = "XXXX"
DBSNMPPASSWORD = "XXXX"
DATAFILEDESTINATION =
#RECOVERYAREADESTINATION=
STORAGETYPE=FS
DISKGROUPNAME=DATA
CHARACTERSET = "WE8MSWIN1252"
NATIONALCHARACTERSET= "AL16UTF16"
LISTENERS = "LISTENER_oracledb1"
INITPARAMS = DB_CREATE_FILE_DEST=/u01/app/oracle/oradata/oracledb1,LOCAL_LISTENER=LISTENER_oracledb1
SAMPLESCHEMA=TRUE
MEMORYPERCENTAGE = "40"
DATABASETYPE = "MULTIPURPOSE"
AUTOMATICMEMORYMANAGEMENT = "TRUE"
#TOTALMEMORY = "800"


 
Tips:
• Because I want to use the Named Listener, so I need to add the LOCAL_LISTENER parameter
• The listener name is not case sensitive so even I set the LISTENERS = "LISTENER_oracledb1", the DBCA would add the LISTENER_ORACLEDB1 in the tnsname.ora .
• For OMF, the DB_CREATE_FILE_DEST must set for /u01/app/oracle/oradata/oracledb1 and can not set for /u01/app/oracle/oradata . The extra oracledb1 is necessary. Otherwise, I would get the below error:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: control file could not be created
ORA-00202: control file: '/u01/app/oracle/oradata/oracledb1/control01.ctl'
ORA-27040: file create error, unable to create file

Update ( 2/4): Oracle instance would set the DB_NAME parameter base on the SID. However, the DB_NAME has restriction for 8 characters. Therefore, if the SID name is oracledb1, the DB_NAME would be oracledb. Also if we want to implement the Oracle stream, the DB_DOMAIN is necessary in the parameter. Therefore, I have to change the responds file to accommodate the requirement
 


 
The Enterprise manager is also configure properly.

Update ( 2/4): I often get the dbca create database fail with below error in the log.
ORA-00202: control file: '/u01/app/oracle/fast_recovery_area/oradb2/control02.ctl'
ORA-27040: file create error, unable to create file

 
The permission is indeed set up properly, but some how the dbca fail to create the folder. I just need to manually create the folder first and re run the dbca. 

No comments:

Post a Comment