改变 Flash Recovery Area (FRA)到一个新路径的方法
2015-08-29 16:47
323 查看
改变 Flash Recovery Area (FRA)到一个新路径的方法。
来源于:
How to change Flash Recovery Area to a new location ? (文档 ID 305651.1)
目标:
本文描述了改变FRA目的地的方法和从老的FRA中move file到新FRA的方法
解决方案:
如果你需要改变你的FRA到新的路径,需要从sqlplus里边改变DB_RECOVERY_FILE_DEST初始化参数:
当你改变这个参数之后,新的所有的FRA file 将会建立在新的路径下
永久的file(控制文件和在线日志文件),闪回日志和临时文件可以放在老的FRA区里边。当这些临时文件可以被删除时,数据库将会从老的FRA区里边删除这些临时文件.
为了闪回日志能使用新的'db_recovery_file_dest'位置,数据库的闪回选项需要off掉再on
类似如下的方法:
如果你需要move你的永久文件、临时文件到新的FRA区中,请使用下面的步骤:
1) To move the existing backupsets and archived redo log files,use the following command:
2) To move the datafile copies. Run the below command for each datafile copy:
3) To move the controlfile from the old Flash Recovery Area to new one.
Change the location in the parameter CONTROL_FILES to the new location
and restart the instance in NOMOUNT.
the new Flash Recovery Area and drop the logfile in the old Flash Recovery Area
for each redo log group.
location as they become eligible for deletion.
来源于:
How to change Flash Recovery Area to a new location ? (文档 ID 305651.1)
目标:
本文描述了改变FRA目的地的方法和从老的FRA中move file到新FRA的方法
解决方案:
如果你需要改变你的FRA到新的路径,需要从sqlplus里边改变DB_RECOVERY_FILE_DEST初始化参数:
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+disk1' SCOPE=BOTH SID='*';
当你改变这个参数之后,新的所有的FRA file 将会建立在新的路径下
永久的file(控制文件和在线日志文件),闪回日志和临时文件可以放在老的FRA区里边。当这些临时文件可以被删除时,数据库将会从老的FRA区里边删除这些临时文件.
为了闪回日志能使用新的'db_recovery_file_dest'位置,数据库的闪回选项需要off掉再on
类似如下的方法:
- Shutdown the Database SQL> shutdown immediate - Startup mount the Database: SQL> startup mount; - Drop the garanteed restore points SQL> select * from v$restore_point; drop restore point <name>; - Toggle the Flashback off: SQL> alter database flashback off; - Toggle the Flashback on: SQL> alter database flashback on; - Open the Database: SQL> alter database open;
如果你需要move你的永久文件、临时文件到新的FRA区中,请使用下面的步骤:
1) To move the existing backupsets and archived redo log files,use the following command:
RMAN> BACKUP AS COPY ARCHIVELOG ALL DELETE INPUT; RMAN> BACKUP DEVICE TYPE DISK BACKUPSET ALL DELETE INPUT;
2) To move the datafile copies. Run the below command for each datafile copy:
RMAN> BACKUP AS COPY DATAFILECOPY <name> DELETE INPUT;where the <name> is the datafilecopy name in the old recovery area.
3) To move the controlfile from the old Flash Recovery Area to new one.
Change the location in the parameter CONTROL_FILES to the new location
and restart the instance in NOMOUNT.
RMAN> RESTORE CONTROLFILE FROM 'filename_of_old_control_file';4) To move the online redo logs. Use the commands to add a a log file stored in
the new Flash Recovery Area and drop the logfile in the old Flash Recovery Area
for each redo log group.
SQL> alter database add logfile size 100M; SQL> alter database drop logfile '<name of the old redo log>';Oracle will clean up transient files remaining in the old Flash Recovery Area
location as they become eligible for deletion.
相关文章推荐
- [LeetCode] 23 - Merge k Sorted Lists
- 我关注的一周技术动态 2015.08.30
- localhost与127.0.0.1的区别
- 使用Jedis源码生成Jedis.jar
- C++中map、hash_map、unordered_map、unordered_set通俗辨析
- 在Mac上制作树莓派SD镜像
- Intellij IDEA 修改字体
- Android 如何在Eclipse中查看Android API源码以及support包源码
- linux内核之字符驱动
- 【LeetCode】67. Add Binary
- ios的属性和成员变量在.h文件和.m文件的不同
- Python爬虫框架Scrapy教程(1)—入门
- 1063 -- 发奖学金咯^_^
- Genealogical tree(拓扑排序)
- UDP客户端实现在不同端口上发送和接收数据
- 解决IOS 系统浏览器 html scroll-x 不起作用的办法
- MySQL 性能优化详解
- super-diamond配置管理系统
- 编写队列 初始化时发现 rear, front指向末尾的好处 <Java>
- 1062 -- 最左边一位数