Wednesday 2 January 2019

Oracle Database Configuration Assistant DBCA - Silent Mode

Oracle DBCA Silent Mode 

This article demonstrates how to create a new database using the Database Configuration Assistant (DBCA) in silent mode.

Response File

Response files provide all the answers to the questions normally asked by the Database Configuration Assistant (DBCA). You can find a sample DBCA response file under the ORACLE_HOME ($ORACLE_HOME/assistants/dbca/dbca.rsp). 

1. Copy source RDBMS software:
1.1 On the source database server:

Copy the source oracle database home
cd /u01/app/oracle/product
Example:
tar -cvzf /scratch/db_source/OH.tar.gz 11.2.0.4

1.2 On the target database server:

Example:
cd /u02/app/oracle/product
 tar -xvzf /scratch/db_source/OH.tar.gz

2. Clone the Target Oracle home:
cd $ORACLE_HOME/clone/bin
 perl clone.pl ORACLE_HOME="<target_home>" ORACLE_HOME_NAME="<unique_home_name>" ORACLE_BASE="<path_for_ORACLE_BASE>" OSDBA_GROUP=<OSDBA_privileged_group> OSOPER_GROUP=<OSOPER_privileged_group>
Example:
perl clone.pl ORACLE_HOME="/u02/app/oracle/product/11.2.0.4/test_db" ORACLE_HOME_NAME="test_db" ORACLE_BASE="/u02/app/oracle" OSDBA_GROUP=dba OSOPER_GROUP=oinstall

3. DBCA in Silent  Mode:
Edit the response file(.rsp)  as per the Target database:
Set the below parameters specific to target database.
GDBNAME
SID
SYSPASSWORD
SYSTEMPASSWORD
DATAFILEDESTINATION
RECOVERYAREADESTINATION
STORAGETYPE
DISKGROUPNAME
RECOVERYGROUPNAME
CHARACTERSET
NATIONALCHARACTERSET
MEMORYPERCENTAGE
Below is an example of database creation using dbca silent install mode for db_source database.
Example:
[oracle@exadatahost- bin]$ ./dbca -silent -responseFile /u02/app/oracle/product/11.2.0.4/test_db/assistants/dbca/dbca_test_db.rsp
Copying database files
1% complete
3% complete
10% complete
17% complete
24% complete
35% complete
Creating and starting Oracle instance
37% complete
42% complete
47% complete
52% complete
53% complete
56% complete
58% complete
Registering database with Oracle Restart
64% complete
Completing Database Creation
68% complete
71% complete
75% complete
76% complete
77% complete
78% complete
79% complete
80% complete
90% complete
100% complete
Look at the log file "/u02/app/oracle/cfgtoollogs/dbca/test_db/test_db.log" for further details.

4. Set Init Parameters in target :

Compare init parameters in source database  and update them in target database.