Creating Oracle Database template from an existing DB

You can either use default Oracle database template for installation using DBCA or else you can create new database template from the existing database.

Sometimes we don’t know the exact database installation requirement like db block size, sga, pga, tablespaces, characterset etc. So in that case we can export the template from the already running database and use the same template for the new database installation using dbca. New template will contain all the memory parameters and tablespaces of an existing database, only you need to change the datafile location according to the new environment. Below are the steps using which you can export the existing db template.

Steps to Create a Template from the database using DBCA

STEP 1: Export Oracle environment and run the dbca.

 bash-4.1$ export ORACLE_HOME=/scratch/u02/app/oracle/product/11.2.0.4.0
bash-4.1$ export PATH=/scratch/u02/app/oracle/product/11.2.0.4.0/bin:$PATH:.
bash-4.1$ dbca

STEP 2: Click on Manage Templates option as shown below

STEP 3: Select an option Create a database template from an existing database as shown below.

STEP 4: Enter the username, password and the service name of the existing database.

STEP 5: Enter the new template name and description. You can use any name you want.

STEP 6: Click on next to create the template. Once it has created you can use it for the new database installation.

Newly generated Template location will be $ORACLE_HOME/assistants/dbca/templates.