Tuesday, September 26, 2023

What are dbca templates and how do they work?

What are dbca templates? 

Database Configuration Assistant (DBCA) templates are XML files that contain information required to create a database.

What are templates used for? 

Templates are used in DBCA to create new databases and duplicate existing databases. 

What information does a template contain?

The information in templates includes database options, initialization parameters, and storage attributes (for data files, tablespaces, control files, and online redo log files). 

Are there different types of templates?

Yes:
Type File extension Includes Data Files Database Structure Configurable?
Seed .dbc Yes
  • contains both the structure and the physical data files of an existing database, referred to as the seed database.
  • The data files for the seed database are stored in compressed RMAN backup format in a file with a .dfb extension.
  • The seed database control file is stored in a file with .ctl extension
  • The .dbc file contains the location of the seed database data files and contains the source database name used to mount the control file.
  • No
    nonseed .dbt No This type of template is used to create a new database. It contains the characteristics of the database to be created.
    Nonseed templates are more flexible than their seed counterparts because all data files and online redo log files are created to your specification, and names, sizes, and other attributes can be changed as required.
    Yes

    Why use templates? 

    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.

    When using templates, beware of the following:

    1. Database options (for example, Data Vault or Spatial) can be configured or modified only for a custom database or nonseed template (.dbt file).
    2. You cannot modify database options for a seed template (includes data file backups).
    3. Using a seed template is a much quicker operation, than using a non-seed template, but less flexible.

    What templates are delivered with a standard Oracle 19c software installation?

    Upon completion of an Oracle 19c software installation, you will find the following files in the directory $ORACLE_HOME/assistants/dbca/templates:

  • New_Database.dbt
  • Seed_Database.dfb
  • Seed_Database.ctl
  • Data_Warehouse.dbc
  • General_Purpose.dbc
  • pdbseed.xml

  • They are used by the different templates:
    Template Workload Files used
    Data warehouse Users perform numerous, complex queries that process large volumes of data. Seed_Database.dbf
    General Purpose or Transaction processing Many concurrent users perform numerous transactions that require rapid access to data. Seed_Database.dbf
    Custom database Allows for maximum flexibility in defining a database; you can change any of the settings for the database being created. New_Database.dbt
    Both the Data_Warehouse.dbc and the General_Purpose.dbc are pointing to the Seed_Database.dbf when they are used, which means they will be create a database for you quickly but you will have to accept the options and standard given by the template


    Documentation:
    2.3.5 Managing Templates with DBCA

    No comments:

    Post a Comment