ITPub博客

首页 > 数据库 > 数据库开发技术 > RMAN相关基础操作

RMAN相关基础操作

原创 数据库开发技术 作者:lukeunique 时间:2018-01-12 21:28:08 0 删除 编辑

本文介绍RMAN相关基础操作。


RMAN的命令包括2种:


单独的命令(Stand-alone command):单独执行

批处理命令(Job command):在RUN{}中运行


##基本操作


1.没有catalog的rman连接和操作


没有catalog的rman连接:

[oracle@PCNAME-orcl labs]$ rman target /


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 9 07:33:58 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


connected to target database: ORCL (DBID=1492651505)


RMAN>


设置自动的控制文件备份


RMAN> configure controlfile autobackup on;


using target database control file instead of recovery catalog

new RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP ON;

new RMAN configuration parameters are successfully stored


备份数据库:


RMAN> backup database plus archivelog;


Starting backup at 09-JAN-18

current log archived

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=19 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=17 RECID=1 STAMP=964908066

input archived log thread=1 sequence=18 RECID=2 STAMP=964943081

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_annnn_TAG20180109T074441_f58wqb3j_.bkp tag=TAG20180109T074441 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

Finished backup at 09-JAN-18


Starting backup at 09-JAN-18

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_nnndf_TAG20180109T074445_f58wqfh2_.bkp tag=TAG20180109T074445 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15

Finished backup at 09-JAN-18


Starting backup at 09-JAN-18

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=19 RECID=3 STAMP=964943100

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_annnn_TAG20180109T074500_f58wqwnl_.bkp tag=TAG20180109T074500 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 09-JAN-18


Starting Control File and SPFILE Autobackup at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964943101_f58wqy61_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 09-JAN-18


RMAN> exit

Recovery Manager complete.



2.创建 recovery catalog数据库


在TEST1上创建catalog数据库


--连接catalog数据库

[oracle@PCNAME-orcl labs]$ export ORACLE_SID=TEST1

[oracle@PCNAME-TEST1 labs]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 9 07:50:06 2018


Copyright (c) 1982, 2011, Oracle.  All rights reserved.



Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining

and Real Application Testing options


SYS@TEST1 09-JAN-18>


创建使用的表空间


create tablespace RCTS

datafile '/u01/app/oracle/oradata/TEST1/rcts01.dbf'

size 10M autoextend on;


创建使用的用户


create user RCUSER identified by oracle

default tablespace RCTS

quota unlimited on RCTS;


赋予用户权限


grant RECOVERY_CATALOG_OWNER to RCUSER;


3.连接recovery catalog数据库


rman catalog User/Password@tnsname


[oracle@PCNAME-TEST1 labs]$ rman catalog rcuser/oracle@TEST1


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 9 08:09:43 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


connected to recovery catalog database


RMAN> create catalog;


recovery catalog created


RMAN>



4.连接target数据库和catalog数据库


[oracle@PCNAME-TEST1 labs]$ export ORACLE_SID=orcl

[oracle@PCNAME-orcl labs]$ rman target / catalog rcuser/oracle@TEST1


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 9 08:13:27 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1492651505)

connected to recovery catalog database


同步控制文件和recovery catalog


RMAN> resync catalog;


RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of resync command at 01/09/2018 08:19:47

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

由于目标数据库并没有注册到recovery catalog中,所以报错。


注册target数据库到recovery catalog(register database):


RMAN> register database;


database registered in recovery catalog

starting full resync of recovery catalog

full resync complete


5.通过RMAN进行backup


RMAN> backup database;


Starting backup at 09-JAN-18

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=18 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_nnndf_TAG20180109T083048_f58zfsch_.bkp tag=TAG20180109T083048 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:12

Finished backup at 09-JAN-18


Starting Control File and SPFILE Autobackup at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964945861_f58zg5v0_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 09-JAN-18


##数据库RMAN配置的确认


[oracle@PCNAME-orcl labs]$ rman target /


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 9 08:36:55 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


connected to target database: ORCL (DBID=1492651505)


查看设定的内容:


RMAN> show all;


using target database control file instead of recovery catalog

RMAN configuration parameters for database with db_unique_name ORCL are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

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 ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default


RMAN>



##创建和管理备份


rman target / catalog rcuser/oracle@TEST1

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE BACKUP OPTIMIZATION ON;

---enable block change tracking

alter database enable block change tracking using file

'/u01/app/oracle/oradata/orcl/chg_track.f';


创建incremental level 0的backup


[oracle@PCNAME-orcl labs]$ rman target / catalog rcuser/oracle@TEST1


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 9 08:49:18 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


connected to target database: ORCL (DBID=1492651505)

connected to recovery catalog database


RMAN> backup incremental level 0 database;


Starting backup at 09-JAN-18

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=23 device type=DISK

channel ORA_DISK_1: starting incremental level 0 datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_nnnd0_TAG20180109T084927_f590jr1o_.bkp tag=TAG20180109T084927 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07

Finished backup at 09-JAN-18


