Manage Templates in Oracle 10g

I have created a template from computer A. Can I create a db in Computer B using the template from computer A instead of using RMAN ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DBCA Templates:

a. Templates are used by the DBCA to create new databases or make clones of
   existing databases.

   DBCA Templates are XML files containing information required to create a
   database.  This includes:
   - database options
   - init.ora parameters
   - storage attributes (datafiles, tablespaces, controlfiles and redologs)

b. These templates reside in the "$ORACLE_HOME/assistants/dbca/templates"
   directory.  In this directory you can see the following:

   - Data_Warehouse.dbc          
   - General_Purpose.dbc
   - Transaction_Processing.dbc
   - New_Database.dbt            

c. Types of Templates

   1. Seed Templates (files with a '.dbc' extension)
      -> Contain information about a clone database.
      -> Data files and redo logs are stored in zipped format in another file
         with a '.dfj' extension.
      -> Usually the corresponding '.dfj' of a '.dbc' has the same file name:
             Data_Warehouse.dfj and Data_Warehouse.dbc,
             Transaction_Processing.dfj and Transaction_Processing.dbc
      -> But it is not necessary to have the same name since the '.dfj' file is
         referred by a <Location> tag under <DataFiles> within the '.dbc file'.

    2. Non-Seed Templates (files with a '.dbt' extension)
       -> Are used to create new databases from scratch.
       -> Contain characteristics of the database to be created.
       -> Are more flexible compared to their seed counter parts since all
          datafiles and redo logs are created from scratch. The file names,
          sizes, and other attributes can be changed as required.

Creating Templates Using the DBCA:
Users can create their own custom templates from:

a. An existing database:  
   -> Structure only, i.e. using a non-seed template.
      You can run DBCA from remote machines.

    -> Structure as well as data, i.e. using a seed template.
       Run DBCA from the same machine where the database is running.

    You can choose an option to translate file paths into OFA (Oracle Flexible
    Architecture) or maintain the file paths. OFA is recommended if the machine
    where you create the database using this template has a different directory
    structure (ORACLE_HOME, etc.). Non-OFA (maintaining file paths) can be used
    if the target machine has a similar structure.

- OR -                              
b. An existing template using the Manage Templates option of the DBCA
   operations page:        
   -> seed to seed template                
   -> non-seed to non-seed template

Running DBCA:
The DBCA can be run in three modes:  
-> Interactive
-> Silent
-> Progress Only
In Silent and Progress_Only modes, you can only create databases (both new and
clone) and templates (both seed and non-seed). Other options like 'Configuring
Database' and 'Deleting Database' are available in Interactive mode only.
Here are some examples on how to use DBCA in different modes. To get all
available options, type 'dbca -help' at the command line.

a. Interactive Mode
   By default (without any parameters) DBCA runs in interactive mode.
   It presents the Wizard to:
   -> Create/Delete/Configure Databases
   -> Create/Delete Templates

b. Progress Only Mode

   Progress only mode is typically used by other tools to create a database.
   - The Installer uses DBCA to create initial database
   - EMCA and OID Assistants use DBCA to create databases.
   In this mode, only the progress bar is shown.

c. Silent Mode

   Silent mode does not provide any User interface or User interaction. It
   outputs all messages including information, error and warnings into log
   ********* **************************************************
   Example1  Creating a clone database from a non-seed template
   ********* **************************************************
   % dbca -silent -createDatabase \
                  -templateName New_Database.dbt \
                  -gdbname V901 -sid V901 \
                  -characterset WE8ISO8859P1 \
                  -continueOnNonFatalErrors true

    where -continueOnNonFatalErrors allows the DBCA to go on when a non fatal
    error occurs such as not enough space left on device (/ora9i/oradata).
    You can view the error messages in the file:

    Errors that prevent the database from being created are logged in the
    "$ORACLE_HOME/admin/<DBNAME>/create" directory:

        characterSet.log, CloneDBCreation.log, lockAccount.log,
        <DBNAME>.log, postDBCreation.log, postScripts.log

    Logs reporting that the database is created are also in the
    $ORACLE_HOME/admin/<DBNAME>/create" directory:

        CreateDBCatalog.log, CreateDBFiles.log, CreateDB.log

    ********* **************************************************
    Example2  Creating a seed template from an existing database
    ********* **************************************************
    % dbca -silent -createCloneTemplate \
                   -sourceDB V901
                   -sysDBAUserName sys -sysDBAPassword change_on_install \
                   -templateName copy_of_ora9i \
                   -datafileJarLocation /ora9i/assistants/dbca/templates
    When completed:
    -> a log file is generated, such as "/ora9i/assistants/dbca/logs/1.log"
       that contains a message similar to:
       "The generation of the clone database template "copy_of_ora9i"
       is successful."
     -> a large binary zipped format file copy_of_ora9i.dfj is created in
        the datafileJarLocation directory "/ora9i/assistants/dbca/templates".

    ********* ******************************************************
    Example3  Creating a non-seed template from an existing database
    ********* ******************************************************

    % dbca -silent -createTemplateFromDB \
                   -sourceDB V901 \
                   -sysDBAUserName sys -sysDBAPassword change_on_install \
                   -templateName copy_of_ora901
    When completed:
    -> a log file is generated, such as "/ora9i/assistants/dbca/logs/17.log",
       that contains a message similar to:
       "The template "copy_of_ora901" creation completed."
    -> a small text file copy_of_ora901.dbt is created in datafileJarLocation
       directory "/ora9i/assistants/dbca/templates".


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.