再谈数据库迁移---可利用于NON-ASM、ASM的迁入和迁出

 

文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14231/storeman.htm#BABJJJDF

Migrating a Database to AutomaticStorage Management

    With a new installation of Oracle Database and Automatic StorageManagement (ASM), you initially create your database in ASM. If youhave an existing Oracle database that stores database files in theoperating system file system or on raw devices, you can migratesome or all of these database files to ASM.

 

There are two ways to migrate database files toASM:

  • Manually, using RMAN

    For detailed instructions on migrating a database to ASM usingRMAN, see Oracle Database Backup and Recovery Advanced User'sGuide. You can also use RMAN to migrate a singletablespace or datafile to ASM.

  • With the Migrate Database To ASM wizard in EnterpriseManager

    You access the wizard from the Administration page, under theChange Database heading. Refer to the Enterprise Manager onlinehelp for instructions on using the wizard.

 

 

文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmasm.htm#BRADV12000

Migrating a Databaseinto ASM

   

   To takeadvantage of Automatic Storage Management with an existing databaseyou must migrate that database into ASM. This migration isperformed using Recovery Manager (RMAN) even if you are not usingRMAN for your primary backup and recovery strategy.

 

   A database can bemoved from non-ASM disk storage directly into ASM, assuming youhave enough disk space to hold the entire database both in non-ASMstorage and in ASM storage. If you do not have enough diskspace to have a complete copy of your database in ASM and anotherin non-ASM storage simultaneously, you can modify the proceduredescribed here to back the database up to tape, create an ASM diskgroup that uses the old disk space, and then restore the databasefrom tape into ASM.

 

 

文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta018.htm#RCMRF192

 

Syntax

convert::=

Description of convert.gif follows

convertOptionList::=

Description of convertoptionlist.gif follows

 

 

Purpose

To convert a datafile, tablespace or database to the format of adestination platform, in preparation for transport across differentplatforms.

  • CONVERT TABLESPACE isused at the source database to produce datafiles for the specifiedtablespaces in the format of a different destination platform. Theconverted files can then be transported to the destinationplatform.

  • CONVERT DATAFILE isused on the destination database to convert datafiles that are inthe format of a different source platform. Once all of thedatafiles required for a tablespace have been converted, thedatafiles can be transported into the destination database.

  • CONVERT DATABASE isused to transport an entire database from a source platform to adestination platform, converting the datafiles to the format of thedestination platform and ensuring the creation of other requireddatabase files. Depending upon the requirements of your situation,CONVERT DATABASE on either the source or destinationplatform.

The following list describes some situations in whichCONVERT TABLESPACE andCONVERT DATAFILEcan be useful:

  • Content providers can publish structured data as transportabletablespaces and distribute it to customers who can easily andefficiently integrate this data into their Oracle databases,regardless of their chosen platform.

  • Data from a large data warehouse server can be distributed todata marts on smaller computers such as Windows-based workstationsor servers.

  • Read-only tablespaces can be shared across a heterogeneouscluster.

Note:

The CONVERT TABLESPACE and CONVERTDATAFILE commands are only one part of a multiple-stepprocess for transporting datafiles and tablespaces acrossplatforms. You can transport datafiles and tablespaces using yourlive datafiles with the process described in Oracle Database Administrator's Guide or frombackups using the process described in Oracle Database Backup and Recovery Advanced User'sGuide. You should refer to that document beforeattempting to transport a tablespace across platforms.

See Also:

Oracle Database Backup and Recovery Advanced User'sGuide for a complete discussion of the use of CONVERT DATAFILE, CONVERT TABLESPACE and CONVERT DATABASE
 

CONVERT DATAFILE and CONVERTTABLESPACE can also be used to move files into and out ofAutomated Storage Management (ASM) disk groups. Thiscapability is needed because native operating system filemanipulation commands like Unix cp and WindowsCOPY cannot read from or write to ASM disk groups.

----CONVERT DATAFILE andCONVERTTABLESPACE命令可以用于ASM磁盘组内容的迁入与迁出。这种能力是必须的,因为本地操作系统文件操作命令比如Unixcp and WindowsCOPY都不能从ASM中读或者写磁盘组。下是ASM迁入与迁出的例子:

 

Copying DatafilesTo and From ASM Using CONVERT DATAFILE:Examples

 

   1、The following example illustratescopying datafiles into ASM from normal storage. UseCONVERTDATAFILE without specifying asource or destination platform, and specifying ASM disk group+DATAFILE for the output location, as shownhere:

RMAN>  convert datafile '/disk1/oracle/dbs/my_tbs_f1.df', '/disk1/oracle/dbs/t_ax1.f'
   format '+datafile';
 

Starting backup at 29-MAY-05
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input filename=/disk1/oracle/dbs/t_ax1.f
converted datafile=+DATAFILE/asmv/datafile/sysaux.280.559534477
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting datafile conversion
input filename=/disk1/oracle/dbs/my_tbs_f1.df
converted datafile=+DATAFILE/asmv/datafile/my_tbs.281.559534493
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:04
Finished backup at 29-MAY-05

    2、The following example illustrates copying the datafiles of a tablespace out of ASM storage, to directory /tmp, with uniquely generated filenames.
RMAN> convert tablespace tbs_2 format '/tmp/tbs_2_%U.df';
 
Starting backup at 03-JUN-05
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=20 devtype=DISK
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00006 name=+DATAFILE/tbs_21.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-6_11gm2fq9.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00007 name=+DATAFILE/tbs_22.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-7_12gm2fqa.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00019 name=+DATAFILE/tbs_25.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-19_13gm2fqb.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00009 name=+DATAFILE/tbs_23.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-9_14gm2fqc.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00010 name=+DATAFILE/tbs_24.f
converted datafile=/tmp/tbs_2_data_D-L2_I-2786301554_TS-TBS_2_FNO-10_15gm2fqd.df
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
Finished backup at 03-JUN-05 

 

 

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值