Managing DBCA Templates
You might have used DBCA 100 times to create or delete a database. But might have skipped noticing the templates and the benefits of database templates.
A template is a pre-defined database structure that can be used for create a new database or cloning an entire database (yes, you can clone database using DBCA).
If you can recollect closely, when you create a database, DBCA presents you three types of default templates:
Data Warehouse template
General Purpose or Transaction processing template
Custom Database template
And most of the time without even a second thought, we go with General Purpose template.
How templates work
A template stores the database options, initialization parameters and storage attributes like data files, redo log files, control files etc. Any template is in the format of XML file which contains all the pre-configured settings.
You can find all the template XML files, including the default templates, under below location:
Templates are more powerful because you can even duplicate a database too.
DBCA templates advantages
Using Database Configuration Assistant (DBCA) templates has the following advantages:
Time saving. If you use a template, then you do not have to define the database options
Easy duplication. By creating a template containing your database settings, you can easily create a duplicate database without specifying parameters twice
Easy editing. You can quickly change database options from the template settings
Easy sharing. Templates can be copied from one computer to another
DBCA templates types
From 12c onward, DBCA has two types of templates:
Seed template: which contains data files along with database creation options
Non-seed template: which does not contain data files and you can specify entire database options while creating database
How to create a template
Select Manage Templates and click on Next
Select Create a Database Template and choose any one of the following option:
From an existing template
From an existing database (structure only)
From an existing database (structure as well as data)
Follow the instructions in the DBCA guided workflow to create your template.