Copy an instance using the Oracle dbca command

Source: Internet
Author: User

 

When creating an instance, you can save it as a template. In fact, you can also use the dbca command to create an instance template and use this function to copy the instance. This feature is rarely noticed.

 

 

Here we choose managetemplate:

 

Note the following three types of template creation:

Installing Oracle database and creating adatabase

Http://docs.oracle.com/cd/E11882_01/server.112/e10897/install.htm#ADMQS023

 

(1) from an existing Template

Using anexisting template, you can create a new template based on the predefinedtemplate settings. You can add or change any template settings such asinitialization parameters, storage parameters, or whether to use customscripts.

-- Create a new template based on an existing template. On this basis, you can modify the parameters of the old template.

 

(2) from an existing database (structure only)

You can create anew template that contains structural information from an existing database, including database options, tablespaces, data files, and initializationparameters. user-Defined Schemas and their data will not be part ofthe created template. the source database can be either local or remote. selectthis option when you want the new database to be structurally similar to thesource database, but not contain the same data.

-- Create a template based on an existing database instance. This template only contains structural information, such as database options, tablespaces, datafiles, and initialization parameters. User-Defined Schemas and data are not included in the template. Therefore, this template only contains basic architecture information.

 

(3) from an existing database (structure as well as data)

You can create anew template that has both the structural information and physical data filesof an existing database. databases created using such a template are identicalto the source database. user-Defined Schemas and their data will bepart of the created template. the source database must be local. select thisoption when you want a template from which you can create an exact replica ofthe source database.

This template contains the Architecture and Data, so the data of this template will be exactly the same as that of our source database. This function can be used for data replication. This feature is worth attention and is also a goal for me to write this blog.

 

 

Template directory:

{ORACLE_HOME}/assistants/dbca/templates/Dave. DFB

 

 

Select No here and exit:

 

Check the size of the generated template:

DG1:/u01/APP/Oracle/product/11.2.0.3/db_1/assistants/dbca/templates> ll-lH

Total 555 m

-RW-r -- 1 Oracle oinstall 5.0 K Sep 1710: 24 data_warehouse.dbc

-RW-r ----- 1 oracleoinstall 9.3 m dec 14 Dave. CTL

-RW-r ----- 1 oracleoinstall 6.2 K dec 14 Dave. DBC

-RW-r ----- 1 oracleoinstall 260 m dec 14 Dave. DFB

-Rwxrw-rwx 1 Oracle oinstall 21 m Sep 22 :22 example01.dfb

-Rwxrw-rwx 1 Oracle oinstall 1.5 m Sep 2215:22 example. dmp

-RW-r -- 1 Oracle oinstall 4.9 K Sep 1710: 24 general_purpose.dbc

-RW-r -- 1 Oracle oinstall 12 K Feb 15 2010 new_database.dbt

-Rwxrw-rwx 1 Oracle oinstall 9.3 m Sep 2215:21 seed_database.ctl

-Rwxrw-rwx 1 Oracle oinstall 254 m Sep 2215:22 seed_database.dfb

 

 

The templates here have several different extensions. The official website will explain the extensions as follows:

 

Type

File Extension

Except des data files

Database Structure

Seed

. DBC

Yes

This type of template contains both the structure and the physical data files of an existing database, referred to asSeed Database. Your new database starts as a copy of the seed database, and requires only the following changes:

  • Name of the database
  • Destination of the data files
  • Number of Control Files
  • Number of online redo log groups
  • Initialization parameters

Other changes can be made after database creation using scripm scripts that can be invoked by dbca, command-line SQL statements, or Oracle Enterprise Manager Database Control.

The data files for the seed database are stored in compressed RMAN backup format in a file with. DFB extension. the seed Database Control file is stored in a file. CTL extension. (This file is needed only when storing data files in Oracle Automatic Storage Management (Oracle ASM) disk groups or as Oracle managed files .) the. DBC file contains the location of the seed database data files and contains the source database name used to mount the control file.

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.

 

According to the above description, DFB is an RMAN compressed backup file, CTL stores the control file, and DBC contains the location information of files such as data files.

 

After creation, we can use this template to copy instances. Because this template is identical to the source instance, If you create a template on the same server, you need to modify some parameter values, when creating an instance, you can directly modify the values of these parameters, such:

 

 

 

Summary:

This blog mainly describes how to use dbca to copy instances.

 

 

 

 

 

Bytes -------------------------------------------------------------------------------------------------------

All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!

Blog: http://blog.csdn.net/tianlesoftware

WEAVER: http://weibo.com/tianlesoftware

Email: tianlesoftware@gmail.com

Skype: tianlesoftware

 

------- Add a group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, reject the application ----

Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)

Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823

Group dba6: 158654907 dba7: 172855474

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.