Starting Control File and SPFILE Autobackup at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964946975_f590jzr3_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 09-JAN-18


查看备份的内容:


RMAN> list backup;

RMAN> list copy;


创建Long-Term storage using the tag(long01) :


$ mkdir /home/oracle/my-files/backup

$ rman target / catalog rcuser/oracle@TEST1


RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK format '/home/oracle/my-files/backup/%U';

RMAN> backup database keep forever tag long01;

RMAN> list backup summary;

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK clear;


old RMAN configuration parameters:

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/home/oracle/my-files/backup/%U';

old RMAN configuration parameters are successfully deleted

released channel: ORA_DISK_1


starting full resync of recovery catalog

full resync complete


##RMAN恢复数据文件


破坏数据文件:


[oracle@PCNAME-orcl labs]$ ls /u01/app/oracle/oradata/orcl/example01.dbf

/u01/app/oracle/oradata/orcl/example01.dbf

[oracle@PCNAME-orcl labs]$ rm /u01/app/oracle/oradata/orcl/example01.dbf

[oracle@PCNAME-orcl labs]$


SYS@orcl 09-JAN-18> shutdown

ORA-01116: error in opening database file 5

ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf'

ORA-27041: unable to open file

Linux Error: 2: No such file or directory

Additional information: 3


使用RMAN恢复:

rman target / catalog rcuser/oracle@TEST1

list failure;

advise failure;

repair failure;


RMAN> list failure;


List of Database Failures

=========================


Failure ID Priority Status    Time Detected Summary

---------- -------- --------- ------------- -------

322        HIGH     OPEN      09-JAN-18     One or more non-system datafiles are missing


RMAN> advise failure;


List of Database Failures

=========================


Failure ID Priority Status    Time Detected Summary

---------- -------- --------- ------------- -------

322        HIGH     OPEN      09-JAN-18     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=138 device type=DISK

analyzing automatic repair options complete


Mandatory Manual Actions

========================

no manual actions available


Optional Manual Actions

=======================

1. If file /u01/app/oracle/oradata/orcl/example01.dbf was unintentionally renamed or moved, restore it


Automated Repair Options

========================

Option Repair Description

------ ------------------

1      Restore and recover datafile 5

  Strategy: The repair includes complete media recovery with no data loss

  Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_1750240907.hm


RMAN>


RMAN> repair failure;


Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_1750240907.hm


contents of repair script:

   # restore and recover datafile

   sql 'alter database datafile 5 offline';

   restore datafile 5;

   recover datafile 5;

   sql 'alter database datafile 5 online';


Do you really want to execute the above repair (enter YES or NO)? YES

executing repair script


sql statement: alter database datafile 5 offline


Starting restore at 09-JAN-18

using channel ORA_DISK_1


channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf

channel ORA_DISK_1: reading from backup piece /home/oracle/my-files/backup/0aso7rhl_1_1

channel ORA_DISK_1: piece handle=/home/oracle/my-files/backup/0aso7rhl_1_1 tag=LONG01

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 09-JAN-18


Starting recover at 09-JAN-18

using channel ORA_DISK_1


starting media recovery

media recovery complete, elapsed time: 00:00:01


Finished recover at 09-JAN-18


sql statement: alter database datafile 5 online

repair failure complete


##RMAN恢复控制文件(Control Files)


破坏控制文件:


SYS@orcl 09-JAN-18> SELECT name FROM v$controlfile;


NAME

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/orcl/ora_control01

/u01/app/oracle/oradata/orcl/ora_control02


[oracle@PCNAME-orcl orcl]$ ls /u01/app/oracle/oradata/orcl/ora_control*

/u01/app/oracle/oradata/orcl/ora_control01  /u01/app/oracle/oradata/orcl/ora_control02

[oracle@PCNAME-orcl orcl]$ mv /u01/app/oracle/oradata/orcl/ora_control01 /u01/app/oracle/oradata/orcl/ora_control01.bak

[oracle@PCNAME-orcl orcl]$ mv /u01/app/oracle/oradata/orcl/ora_control02 /u01/app/oracle/oradata/orcl/ora_control02.bak

[oracle@PCNAME-orcl orcl]$  ls /u01/app/oracle/oradata/orcl/ora_control*

/u01/app/oracle/oradata/orcl/ora_control01.bak  /u01/app/oracle/oradata/orcl/ora_control02.bak

[oracle@PCNAME-orcl orcl]$

[oracle@PCNAME-orcl orcl]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 9 09:57:59 2018


Copyright (c) 1982, 2011, Oracle.  All rights reserved.



Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining

and Real Application Testing options


SYS@orcl 09-JAN-18> SELECT * FROM v$controlfile_record_section;

SELECT * FROM v$controlfile_record_section

*

ERROR at line 1:

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/u01/app/oracle/oradata/orcl/ora_control01'

ORA-27041: unable to open file

Linux Error: 2: No such file or directory

Additional information: 3

[oracle@PCNAME-orcl orcl]$ rman target /


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 9 09:58:39 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00554: initialization of internal recovery manager package failed

