Backup and Recovery User‘s Guide 学习笔记

For each file that is not listed in the CREATE CONTROLFILE statement but is present in the data dictionary, an entry is created for them in the control file. These files are named as MISSINGnnnnn, where nnnnn is a 5-digit number starting with 0.

After restoring data file backups, you can run the SET AUTORECOVERY ON command to enable automatic recovery.
ALTER SYSTEM ARCHIVE LOG CURRENT;
startup mount exclusive restrict; drop database;
sbtio.log Third-party media management software The trace subdirectory of the ADR home
RECOVER DATABASE TEST A trial recovery command is usable in any scenario in which a normal recovery command is usable. Nevertheless, you only need to run trial recovery when recovery runs into problems
RMAN-00569, which is the message number for the error stack banner
System Backup Tape (SBT)
Restoring and recovering files over the network is supported starting with Oracle Database 12c Release 1 (12.1).
RECOVER DATABASE ALLOW 5 CORRUPTION
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL

startup force nomount pfile=’/dev3/oracle/network/init_db112.ora’;
When you perform DBPITR with a backup control file, before opening the database with RESETLOGS, you can open the database read-only using SQL*Plus and run queries as needed to verify that the effects of the logical corruption have been reversed. If you are satisfied with the results, then you can open the database with RESETLOGS.
RECOVER DATABASE NOREDO;
RECOVER CORRUPTION LIST;
STARTUP FORCE MOUNT
list DB_UNIQUE_NAME all;
list backup by file;
LIST BACKUPSET 49;
CATALOG BACKUPPIECE ‘/disk2/09dtq55d_1_2’, ‘/disk2/0bdtqdou_1_1’;
SELECT HANDLE FROM V$BACKUP_PIECE;
CATALOG RECOVERY AREA;
BACKUP…DELETE [ALL] INPUT If you specify DELETE INPUT (without ALL), then RMAN deletes only the specific files that it backs up. If you specify ALL INPUT, then RMAN deletes all copies of the files recorded in the RMAN repository.
DELETE NOPROMPT ARCHIVELOG ALL;
RESTORE SPFILE TO PFILE ‘/tmp/test_restore.f’;
REPAIR FAILURE PREVIEW;

You can run RESTORE…VALIDATE to test whether RMAN can restore a specific file or set of files from a backup. RMAN chooses which backups to use. RESTORE DATABASE VALIDATE; RESTORE ARCHIVELOG ALL VALIDATE;
restore……preview 虽然对列出恢复所需的文件列表不进行有效性检查,不过我们可以通过命令如 restore validate database|restore validate archivelog sequence between xx and xx 对给出的恢复文件列表进行验证。

As an alternative to RESTORE … PREVIEW, you can use the RESTORE … VALIDATE HEADER command. In addition to listing the files needed for restore and recovery, the RESTORE … VALIDATE HEADER command validates the backup file headers to determine whether the files on disk or in the media management catalog correspond to the metadata in the RMAN repository.
RESTORE DATABASE PREVIEW SUMMARY;

restore database preview recall;You can use RESTORE … PREVIEW RECALL to instruct the media manager to make off-site backups available.

SET ARCHIVELOG DESTINATION TO ‘/oracle/temp_restore’;

Enter the following command to point the control file to the latest image copy of the database: SWITCH DATABASE TO COPY;

export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT=‘Mon DD YYYY HH24:MI:SS’

% rman CHECKSYNTAX
RMAN> run { backup database; }Oracle 闪回区(Oracle Flash recovery area)

LIST COPY OF DATAFILE 2 COMPLETED BETWEEN ‘10-DEC-2012’ AND ‘17-DEC-2012’;
CHANGE COPY OF ARCHIVELOG SEQUENCE BETWEEN 1000 AND 1012 UNAVAILABLE;
REPORT UNRECOVERABLE 报告哪些数据库文件需要备份,因为它们已受到某些NOLOGGING操作
CHANGE BACKUPPIECE GUID ‘DFCE8C3A437F214EB4230070EC0D294E’ UNCATALOG;
REPORT NEED BACKUP RECOVERY WINDOW OF n DAYS
REPORT NEED BACKUP REDUNDANCY n
REPORT OBSOLETE RECOVERY WINDOW OF 3 DAYS;

Starting with Oracle Database 12c Release 1 (12.1), you can create multisection full backups that are stored as image copies.
BACKUP DURATION 4:00 TABLESPACE users;
BACKUP DURATION 4:00 MINIMIZE LOAD DATABASE FILESPERSET 1;

BACKUP DURATION 4:00 PARTIAL MINIMIZE TIME DATABASE FILESPERSET 1;

enter the following commands to validate all database files and archived redo log files for physical and logical corruption:
BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;
LIST BACKUP RECOVERABLE
LIST BACKUP OF DATABASE;
LIST COPY OF DATAFILE 1, 2;
LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 10;
LIST BACKUPSET OF DATAFILE 1;
LIST BACKUP SUMMARY
REPORT UNRECOVERABLE
RESTORE DATABASE PREVIEW SUMMARY;
STARTUP FORCE MOUNT;

Obtain the block numbers of the corrupted blocks if you do not have this information.
RMAN> SELECT NAME, VALUE FROM V$DIAG_INFO;

No direct communication occurs between the RMAN client and the media manager.

CHANGE BACKUP FOR DB_UNIQUE_NAME standby1 RESET DB_UNIQUE_NAME;
CHANGE BACKUP FOR DB_UNIQUE_NAME standby3 RESET DB_UNIQUE_NAME TO standby2;

rman CHECKSYNTAX You can check the syntax of RMAN commands interactively without actually executing the commands.

ibobk.so是源端的文件,不是客户端的!
run{
allocate channel c1 type ‘sbt_tape’ connect ‘sys/dingjia@192.168.87.178/guangxi’ parms=’
SBT_LIBRARY=/opt/scutech/dbackup3/lib/libobk.so,
ENV=(URL=http://192.168.87.155:50306/d2/data/171da4d6a62711ea8000b49691622ac4/3da117c89f1a11ea8000b49691622ac4,
RETRY_TIMEOUT=600,
COMPRESS=lzo,
EXTRA=X-Access-Key:ea5350ac00fa61d08533a729da808de0)’ trace=0;
backup tag ‘rman_1’ tablespace users;
release channel c1;
}

CONFIGURE CHANNEL DEVICE TYPE sbt parms=’
SBT_LIBRARY=/opt/scutech/dbackup3/lib/libobk.so,
ENV=(URL=http://192.168.87.155:50306/d2/data/171da4d6a62711ea8000b49691622ac4/3da117c89f1a11ea8000b49691622ac4,
RETRY_TIMEOUT=600,
COMPRESS=lzo,
EXTRA=X-Access-Key:ea5350ac00fa61d08533a729da808de0)’ trace=0;

Before starting media recovery, the instance that is performing the recovery should be started in MOUNT mode. The other instances should be started in NOMOUNT mode.

During a backup, the instances to which the channels connect must be either all mounted or all open.

姚远ACE CSDN认证博客专家 ACE 华为云 MVP
Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;获得过两次国家部级科技进步奖;发明过两项计算机专利。微信:yaoyuanace 邮箱:yaoyuanace(at)qq.com
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页