Database Configuration Assistant (DBCA) is a Java based GUI tool which is very useful to create, configure and drop databases. From 10g R2, this has been enhanced to manage the Automatic Storage Management (ASM) instance.
1. Log on to your computer as a member of the administrative group that is authorized to install Oracle software and create and run the database.
2. To launch DBCA on a Windows operating system, click Start and then select Programs, Oracle - home_name, Configuration and Migration Tools, and then Database Configuration Assistant.
To launch the DBCA on UNIX, or as another method on a Windows operating system, enter the following command at a system prompt:
The dbca utility is typically located in ORACLE_HOME/bin.
3. The Welcome window appears.
Click Next to continue. The DBCA Operations window appears.
This is the most commonly used option. Database Configuration Assistant (DBCA) is the preferred way to create a database, because it is a more automated approach, and your database is ready to use when DBCA completes. Furthermore, creating or deleting a database with DBCA automatically takes cares of the Oracle Restart configuration that was introduced with 11gR2.
To create a database using DBCA:
Step1 - Start DBCA as described in "Starting DBCA".
In the Operations window, select Create a Database and click Next to start the guided workflow for creating a database. The workflow requests your input in the following windows:
Step 2 - Database Templates -- Select the type of database to create (General / Transactional /Data Warehouse).
Step 3 - Database Identification -- Setting the Global Database Name and the SID.
Step 4 - Management Options -- Option to Register with Grid Control / Configure Database Control.
Step 5 - Database Credentials -- Setting Passwords for the Administrative accounts.
Step 6 - Database File Locations -- Specifying the type of storage for the database (Location from Templates / Common location for all Datafiles/ Use OMF)
Step 7 - Recovery Configuration -- Specifying Archive mode and Flash Recovery Location
Step 8 - Database Content -- Specify the option to create sample schemas and post creation scripts (if any)
Step 9 - Initialization Parameters -- Specify/Modify the Database initalization parameters (Memory / characterset / Sizing /Connection mode)
Step 10 - Database Storage -- Option to review the storage structure and make changes if required.
Step 11 - Creation Options -- option to create Database/ Template / Generate Database Scripts
More detailed information in Documentation
Oracle® Database 2 Day DBA 11g Release 2 (11.2)
Part Number E10897-09
Oracle By Example (OBE)
You can use DBCA to change the configuration of an existing database. For example, you can:
You can also use DBCA to delete a database. When DBCA deletes a database, it shuts down the database instance and then deletes all database files. On the Windows platform, it also deletes associated Windows services.
DBCA templates are XML files that contain information required to create a database. Templates are used in DBCA to create new databases and duplicate existing databases. The information in templates includes database options, initialization parameters, and storage attributes (for data files, tablespaces, control files, and online redo log files).
Templates can be used just like scripts, but they are more powerful than scripts because you have the option of duplicating a database. Duplication saves time because you copy the files of an existing database, referred to as a seed database, to the correct locations.
Templates are stored in the following directory:
Advantages of Using Templates
Types of Templates
Templates are divided into the following types:
ASM instances were managed by DBCA till 11.1. From 11.2 onwards, the ASM instance management will be performed by ASMCA tool.
This option is used to create and manage the ASM instance. This also helps in creating the Server Parameter file and password files of the ASM instance.
Note that since 11gR2, ASM is included in the Grid Infrastructure which requires its own Oracle Home.
Oracle By Example -- Install ASM single instance in the same home
Interactive mode provides a graphical interface and guided workflow for creating and configuring a database. Please refer to Database creation section.
The following example creates a database by passing command-line arguments to DBCA:
dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname ora11g -sid ora11g -responseFile NO_VALUE -characterSet AL32UTF8 -memoryPercentage 30 -emConfiguration LOCAL
Enter SYSTEM user password:
Enter SYS user password:
Copying database files
To ensure a complete silent operation, you can redirect stdout to a file. In this case, however, you must supply passwords for the administrative accounts in command-line arguments or the response file.
More details in Oracle Documentation
Oracle® Database Administrator's Guide 11g Release 2 (11.2)
Part Number E25494-02
Oracle® Database Administrator's Guide 11g Release 1 (11.1)
Part Number B28310-04
To trace the DBCA, we need to perform the following.
1. Do a copy of the original dbca file in $ORACLE_HOME/bin. For example:
cp $ORACLE_HOME/bin/dbca $ORACLE_HOME/bin/dbca.ori
2. vi the dbca file in the $ORACLE_HOME/bin directory.
3. At the end of the file, look for the following line:
# Run DBCA
$JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
4. Add the following just before the -classpath in the '$JRE_DIR' line:
5. At the end of the dbca file, the string should now look like this:
# Run DBCA
$JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -DTRACING.ENABLED=true -DTRACING.LEVEL=2 -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
6. To trace, run:
[opcbsol1]/u01/home/usupport> dbca > dbca.out &
The output will be written to the dbca.out file.
The following are the Enhancements to DBCA in 11g.
Detailed Explanation is available in Note 454631.1 - 11g DBCA New features / Enhancements
Note 1615456.2: Troubleshooting Assistant: Get Assistance to Understand and Solve Oracle DBCA Issues
Note 91790.1 DBCA: Raw Device Support in Database Configuration Assistant
Note 856783.1 How to create a RAC database using DBCA generated scripts from templates
Note 1083339.1 DB 11.1: How to Set Automatic Memory Management Using DBCA [Video]
Note 1263965.1 How To Change Database Parameters Using A DBCA Silent Installation?
Note 454631.1 11g DBCA New features / Enhancements
Note 148676.1 DBCA Templates