rman duplicate 比較重要的知识点
admin
2023-04-21 00:42:36
0

rman duplicate database 必须是同样的平台,可是支持32bit\64bit 间复制,且 在复制完毕后须要执行$ORACLE_HOME/rdbms/admin/utlirp.sql
脚本来转换pl/sql 代码

The DUPLICATE command requires one or more auxiliary channels. These channels perform the work of the duplication on the auxiliary database instance.
rman duplicate 命令须要在备库上至少要分配一个以上辅助通道(auxiliary channels)

If the source database files are in the Oracle Managed Files (OMF) format, then you cannot use the DB_FILE_NAME_CONVERT and
LOG_FILE_NAME_CONVERT initialization parameters or the fileNameConversionSpec clause to generate new OMF file names for the
duplicate database. If you do not follow this rule, the new OMF files generated from these three methods can cause problems
使用duplicate 时必需要注意,假设源库使用OMF,那么我们就不能使用 DB_FILE_NAME_CONVERT 和 LOG_FILE_NAME_CONVERT 和其它的文件转
换方式。否者就会出问题;比如。备库的控制文件中的数据文件名称是依据DB_FILE_NAME_CONVERT 和 LOG_FILE_NAME_CONVERT 转换而来,可是实际数据文件求不在相应的路径下,实际文件会採用OMF来管理;这时须要使用:

1》RMAN catalog 和 switch database to copy

2》alter database rename file to 和

3》switch datafile file# to copy 来修正控制文件的信息;

当然也有例外,假设仅仅是换个asm 磁盘组名,其它路径名不变,能够使用DB_FILE_NAME_CONVERT
The only exception to this rule is when changing only an ASM disk group name. Assume that source data files and online redo
log files are stored in ASM disk group +SOURCEDSK. You want to store the duplicate database files in ASM disk group +DUPDSK.
In this case, you can set the initialization parameters as follows:
DB_FILE_NAME_CONVERT = ("+SOURCEDSK","+DUPDSK")
LOG_FILE_NAME_CONVERT = ("+SOURCEDSK","+DUPDSK")

RMAN uses DB_FILE_NAME_CONVERT or LOG_FILE_NAME_CONVERT to convert the disk group name, and then generates a new, valid file
name based on the converted disk group name.

-假设源库使用OMF,建议使用下面參数配置:
You have the following other supported options for naming data files when the source files are in the Oracle Managed Files format:

1.Use SET NEWNAME to specify names for individual data files.
2.Set DB_FILE_CREATE_DEST to make all data files of the new database Oracle-managed files, except the files for which SET

NEWNAME is used. You should not set DB_FILE_NAME_CONVERT if you set DB_FILE_CREATE_DEST.
DB_CREATE_FILE_DEST
DB_RECOVERY_FILE_DEST

对于redolog 假设没有设置DB_RECOVERY_FILE_DEST, or DB_CREATE_ONLINE_LOG_DEST_n. 则会使用DB_CREATE_FILE_DEST 參数指定的文件夹来存放

SQL> show parameter DB_CREATE_ONLINE_LOG_DEST
NAME TYPE VALUE


db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
若单独指定 db_create_online_logdest* 參数。则redolog member 会冗余放到这些单独指定的文件夹下

Supported options for naming online redo logs duplicated from Oracle-managed files are DB_CREATE_FILE_DEST,
DB_RECOVERY_FILE_DEST, or DB_CREATE_ONLINE_LOG_DEST_n.

----DB_CREATE_ONLINE_LOG_DEST_n 參数解释,为redolog,control file指定存放文件夹,指定多个则多路复用
DB_CREATE_ONLINE_LOG_DEST_n (where n = 1, 2, 3, ... 5) specifies the default location for Oracle-managed control files and online redo logs. If more than one DB_CREATE_ONLINE_LOG_DEST_n parameter is specified, then the control file or online redo log is multiplexed across the locations of the other DB_CREATE_ONLINE_LOG_DEST_n parameters. One member of each online redo log is created in each location, and one control file is created in each location.

Specifying at least two parameters provides greater fault tolerance for the control files and online redo logs if one of the locations should fail.

If a file system directory is specified as the default location, then the directory must already exist; Oracle does not create it. The directory must have appropriate permissions that allow Oracle to create files in it. Oracle generates unique names for the files, and a file thus created is an Oracle Managed File.
对于文件系统而言,指定的文件夹必须权限准确,且已经存在;假设没有,oracle 不会自己主动创建
注意:nofilenamecheck参数需要解释下:
如果在复制时,位置不同时,我们会用参数db_file_name_convert 对文件位置进行转换。 但是如果在复制时我们用的是相同的位置。 这里必须加上nofilenamecheck参数。 该参数通知复制操作不必在执行还原操作前确认文件名是不同的。如果没有指定nofilenamecheck参数,rman会给出如下错误:
RMAN-05001: auxiliary filename /DBSoft/oracle/oradata/woo/users01.dbf conflicts with a file used by the target database

相关内容

热门资讯

今日重大发现“西兵互娱牛牛开挂... 您好:西兵互娱牛牛这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款...
终于了解“途游竞技有挂吗?”(... 家人们!今天小编来为大家解答途游竞技透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里买很...
【今日要闻】“战皇炸/金/花究... 您好:战皇炸/金/花这款游戏可以开挂,确实是有挂的,需要了解加客服微信【4282891】很多玩家在这...
我来教教您“新青鸟拼三张怎么开... 您好:新青鸟拼三张这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这款...
终于了解“游游棋牌究竟有挂吗?... 有 亲,根据资深记者爆料游游棋牌是可以开挂的,确实有挂(咨询软件无需打开...
今日重磅消息“新超圣炸/金/花... 家人们!今天小编来为大家解答新超圣炸/金/花透视挂怎么安装这个问题咨询软件客服徽9784099的挂在...
我来教教您“17麻将十三水究竟... 网上科普关于“17麻将十三水有没有挂”话题很是火热,小编也是针对17麻将十三水作*弊开挂的方法以及开...
直播公司半年诈骗超千万:男运营... 极目新闻记者 李贤诚由女主播在平台直播,男运营寻找被害人,并冒充女主播的身份与被害人发私信搭讪。男运...
【今日要闻】“永盈真的有挂吗?... 有 亲,根据资深记者爆料永盈是可以开挂的,确实有挂(咨询软件无需打开直接...
玩家分享攻略“至尊宝牛牛究竟有... 有 亲,根据资深记者爆料至尊宝牛牛是可以开挂的,确实有挂(咨询软件无需打...