在我们创建实例的时候可以保存为模板,其实也可以直接用DBCA命令来创建我们的实例模板,并且利用这个功能进行实例的复制。只是这个功能很少被关注。
这里我们选择ManageTemplate:
注意创建模板的三种类型,官网也有相关的说明:
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.
--根据已经存在的模板来创建新的模板,在此基础之上可以修改旧模板的参数。
(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.
--根据已经存在的数据库实例来创建新的模板,这种只包含structural 的信息,如database options,tablespaces,datafiles 和initialization parameters。 用户定义的schemas 和data 不会被包含在模版中。因此这种模板只包含基本的架构信息。
(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.
这种模板是包含架构和数据,因此这个模板的数据和我们源库会完全相同,使用这个功能可以用来进行数据的复制。 这个功能是我们需要关注的,也是我写这篇Blog的一个目的。
模板存放的目录:
{ORACLE_HOME}/assistants/dbca/templates/dave.dfb