Tuesday, June 3, 2014

1z0-060 Upgrade to Oracle Database 12c - Use OUI, DBCA for installation and configuration (Manage Templates)

 

Managing Templates with DBCA

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:

ORACLE_HOME/assistants/dbca/templates




Advantages of Using Templates


Using templates has the following advantages:




  • Time saving. If you use a template, then you do not have to define the database.


  • 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.





Types of Templates


Templates are divided into the following types:




  • Seed templates


  • Nonseed templates



 



Manage Templates:



image



image



 







oracle@solaris:~$ dbca -createTemplateFromDB -help

Create a template from an existing database by specifying the following parameters:


        -createTemplateFromDB


                -sourceDB    <Database unique name for RAC Database and SID for Single Instance Database>


                -templateName      <new template name>


                -sysDBAUserName     <user name  with SYSDBA privileges>


                -sysDBAPassword     <password for sysDBAUserName user name>


                [-maintainFileLocations <true | false>]


                [-connectionString   <EZCONNECT String for connecting to remote database for example "host:port/servicename">]



oracle@solaris:~$ dbca -createCloneTemplate -help

Create a clone template from an existing database by specifying the following parameters:


        -createCloneTemplate


                -sourceSID    <Database unique name for RAC Database and SID for Single Instance Database>


                -templateName      <new template name>


                [-sysDBAUserName     <user name  with SYSDBA privileges>


                 -sysDBAPassword     <password for sysDBAUserName user name>]


                [-maxBackupSetSizeInMB     <Maximum backup set size (MB)>]


                [-rmanParallelism  <Parallelism value>]


                [-datafileJarLocation       <directory to place the datafiles in a compressed format>]