shell > docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9656305ad917 centos "/bin/bash"28 hours ago Up About an hour 0.0.0.0:9999->9999/tcp jenkins
Starting restore at 2019:04:14 23:39:42 using channel ORA_DISK_1 using channel ORA_DISK_2 using channel ORA_DISK_3
List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- ------------------- ------- ------- ---------- --- 644 B 0 A DISK 2019:04:14 23:36:43 1 1 YES TAG20190414T233619 652 B 1 A DISK 2019:04:14 23:37:36 1 1 YES TAG20190414T233735 645 B 0 A DISK 2019:04:14 23:36:56 1 1 YES TAG20190414T233619 653 B 1 A DISK 2019:04:14 23:37:36 1 1 YES TAG20190414T233735 641 B 0 A DISK 2019:04:14 23:36:24 1 1 YES TAG20190414T233619 655 B 1 A DISK 2019:04:14 23:37:40 1 1 YES TAG20190414T233735 640 B 0 A DISK 2019:04:14 23:36:21 1 1 YES TAG20190414T233619 654 B 1 A DISK 2019:04:14 23:37:36 1 1 YES TAG20190414T233735
archived logs generated after SCN 103084444 not found in repository Media recovery start SCN is 103084444 Recovery must be done beyond SCN 103084453 to clear datafile fuzziness Finished restore at 2019:04:14 23:39:42
3、完全恢复
1 2 3 4 5 6
startup force mount; run { restore database; recover database; alter database open; }
4、根据scn值进行不完整恢复
1 2 3 4 5 6
startup force mount; run { restore database until scn 103233673; recover database until scn 103233673; alter database open resetlogs; }
20:06:51 SYS@ boston> shutdown immediate; ORA-01116: error in opening database file 4 ORA-01110: data file 4: '/data/u01/app/oracle/oradata/boston/users01.dbf' ORA-27041: unable to open file Linux-x86_64 Error: 2: No such file or directory Additional information: 3 20:06:59 SYS@ boston> exit
5.3、使用rman的Data Recovery Advisor功能去修复:
列出信息list failure
1 2 3 4 5 6 7 8
RMAN> list failure; using target database control file instead of recovery catalog List of Database Failures =========================
Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------------- ------- 98722 HIGH OPEN 2019:04:18 20:07:00 One or more non-system datafiles are missing
List of Database Failures =========================
Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------------- ------- 98722 HIGH OPEN 2019:04:18 20:07:00 One or more non-system datafiles are missing
analyzing automatic repair options; this may take some time allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=590 device type=DISK allocated channel: ORA_DISK_2 channel ORA_DISK_2: SID=6 device type=DISK allocated channel: ORA_DISK_3 channel ORA_DISK_3: SID=201 device type=DISK analyzing automatic repair options complete
Mandatory Manual Actions ======================== no manual actions available
Optional Manual Actions ======================= 1. If file /data/u01/app/oracle/oradata/boston/users01.dbf was unintentionally renamed or moved, restore it
Automated Repair Options ======================== Option Repair Description ------ ------------------ 1 Restore and recover datafile 4 Strategy: The repair includes complete media recovery with no data loss Repair script: /data/u01/app/oracle/diag/rdbms/boston/boston/hm/reco_16185943.hm
Strategy: The repair includes complete media recovery with no data loss Repair script: /data/u01/app/oracle/diag/rdbms/boston/boston/hm/reco_16185943.hm
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /data/u01/app/oracle/fast_reco very_area
6.1.4、数据库下的所有表空间闪回功能必须都开启,有一个没有开启闪回,无没有办法闪回数据库
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
03:10:58 SYS@ boston> select name,flashback_on from v$tablespace; NAME FLA ------------------------------ --- SYSTEM YES SYSAUX YES UNDOTBS1 YES USERS YES TEMP YES TEST YES TEST11 YES ZEVEN YES 8 rows selected. 如果某个表空间没有开启闪回,使用以下命令开启: altertablespaceusersflashbackon;(注意与alterdatabaseflashbackon的先后顺序,如果是tablespace的闪回开启在database的闪回之后,需要先关系database闪回alterdatabaseflashbackoff;在开启database 闪回alterdatabaseflashbackon; 否则闪回的时候会报错: ORA-38753: Cannot flashback data file 4; no flashback log data. ORA-01110: data file 4: '/data/u01/app/oracle/oradata/boston/users01.dbf'
创建还原点: CREATERESTORE POINT good_data; 查看还原点: 22:47:04 SYS@ boston> select * from v$restore_point; SCN DATABASE_INCARNATION# GUA STORAGE_SIZE TIME RESTORE_POINT_TIME PRE NAME ---------- --------------------- --- ------------ ---------------------------------------------- 103328091 19 NO 0 19-APR-19 10.47.04.000000000 PM NO GOOD_DATA
6.2.2.3 还原到某个时间点
1 2 3 4 5 6 7
FLASHBACK DATABASE TO TIMESTAMP TO_DATE('18-Apr-19 10:41:41','DD-MON-YYYY HH24:MI:SS');
19:38:00 SYS@ boston> COL STATUS FORMAT A8 19:38:06 SYS@ boston> COL FILENAME FORMAT A60 19:38:08 SYS@ boston> SELECT STATUS, FILENAME FROM V$BLOCK_CHANGE_TRACKING;
STATUS FILENAME -------- ------------------------------------------------------------ DISABLED
2、开启block change tracking
设置 DB_CREATE_FILE_DEST参数 SHOW PARAMETER DB_CREATE_FILE_DEST
1 2 3 4
19:38:28 SYS@ boston> SHOW PARAMETER DB_CREATE_FILE_DEST NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_create_file_dest string
如果db_create_file_dest参数没有设置,可以使用下面命令设置 ALTER SYSTEM SET DB_CREATE_FILE_DEST = '/home/oracle/' SCOPE=BOTH SID='*';
1 2 3 4 5 6 7 8 9
19:40:40 SYS@ boston> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '/home/oracle/' SCOPE=BOTH SID='*'; System altered.
Elapsed: 00:00:00.12 19:41:48 SYS@ boston> SHOW PARAMETER DB_CREATE_FILE_DEST
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_create_file_dest string /home/oracle/
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET; CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_DEVICE=tape1)'; CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/disk1/oracle/dbs/snapcf_ev.f'; # default
2、show命令查看
1 2 3
show all;查看所有配置 show retention policy;查看保留策略 show default device type;查看默认设备类型
3、恢复修改后的策略为默认策略configure……clear
1 2 3
CONFIGURE backup optimization clear;修改备份优化策略为默认(默认为off) CONFIGURE RETENTION POLICY CLEAR;修改保留策略默认为保留一天 CONFIGURE CONTROFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
4、配置默认备份设备类型
1 2 3 4 5
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE DEFAULT DEVICE TYPE TO SBT;指定备份设备为system backup tape 也可以使用backup命令覆盖默认的configure配置参数 BACKUP DEVICE TYPE sbt DATABASE; BACKUP DEVICE TYPE DISK DATABASE;
5、配置默认的备份类型
1 2 3 4 5 6
copy备份形式只能用于disk备份设备类型 sbt的备份设备类型只用用backup set备份形式 CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY; # image copies不能压缩 CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET; # uncompressed(默认) CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;(压缩备份到disk) CONFIGURE DEVICE TYPE sbt BACKUP TYPE TO COMPRESSED BACKUPSET;(压缩备份到sbt)
6、配置通道
对于tape备份,每盘磁带分配一个通道。对于磁盘备份,每块物理磁盘分配一个通道,除非你可以优化磁盘子系统多通道架构。错误的通道数量会影响在io操作方面rman的性能。 默认情况下并行为1 CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET; 如果不指定任何channel直接备份,系统会自动分配一个通道,例如ora_disk_1
RMAN> backup as compressed backupset full database format '/tmp/backuporacle/db_%d_%T_%U'; Starting backup at 2019:04:12 21:29:57 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=397 device type=DISK channel ORA_DISK_1: starting compressed full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00002 name=/data/u01/app/oracle/oradata/boston/sysaux01.dbf ...... input datafile file number=00003 name=/data/u01/app/oracle/oradata/boston/undotbs01.dbf channel ORA_DISK_1: starting piece 1 at 2019:04:12 21:29:57 channel ORA_DISK_1: finished piece 1 at 2019:04:12 21:31:02 piece handle=/tmp/backuporacle/db_BOSTON_20190412_cstur72l_1_1 tag=TAG20190412T212957 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05 channel ORA_DISK_1: starting compressed full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 2019:04:12 21:31:05 channel ORA_DISK_1: finished piece 1 at 2019:04:12 21:31:06 piece handle=/tmp/backuporacle/db_BOSTON_20190412_cttur74m_1_1 tag=TAG20190412T212957 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 2019:04:12 21:31:06
CONFIGURE DEVICE TYPE DISK PARALLELISM 3; CONFIGURE DEFAULT DEVICE TYPE TO DISK; CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/tmp/oracle1/%U'; CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/tmp/oracle2/%U'; CONFIGURE CHANNEL 3 DEVICE TYPE DISK FORMAT '/tmp/oracle3/%U'; BACKUP AS COPY DATABASE;
CONFIGURE CONTROLFILE AUTOBACKUP ON;(开启自动备份,默认为off) CONFIGURE CONTROLFILE AUTOBACKUP OFF; 指定备份的路径 CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/oracle/cf_%F'; 备份数据时,会自动备份控制文件和数据库参数文件
1 2 3 4 5
RMAN> BACKUP AS COPY DATABASE; ...... Starting Control File and SPFILE Autobackup at 2019:04:12 23:58:10 piece handle=/tmp/oracle/cf_c-2681136947-20190412-00 comment=NONE Finished Control File and SPFILE Autobackup at 2019:04:12 23:58:17
清空自动备份控制文件参数 CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR; 在run下面使用set controlfile autobackup format命令,可以覆盖掉configure下面的配置信息
1 2 3 4 5 6 7 8 9 10
RMAN> RUN 2> { 3> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/oracle/cf_%F.bck'; 4> BACKUP AS BACKUPSET DEVICE TYPE DISK DATABASE; 5> } executing command: SET CONTROLFILE AUTOBACKUP FORMAT ...... Starting Control File and SPFILE Autobackup at 2019:04:13 00:07:28 piece handle=/tmp/oracle/cf_c-2681136947-20190413-00.bck comment=NONE Finished Control File and SPFILE Autobackup at 2019:04:13 00:07:31
8、配置备份保留策略
配置基于冗余的保留策略(冗余3份) CONFIGURE RETENTION POLICY TO REDUNDANCY 3; 配置基于时间窗口的保留策略(保留7天) CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; 禁用保留策略 CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
BACKUP DATABASE FORCE; BACKUP ARCHIVELOG ALL FORCE;
10、配置归档之日删除策略
备份两次的归档日志可以被删除: CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK; 该删除策略的意义是:每份归档日志只会备份两次,哪怕执行多次备份,已经满足2次备份的归档也不会备份。执行备份的时候不会自动删除已经满足删除策略的归档,需要使用delete archivelog all才行。且不满足两次的备份时不会被删除的。
1 2 3 4 5 6 7 8 9 10 11
20:07:02 SYS@ boston> select recid, sequence#, archived, deleted, backup_count from v$archived_log where deleted='NO';
RECID SEQUENCE# ARC DEL BACKUP_COUNT ---------- ---------- --- --- ------------ 294 491 YES NO 2 295 492 YES NO 2 296 493 YES NO 2 297 494 YES NO 2 298 495 YES NO 2 299 496 YES NO 1 300 497 YES NO 1
RMAN> delete archivelog all; ...... RMAN-08138: WARNING: archived log not deleted - must create more backups archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_496_gc3n6kxk_.arc thread=1 sequence=496 RMAN-08138: WARNING: archived log not deleted - must create more backups archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_497_gc3n7sfh_.arc thread=1 sequence=497 List of Archived Log Copies for database with db_unique_name BOSTON =====================================================================
Key Thrd Seq S Low Time ------- ---- ------- - ------------------- 294 1 491 A 2019:04:13 19:26:37 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_491_gc3lq5ss_.arc
295 1 492 A 2019:04:13 19:41:25 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_492_gc3lq7m5_.arc
296 1 493 A 2019:04:13 19:41:27 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_493_gc3lrkc7_.arc
297 1 494 A 2019:04:13 19:42:08 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_494_gc3ltyl3_.arc
RMAN> delete archivelog all; allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=580 device type=DISK allocated channel: ORA_DISK_2 channel ORA_DISK_2: SID=11 device type=DISK allocated channel: ORA_DISK_3 channel ORA_DISK_3: SID=199 device type=DISK RMAN-08138: WARNING: archived log not deleted - must create more backups archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_499_gc3nfwjg_.arc thread=1 sequence=499 List of Archived Log Copies for database with db_unique_name BOSTON =====================================================================
Key Thrd Seq S Low Time ------- ---- ------- - ------------------- 299 1 496 A 2019:04:13 19:44:16 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_496_gc3n6kxk_.arc
300 1 497 A 2019:04:13 20:06:41 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_497_gc3n7sfh_.arc
301 1 498 A 2019:04:13 20:07:20 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_498_gc3nfgb6_.arc
Do you really want to delete the above objects (enter YES or NO)? yes deleted archived log archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_496_gc3n6kxk_.arc RECID=299 STAMP=1005509202 deleted archived log archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_497_gc3n7sfh_.arc RECID=300 STAMP=1005509241 deleted archived log archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_498_gc3nfgb6_.arc RECID=301 STAMP=1005509422 Deleted 3 objects
备份超过两次的归档被删除,如果想要强制删除,不使用删除策略,使用delete force archivelog all;
1 2 3 4 5 6 7 8 9 10 11 12 13 14
RMAN> delete force archivelog all; List of Archived Log Copies for database with db_unique_name BOSTON =====================================================================
Key Thrd Seq S Low Time ------- ---- ------- - ------------------- 302 1 499 A 2019:04:13 20:10:21 Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_499_gc3nfwjg_.arc
Do you really want to delete the above objects (enter YES or NO)? yes deleted archived log archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_499_gc3nfwjg_.arc RECID=302 STAMP=1005509436 Deleted 1 objects
CONFIGURE MAXSETSIZE TO UNLIMITED; # default 设置每个通道能够创建备份集的最大值为1G; CONFIGURE MAXSETSIZE TO 1 G; 使用backupset备份时,如果存在某个表空间文件大于1G,则会提示报错
1 2
RMAN-03002: failure of backup command at 04/13/2019 23:32:46 RMAN-06183: datafile or datafile copy /data/u01/app/oracle/oradata/boston/sysaux01.dbf (file number 2) larger than MAXSETSIZE
如果系统参数配置了多个通道,可以直接添加maxpiecesize: CONFIGURE CHANNEL 1 DEVICE TYPE DISK MAXPIECESIZE 100 M; CONFIGURE CHANNEL 2 DEVICE TYPE DISK MAXPIECESIZE 50 M; CONFIGURE CHANNEL 3 DEVICE TYPE DISK MAXPIECESIZE 50 M;
RMAN> backup as compressed backupset full database format '/tmp/backuporacle/db_%d_%T_%U'; Starting backup at 2019:04:14 00:17:11 using channel ORA_DISK_1 using channel ORA_DISK_2 using channel ORA_DISK_3 ...... channel ORA_DISK_3: finished piece 1 at 2019:04:14 00:17:15 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kituu587_1_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_3: backup set complete, elapsed time: 00:00:03 channel ORA_DISK_2: finished piece 1 at 2019:04:14 00:17:19 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_1_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 2 at 2019:04:14 00:17:19 channel ORA_DISK_2: finished piece 2 at 2019:04:14 00:17:26 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_2_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 3 at 2019:04:14 00:17:26 channel ORA_DISK_1: finished piece 1 at 2019:04:14 00:17:29 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kgtuu587_1_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_1: starting piece 2 at 2019:04:14 00:17:29 channel ORA_DISK_2: finished piece 3 at 2019:04:14 00:17:36 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_3_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 4 at 2019:04:14 00:17:36 channel ORA_DISK_2: finished piece 4 at 2019:04:14 00:17:43 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_4_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 5 at 2019:04:14 00:17:43 channel ORA_DISK_1: finished piece 2 at 2019:04:14 00:17:44 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kgtuu587_2_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_1: starting piece 3 at 2019:04:14 00:17:44 channel ORA_DISK_2: finished piece 5 at 2019:04:14 00:17:45 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_5_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: backup set complete, elapsed time: 00:00:34 channel ORA_DISK_1: finished piece 3 at 2019:04:14 00:17:59 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kgtuu587_3_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:48 Finished backup at 2019:04:14 00:17:59
run { allocate channel t1 type disk maxpiecesize = 50M; allocate channel t2 type disk maxpiecesize = 80M; allocate channel t3 type disk; backup as compressed backupset full database format '/tmp/backuporacle/db_%d_%T_%U'; }
3、完全备份数据时,单独排除某一个数据库不备份
CONFIGURE EXCLUDE FOR TABLESPACE users; 开始备份,tablespace users被自动过滤掉,没有备份:
RMAN> show snapshot controlfile name; RMAN configuration parameters for database with db_unique_name BOSTON are: CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/snapcf_boston.f';
修改snapshot controlfile路径CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/root/snap_boston.ctl’; 设置的路径oralce用户必须有访问权限,如果没有访问权限,会报下面错误:
1 2 3 4 5 6
ORA-01580: error creating control backup file /root/snap_boston.ctl ORA-27037: unable to obtain file status Linux-x86_64 Error: 13: Permission denied Additional information: 6
RMAN-08132: WARNING: cannot update recovery area reclaimable file list
2、修改log_archive_dest_n参数,将其值修改为非fast recovery area
未修改之前: LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST' (LOCATION=USE_DB_RECOVERY_FILE_DEST配置fast recovery area,该参数值为 DB_RECOVERY_FILE_DEST初始化参数指定的值) 修改为非FRA: ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=/ORACLE/DBS/';