设为首页 加入收藏

TOP

12C还原使用旧版本RMAN所创建的备份(六)
2018-01-17 13:04:55 】 浏览:246
Tags:12C 还原 使用 版本 RMAN 创建 备份
A_DISK_1: looking for AUTOBACKUP on day: 20171229
channel ORA_DISK_1: AUTOBACKUP found: /ora_xtts/rman/c-2655496871-20171229-00
channel ORA_DISK_1: restoring spfile from AUTOBACKUP /ora_xtts/rman/c-2655496871-20171229-00
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 30-DEC-17


Oracle instance shut down


9.编辑pfile参数文件并修改所需要的参数。这包括compatible参数,如果目标数据库的compatible参数不同于源数据库的设置,那么在目标数据库版本中这个参数会被弃用。更新以_DEST结尾的参数来反映新的目录结构。


[oracle@jytest3 dbs]$ mv initjyrac1.ora initjyrac1.ora.bak
[oracle@jytest3 dbs]$ vi initjyrac1.ora


*.audit_file_dest='/u01/app/oracle/admin/jyrac/adump'
*.audit_trail='db'
*.cluster_database=false
*.compatible='11.2.0.4.0'
*.control_files='+DATA/jyrac/controlfile/current.257.930412709'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='jyrac'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=jyracXDB)'
jyrac1.dispatchers='(PROTOCOL=TCP) (SERVICE=jyrac1XDB)'
jyrac1.instance_number=1
*.job_queue_processes=1000
*.log_archive_dest_1='location=+data/arch/jyrac'
*.open_cursors=300
*.pga_aggregate_target=836763648
*.processes=150
*.remote_login_passwordfile='exclusive'
*.sga_target=2510290944
jyrac2.thread=2
jyrac1.thread=1
jyrac1.undo_tablespace='UNDOTBS1'
jyrac2.undo_tablespace='UNDOTBS2'
10.使用编辑后的pfile参数文件来启动实例到nomount状态


RMAN> startup force nomount pfile='/u01/app/oracle/product/12.2.0/db/dbs/initjyrac1.ora'


Oracle instance started


Total System Global Area    2516582400 bytes


Fixed Size                    8623832 bytes
Variable Size                637536552 bytes
Database Buffers            1862270976 bytes
Redo Buffers                  8151040 bytes


11.从控制文件自动备份文件中还原控制文件并将目标数据库启动到mount状态,为了还原非缺省格式的自动备份,需要执行set controlfile autobackup format命令来指定格式。


RMAN> run
2> {
3> set controlfile autobackup format for device type disk to '/ora_xtts/rman/%F';
4> restore controlfile from autobackup;
5> alter database mount;
6> }


executing command: SET CONTROLFILE AUTOBACKUP FORMAT


Starting restore at 30-DEC-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=6 device type=DISK


channel ORA_DISK_1: looking for AUTOBACKUP on day: 20171230
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20171229
channel ORA_DISK_1: AUTOBACKUP found: /ora_xtts/rman/c-2655496871-20171229-00
channel ORA_DISK_1: restoring control file from AUTOBACKUP /ora_xtts/rman/c-2655496871-20171229-00
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=+DATA/JYRAC/CONTROLFILE/current.329.964063767
Finished restore at 30-DEC-17


Statement processed
released channel: ORA_DISK_1
控制文件会被还原到pfile参数文件中control_files参数所指定的目录中。


12.在目标主机上将源数据库的备份文件注册到rman档案库中。如果目录中的所有文件有共同的前缀,那么可以使用catalog start with命令。如果想要单独指定文件名来进行注册,那么执行catalog datafilecopy命令。我这里所有的备份文件存储在/ora_xtts/rman目录中,因此使用catalog start with命令进行注册。


RMAN> catalog start with '/ora_xtts/rman/';


searching for all files that match the pattern /ora_xtts/rman/


List of Files Unknown to the Database
=====================================
File Name: /ora_xtts/rman/arch_JYRAC_20171229_0isnb48r_1_1
F

首页 上一页 3 4 5 6 7 8 9 下一页 尾页 6/9/9
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇oracle 11g 含xmlType类型表的导.. 下一篇InfluxDB meta文件解析

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目