RMAN-06003: ORACLE error from target database:

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/u01/app/oracle/oradata/orcl/ora_control01'

ORA-27041: unable to open file

Linux Error: 2: No such file or directory

Additional information: 3



关闭数据库后进行RMAN恢复:


[oracle@PCNAME-orcl orcl]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 9 09:59:17 2018


Copyright (c) 1982, 2011, Oracle.  All rights reserved.



Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining

and Real Application Testing options


SYS@orcl 09-JAN-18> shutdown

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/u01/app/oracle/oradata/orcl/ora_control01'

ORA-27041: unable to open file

Linux Error: 2: No such file or directory

Additional information: 3

SYS@orcl 09-JAN-18> shutdown abort

ORACLE instance shut down.

SYS@orcl 09-JAN-18>



rman target /

startup nomount

restore controlfile from autobackup;

alter database mount;

recover database;

alter database open resetlogs;

---whole database backup

SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';

backup archivelog all;

backup database;


[oracle@PCNAME-orcl orcl]$ rman target /


Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 9 10:00:04 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


connected to target database (not started)


RMAN> startup nomount


Oracle instance started


Total System Global Area     836976640 bytes


Fixed Size                     1348160 bytes

Variable Size                503320000 bytes

Database Buffers             327155712 bytes

Redo Buffers                   5152768 bytes


RMAN> restore controlfile from autobackup;


Starting restore at 09-JAN-18

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=134 device type=DISK


recovery area destination: /u01/app/oracle/fast_recovery_area

database name (or database unique name) used for search: ORCL

channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964949456_f592yjoj_.bkp found in the recovery area

AUTOBACKUP search with format "%F" not attempted because DBID was not set

channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964949456_f592yjoj_.bkp

channel ORA_DISK_1: control file restore from AUTOBACKUP complete

output file name=/u01/app/oracle/oradata/orcl/ora_control01

output file name=/u01/app/oracle/oradata/orcl/ora_control02

Finished restore at 09-JAN-18


RMAN> alter database mount;


database mounted

released channel: ORA_DISK_1


RMAN> recover database;


Starting recover at 09-JAN-18

Starting implicit crosscheck backup at 09-JAN-18

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=134 device type=DISK

Crosschecked 12 objects

Finished implicit crosscheck backup at 09-JAN-18


Starting implicit crosscheck copy at 09-JAN-18

using channel ORA_DISK_1

Finished implicit crosscheck copy at 09-JAN-18


searching for all files in the recovery area

cataloging files...

cataloging done


List of Cataloged Files

=======================

File Name: /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964949456_f592yjoj_.bkp


using channel ORA_DISK_1


starting media recovery


archived log for thread 1 with sequence 23 is already on disk as file /u01/app/oracle/oradata/orcl/redo02a.log

archived log file name=/u01/app/oracle/oradata/orcl/redo02a.log thread=1 sequence=23

media recovery complete, elapsed time: 00:00:00

Finished recover at 09-JAN-18


RMAN> alter database open

2> ;


RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of alter db command at 01/09/2018 10:01:44

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


RMAN> alter database open resetlogs;


database opened


RMAN> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';


sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT


RMAN> backup archivelog all;


Starting backup at 09-JAN-18

current log archived

using channel ORA_DISK_1

skipping archived logs of thread 1 from sequence 17 to 19; already backed up

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=20 RECID=4 STAMP=964947440

input archived log thread=1 sequence=21 RECID=12 STAMP=964951316

input archived log thread=1 sequence=22 RECID=10 STAMP=964951316

input archived log thread=1 sequence=23 RECID=11 STAMP=964951316

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_annnn_TAG20180109T100231_f594sr4f_.bkp tag=TAG20180109T100231 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=1 RECID=13 STAMP=964951342

input archived log thread=1 sequence=2 RECID=14 STAMP=964951351

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_annnn_TAG20180109T100231_f594ss6x_.bkp tag=TAG20180109T100231 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 09-JAN-18


Starting Control File and SPFILE Autobackup at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964951354_f594stfs_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 09-JAN-18


RMAN> backup database;


Starting backup at 09-JAN-18

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf

channel ORA_DISK_1: starting piece 1 at 09-JAN-18

channel ORA_DISK_1: finished piece 1 at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_01_09/o1_mf_nnndf_TAG20180109T100241_f594t1lk_.bkp tag=TAG20180109T100241 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15

Finished backup at 09-JAN-18


Starting Control File and SPFILE Autobackup at 09-JAN-18

piece handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2018_01_09/o1_mf_s_964951376_f594tjp9_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 09-JAN-18


RMAN>



参考:

Oracle® Database Backup and Recovery User's Guide 11g Release 2 (11.2) 

Part Number E10642-05

Oracle® Database Backup and Recovery Reference 11g Release 2 (11.2) 

Part Number E10643-06



原文作者:SQL和数据库技术;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2017-07-21

  • 博文量
    107
  • 访问量
    63587