.Preparing for CONVERT DATABASE: Using the DBMS_TDB Package
1.Using DBMS_TDB.CHECK_DB to Check Database State
DBMS_TDB.CHECK_DB checks whether a database can be transported to a desired destination platform, and whether the current state of the database permits transport.
This example illustrates the use of CHECK_DB on a 32-bit Linux platform. for transporting a database to 32-bit Windows, skipping read-only tablespaces, with a database that is currently open read-write.
If you call DBMS_TDB.CHECK_DB and no messages are displayed indicating conditions preventing transport before the PL/SQL procedure successfully completed message, then your database is ready for transport
2.Using DBMS_TDB .CHECK_EXTERNAL to Identify External Objects
DBMS_TDB.CHECK_EXTERNAL must be used to identify any external tables, directories or BFILEs. RMAN cannot automate the transport of such files.
DBMS_TDB.CHECK_EXTERNAL takes no parameters. With SERVEROUTPUT set to ON, the output of DBMS_TDB.CHECK_EXTERNAL lists the external tables, directories and BFILEs of your database.
The following example shows how to call DBMS_TDB.CHECK_EXTERNAL:
If there are no external objects, then this procedure completes with no output. If there are external objects, however, the output will be similar to the following example:
.Using the RMAN CONVERT DATABASE Command
1.Produce two scripts on the source platform.:
we can use "convert database on target platform" to produce two scripts.
example:
--->one is "transport script" which containing SQL*Plus commands to create a new database on the destination platform, and a PFILE for the new database containing the same settings as the source database.
---->the other is "convert script" which containing RMAN CONVERT DATAFILE commands for each of the datafiles of the database being transported.
Example:
Note that CONVERT DATABASE ON TARGET PLATFORM does not produce converted datafile copies on the source platform.
2.Run the scripts on the destination platform. to make a new database.
---->Tansport the datafiles of the source paltform. ,two scripts and pfile to the destination platform.(NOTE: the source database is on the ready-only mode.)
----->Make the proper directory on the destination platfort for the new database.
----->Change the "convert script" ,and running it to convert the datafile which will be used by the new database on the destination platform.
----->Make any desired changes to the parameter file.
# Please change the values of the following parameters:
control_files = "/tmp/convertdb/cf_D-NEWDBT_id-1778429277_00gb9u2s"
db_recovery_file_dest = "/tmp/convertdb/orcva"
db_recovery_file_dest_size= 10737418240
instance_name = "NEWDBT"
service_names = "NEWDBT.regress.rdbms.dev.us.oracle.com"
plsql_native_library_dir = "/tmp/convertdb/plsqlnld1"
db_name = "NEWDBT"
------>Then run the "transport script" script which contains SQL statements used to create the new database on the destination platform.
-----END------
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/665511/viewspace-366343/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/665511/viewspace-366343/