Saturday, February 2, 2013

0 Create Oracle database with DBCA

This article describe how to use DBCA to create the Oracle database.

  • Use DBCA GUI mode
  • Use Responds file with DBCA
  • Post configuration for adding Oracle auto start after host reboot

 

Use GUI

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

Use responds file

 dbca -silent -responseFile <response file> 

image

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

Here is the contents of the responds 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.

[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "oradb1.panda1.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"

image

The Enterprise manager is also configure properly.

image

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

image

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.

 

Post configuration:  Add Oracle auto start after host reboot

Refer here for more detail.

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates