Oracle RMAN backup Example
************Converting No archive log mode to Archive mode database***************
C:\Users\smohanty46>set ORACLE_SID=xe
C:\Users\smohanty46>sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.2.0
Production on Mon Feb 17 16:08:52 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Express Edition
Release 11.2.0.2.0 - Production
SQL> select
name from v$database;
NAME
---------
XE
SQL> show
user
USER is "SYS"
SQL> archive
log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 13
Current log sequence 14
SQL> shutdown
immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
mount
ORACLE instance started.
Total System Global Area 1071333376
bytes
Fixed Size 1388352 bytes
Variable Size 813695168 bytes
Database Buffers 251658240 bytes
Redo Buffers 4591616 bytes
Database mounted.
SQL> alter
database archivelog;
Database altered.
SQL> alter
database open;
Database altered.
SQL> archive
log list
Database
log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 13
Next log sequence to archive 14
Current log sequence 14
*********************Recovery Catalog configuration****************************
SQL> select
file_name,tablespace_name from dba_data_files;
FILE_NAME
TABLESPACE_NAME
--------------------------------------------------------------------------------
--------------------
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF USERS
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF UNDOTBS1
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF SYSAUX
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF SYSTEM
SQL> create
tablespace rman datafile 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\rman.dbf' size 10m;
Tablespace created.
SQL> create
user rman identified by rman default tablespace rman quota unlimited on rman;
User created.
SQL> grant
connect,resource,recovery_catalog_owner to rman;
Grant succeeded.
SQL> show
parameter control_file_record_keep_time
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
control_file_record_keep_time integer 7
SQL> alter
system set control_file_record_keep_time=10 scope=both;
System altered.
SQL> show parameter
control_file_record_keep_time
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
control_file_record_keep_time integer 10
SQL>
SQL> show
parameter db_recovery
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
db_recovery_file_dest string C:\oraclexe\app\oracle\fast_re
covery_area
db_recovery_file_dest_size big integer 10G
SQL> alter
system set db_recovery_file_dest_size=12G scope=both;
System altered.
SQL> show
parameter db_recovery_file_dest
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
db_recovery_file_dest string C:\oraclexe\app\oracle\fast_re
covery_area
db_recovery_file_dest_size big integer 12G
********************* Different Way to connect RMAN and creating
recovery catalog
C:\Users\smohanty46>set ORACLE_SID=XE
C:\Users\smohanty46>rman target /
Recovery Manager: Release 11.2.0.2.0 -
Production on Mon Feb 17 16:19:45 2014
Copyright (c) 1982, 2009, Oracle
and/or its affiliates. All rights
reserved.
connected to target database: XE
(DBID=2719768093)
RMAN> exit
Recovery Manager complete.
C:\Users\smohanty46>rman target sys/oracle nocatalog
Recovery Manager: Release 11.2.0.2.0 -
Production on Mon Feb 17 16:20:19 2014
Copyright (c) 1982, 2009, Oracle
and/or its affiliates. All rights
reserved.
connected to target database: XE
(DBID=2719768093)
using target database control file
instead of recovery catalog
RMAN> exit
C:\Users\smohanty46>rman target sys/oracle catalog rman/rman
Recovery Manager: Release 11.2.0.2.0 -
Production on Mon Feb 17 16:21:02 2014
Copyright (c) 1982, 2009, Oracle
and/or its affiliates. All rights
reserved.
connected to target database: XE (DBID=2719768093)
connected to recovery catalog database
***********************LOG File Generation
C:\Users\smohanty46>rman log c:\users\smohanty46\rman.log target /
RMAN> show
all;
************************CHECKSYNTAX COMMAND
C:\Users\smohanty46>rman CHECKSYNTAX
Recovery Manager: Release 11.2.0.2.0 -
Production on Mon Feb 17 16:52:15 2014
Copyright (c) 1982, 2009, Oracle
and/or its affiliates. All rights
reserved.
RMAN> run [
backup database;]
RMAN-00571:
===========================================================
RMAN-00569: =============== ERROR MESSAGE
STACK FOLLOWS ===============
RMAN-00571:
===========================================================
RMAN-00558: error encountered while
parsing input commands
RMAN-01006: error signaled during
parse
RMAN-02001: unrecognized punctuation
symbol "["
RMAN> run {
backup database; }
The command has no syntax errors
********************************CMD file option
C:\Users\smohanty46>rman target / catalog rman/rman
cmdfile="C:\Users\smohanty46\Desktop\rman_run_comm.txt”
Recovery Manager: Release 11.2.0.2.0 -
Production on Tue Feb 18 15:33:42 2014
Copyright (c) 1982, 2009, Oracle
and/or its affiliates. All rights
reserved.
connected to target database: XE
(DBID=2719768093)
connected to recovery catalog database
RMAN> run {
2> ALLOCATE CHANNEL disk1 DEVICE
TYPE DISK;
3> backup tablespace users;
4> backup datafile 2;
5> }
6>
allocated channel: disk1
channel disk1: SID=105 device
type=DISK
Starting Control File and SPFILE
Autobackup at 18-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\AUTOBACKUP\2014_02_18\O1_MF_S_839864097_9J6D
Finished Control File and SPFILE
Autobackup at 18-FEB-14
released channel: disk1
Recovery Manager complete.
********************************Multiple commands in run block
RMAN> run {
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK;
backup tablespace users;
backup datafile 2;
}
6>
allocated channel: disk1
channel disk1: SID=105 device
type=DISK
Starting backup at 18-FEB-14
channel disk1: starting full datafile
backup set
channel disk1: specifying datafile(s)
in backup set
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
channel disk1: starting piece 1 at
18-FEB-14
channel disk1: finished piece 1 at
18-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_18\O1_MF_NNNDF_TAG20140218T153348_9J6D056H_.BKP
tag=TAG20140218T153348
channel disk1: backup set complete,
elapsed time: 00:00:03
Finished backup at 18-FEB-14
Starting backup at 18-FEB-14
channel disk1: starting full datafile
backup set
channel disk1: specifying datafile(s)
in backup set
input datafile file number=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
channel disk1: starting piece 1 at
18-FEB-14
*********************Recovery catalog creation and register
database
RMAN> create
catalog;
recovery catalog created
RMAN> register
database;
database registered in recovery
catalog
starting full resync of recovery
catalog
full resync complete
RMAN> resync
catalog;
starting full resync of recovery
catalog
full resync complete
**********************RMAN Commands****************************************
RMAN> show
all;
RMAN configuration parameters for
database with db_unique_name XE are:
CONFIGURE RETENTION POLICY TO
REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; #
default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
# default
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
# default
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
'C:\ORACLEXE\APP\ORACLE\PRODUCT\11.2.0\SERVER\DATABASE\SNCFXE.ORA'; # default
RMAN> configure
retention policy to recovery window of 7 days;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY
WINDOW OF 7 DAYS;
new RMAN configuration parameters are
successfully stored
starting full resync of recovery
catalog
full resync complete
RMAN> configure
backup optimization on;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are
successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> configure
default device type to sbt;
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO
'SBT_TAPE';
new RMAN configuration parameters are
successfully stored
starting full resync of recovery
catalog
full resync complete
RMAN> configure
default device type to disk;
old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO
'SBT_TAPE';
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully
stored
starting full resync of recovery
catalog
full resync complete
RMAN> configure
controlfile autobackup on;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are
successfully stored
starting full resync of recovery
catalog
full resync complete
RMAN> SHOW
SNAPSHOT CONTROLFILE NAME;
RMAN configuration parameters for
database with db_unique_name XE are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO
'C:\ORACLEXE\APP\ORACLE\PRODUCT\11.2.0\SERVER\DATABASE\SNCFXE.ORA'; # defau
RMAN> report
schema;
Report of database schema for database
with db_unique_name XE
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- --------------------
------- ------------------------
1
390 SYSTEM YES
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
2
670 SYSAUX NO
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
3
40 UNDOTBS1 YES
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
4
100 USERS NO
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
5
10 RMAN NO
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- --------------------
----------- --------------------
1
20 TEMP 32767
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\TEMP.DBF
********************Backup commands
RMAN> backup
datafile 3;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=22 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=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20140217T1
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:07
Finished backup at 17-FEB-14
RMAN> backup
datafile 5,3;
Starting backup at 17-FEB-14
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=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG201
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
RMAN> backup
datafile 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF';
Starting backup at 17-FEB-14
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=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
RMAN> backup
tablespace users,temp;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
RMAN-00571:
===========================================================
RMAN-00569: =============== ERROR
MESSAGE STACK FOLLOWS ===============
RMAN-00571:
===========================================================
RMAN-03002: failure of backup command
at 02/17/2014 16:34:46
RMAN-06004: ORACLE error from recovery
catalog database: RMAN-20202: Tablespace not found in
RMAN-06019: could
not translate tablespace name "TEMP"
RMAN> backup
tablespace users,undotbs1;
Starting backup at 17-FEB-14
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=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TA
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
RMAN> backup
database;
Starting backup at 17-FEB-14
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=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
…………………………………………………………………………………………………………………………………………………………………..
…………………………continue………………………………………………………………………………………………………………………………
#override
optimization
RMAN> BACKUP
DATABASE FORCE;
Starting backup at 17-FEB-14
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=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
RMAN> backup
database plus archivelog;
Starting backup at 17-FEB-14
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device
type=DISK
…………………………………………………………………………………………………………………………………………………………………..
…………………………continue………………………………………………………………………………………………………………………………
RMAN> backup
archivelog all;
Starting backup at 17-FEB-14
current log archived
…………………………………………………………………………………………………………………………………………………………………..
…………………………continue………………………………………………………………………………………………………………………………
RMAN> backup
spfile;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full
datafile backup set
channel ORA_DISK_1: specifying
datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
…………………………………………………………………………………………………………………………………………………………………..
…………………………continue………………………………………………………………………………………………………………………………
RMAN> backup
current controlfile;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device
type=DISK
…………………………………………………………………………………………………………………………………………………………………..
…………………………continue………………………………………………………………………………………………………………………………
RMAN> backup
as backupset tablespace users;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=108 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=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG2014
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
RMAN> backup
as copy tablespace users;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
output file name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_USERS_9J3VKKFN_.DBF
tag=TAG20140217T164040 REC
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
*******************Exclude Tablespace in the backup
RMAN> CONFIGURE
EXCLUDE FOR TABLESPACE users;
Tablespace USERS will be excluded from
future whole database backups
new RMAN configuration parameters are
successfully stored
starting full resync of recovery
catalog
full resync complete
RMAN> BACKUP
DATABASE;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 device
type=DISK
file 4 is excluded from whole database
backup
channel ORA_DISK_1: starting full
datafile backup set
channel ORA_DISK_1: specifying
datafile(s) in backup set
input
datafile file number=00002 name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
input
datafile file number=00001 name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
input
datafile file number=00003 name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input
datafile file number=00005 name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
RMAN> CONFIGURE
EXCLUDE FOR TABLESPACE users clear;
Tablespace USERS will be included in
future whole database backups
old RMAN configuration parameters are
successfully deleted
starting full resync of recovery
catalog
full resync complete
RMAN> backup
database;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 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=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
input
datafile file number=00004 name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
RMAN> backup
tablespace users format 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\BACKUP_%U';
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 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=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece handle=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\BACKUP_0CP0S4U5_1_1
tag=TAG20140217T170924
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
Starting Control File and SPFILE
Autobackup at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\AUTOBACKUP\2014_02_17\O1_MF_S_83
Finished Control File and SPFILE
Autobackup at 17-FEB-14
RMAN> BACKUP
AS COPY TABLESPACE users,undotbs1 TAG mondaycpy;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device
type=DISK
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_USERS_9J3XPSHY_.DBF
tag=MONDAYCPY RECID=2 STAMP=839783860
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_UNDOTBS1_9J3XPWO9_.DBF
tag=MONDAYCPY
RECID=3 STAMP=839783862
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
Starting Control File and SPFILE
Autobackup at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\AUTOBACKUP\2014_02_17\O1_MF_S_839783864_9J3XQ12J_.BKP
comment=NONE
Finished Control File and SPFILE
Autobackup at 17-FEB-14
RMAN> backup
as compressed backupset tablespace users;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting
compressed full datafile backup set
channel ORA_DISK_1: specifying
datafile(s) in backup set
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NN
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:08
RMAN> backup
as compressed copy tablespace users;
RMAN-00571:
===========================================================
RMAN-00569:
=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:
===========================================================
RMAN-00558:
error encountered while parsing input commands
RMAN-01009:
syntax error: found "copy": expecting one of: "backupset"
RMAN-01007:
at line 1 column 22 file: standard input
*********************Incremental backup
RMAN> backup
incremental level 1 database;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel
ORA_DISK_1: SID=23 device type=DISK
no
parent backup or copy of datafile 2 found
no
parent backup or copy of datafile 1 found
no
parent backup or copy of datafile 4 found
no
parent backup or copy of datafile 3 found
RMAN> backup
incremental level 0 database;
Starting backup at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 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=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DB
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
RMAN> backup
incremental level 1 database;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting
incremental level 1 datafile backup set
channel ORA_DISK_1: specifying
datafile(s) in backup set
input datafile file number=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
RMAN> backup
incremental level 1 cumulative database;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting
incremental level 1 datafile backup set
channel ORA_DISK_1: specifying
datafile(s) in backup set
input datafile file number=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
RMAN> backup
incremental level 1 tablespace users;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting
incremental level 1 datafile backup set
channel ORA_DISK_1: specifying
datafile(s) in backup set
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNND1
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
RMAN> backup
incremental level 1 cumulative tablespace users;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting
incremental level 1 datafile backup set
channel ORA_DISK_1: specifying
datafile(s) in backup set
input datafile file number=00004 name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
channel ORA_DISK_1: starting piece 1
at 17-FEB-14
channel ORA_DISK_1: finished piece 1
at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNND1_TAG2014021
channel ORA_DISK_1: backup set
complete, elapsed time: 00:00:03
Finished backup at 17-FEB-14
Starting Control File and SPFILE
Autobackup at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\AUTOBACKUP\2014_02_17\O1_MF_S_839784460_9J3
Finished Control File and SPFILE
Autobackup at 17-FEB-14
RMAN> backup
as copy incremental level 1 tablespace users;
Starting
backup at 17-FEB-14
using
channel ORA_DISK_1
RMAN-00571:
===========================================================
RMAN-00569:
=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:
===========================================================
RMAN-03002:
failure of backup command at 02/17/2014 17:30:21
RMAN-06022:
invalid level specified for image copy: 1
RMAN> backup
as copy database tag monday;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_SYSAUX_9J3YOWBZ_.DBF
tag=MONDAY RECID=9 STAMP=839784870
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_SYSTEM_9J3YPOLY_.DBF
tag=MONDAY RECID=10 STAMP=839784888
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_USERS_9J3YQ4QT_.DBF
tag=MONDAY RECID=11 STAMP=839784895
channel ORA_DISK_1: datafile copy complete,
elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_UNDOTBS1_9J3YQ7WH_.DBF
tag=MONDAY RECID=12 STAMP=839784897
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
output file name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_RMAN_9J3YQC2X_.DBF
tag=MONDAY RECID=13 STAMP=839784899
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:01
RMAN> backup
incremental level 1 for recover of copy with tag 'monday' database;
Starting backup at 17-FEB-14
using channel ORA_DISK_1
no parent backup or copy of datafile 2
found
no parent backup or copy of datafile 1
found
no parent backup or copy of datafile 4
found
no parent backup or copy of datafile 3
found
no parent backup or copy of datafile 5
found
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00002
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_SYSAUX_9J3YSZLG_.DBF
tag=MONDAY RECID=14 STAMP=839785001
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00001
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
output file name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_SYSTEM_9J3YTRRS_.DBF
tag=MONDAY RECID=15 STAMP=839785025
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00004
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_USERS_9J3YVL0F_.DBF
tag=MONDAY RECID=16 STAMP=839785036
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_UNDOTBS1_9J3YVO5P_.DBF
tag=MONDAY RECID=17 STAMP=839785038
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile
copy
input datafile file number=00005
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\RMAN.DBF
output file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_RMAN_9J3YVRC5_.DBF
tag=MONDAY RECID=18 STAMP=839785040
channel ORA_DISK_1: datafile copy
complete, elapsed time: 00:00:01
Finished backup at 17-FEB-14
Starting Control File and SPFILE
Autobackup at 17-FEB-14
piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\AUTOBACKUP\2014_02_17\O1_MF_S_839785042_9J3YVTSF_.BKP
comment=NONE
Finished Control File and SPFILE
Autobackup at 17-FEB-14
***************************List, report commands
RMAN> list
backup;
List of Backup Sets
===================
BS Key
Type LV Size Device Type
Elapsed Time Completion Time
------- ---- -- ---------- -----------
------------ ---------------
52
Full 8.65M DISK 00:00:02 17-FEB-14
BP Key: 53 Status:
AVAILABLE Compressed: NO Tag: TAG20140217T163256
Piece Name:
C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20140217T
List of Datafiles in backup set 52
File LV Type Ckp SCN Ckp
Time Name
---- -- ---- ---------- --------- ----
3 Full 678652 17-FEB-14
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
BS Key
Type LV Size Device Type
Elapsed Time Completion Time
RMAN> list
backupset;
List of Backup Sets
===================
BS Key
Type LV Size Device Type
Elapsed Time Completion Time
------- ---- -- ---------- -----------
------------ ---------------
52
Full 8.65M DISK 00:00:02 17-FEB-14
BP Key: 53 Status:
AVAILABLE Compressed: NO Tag: TAG20140217T163256
Piece Name: C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_T
List of Datafiles in backup set 52
RMAN> list
backupset summary;
List of Backups
===============
Key
TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - -----------
--------------- ------- ------- ---------- ---
52
B F A DISK
17-FEB-14 1 1
NO TAG20140217T163256
65
B F A DISK
17-FEB-14 1 1
NO TAG20140217T163331
82
B F A DISK
17-FEB-14 1 1
NO TAG20140217T163429
103
B F A DISK
17-FEB-14 1 1
NO TAG20140217T163514
182
B F A DISK
17-FEB-14 1 1
NO TAG20140217T164009
282
B F A DISK
17-FEB-14 1 1
NO TAG20140217T164304
512
B F A DISK
17-FEB-14 1 1
NO TAG20140217T170924
548
B F A DISK
17-FEB-14 1 1
NO TAG20140217T170929
772
B F A DISK
17-FEB-14 1 1
NO TAG20140217T171744
898
B F A DISK
17-FEB-14 1 1
YES TAG20140217T171928
944
B F A DISK
17-FEB-14 1 1
NO TAG20140217T171938
RMAN> list
backupset 52;
List of Backup Sets
===================
BS Key
Type LV Size Device Type
Elapsed Time Completion Time
------- ---- -- ---------- -----------
------------ ---------------
52
Full 8.65M DISK
00:00:02 17-FEB-14
BP Key: 53 Status:
AVAILABLE Compressed: NO Tag: TAG20140217T163256
Piece Name:
C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20
List of Datafiles in backup set 52
File LV Type Ckp SCN Ckp
Time Name
---- -- ---- ---------- --------- ----
3 Full 678652 17-FEB-14
C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
RMAN> report
obsolete;
RMAN retention policy will be applied
to the command
RMAN retention policy is set to
recovery window of 7 days
no obsolete backups found
RMAN> report
need backup;
starting full resync of recovery
catalog
full resync complete
RMAN retention policy will be applied
to the command
RMAN retention policy is set to
recovery window of 7 days
Report of files that must be backed up
to satisfy 7 days recovery window
File Days Name
---- -----
-----------------------------------------------------
RMAN> REPORT
UNRECOVERABLE;
Report of files that need backup due
to unrecoverable operations
File Type of Backup Required Name
---- -----------------------
-----------------------------------
RMAN> configure
retention policy to redundancy 1;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY
WINDOW OF 1 DAYS;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO
REDUNDANCY 1;
new RMAN configuration parameters are
successfully stored
starting full resync of recovery
catalog
full resync complete
RMAN> report
obsolete;
RMAN retention policy will be applied
to the command
RMAN retention policy is set to
redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------
------------------ --------------------
Archive Log 33
17-FEB-14
C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\ARCHIVELOG\2014_02_17\O1_MF_1_14_9J3TNWKJ_.ARC
Backup Set 52 17-FEB-14
Backup Piece 53 17-FEB-14
C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20140217T163256_9J3V31V9_.BKP
Backup Set 65 17-FEB-14
Backup Piece 67 17-FEB-14
C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20140217T163331_9J3V44VV_.BKP
Backup Set 82 17-FEB-14
Backup Piece 85 17-FEB-14
C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20140217T163429_9J3V5YOS_.BKP
**********************Corsscheck and validate
RMAN> crosscheck
backup;
using channel ORA_DISK_1
crosschecked backup piece: found to be
'AVAILABLE'
backup piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_T
crosschecked backup piece: found to be
'AVAILABLE'
backup piece handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_T
crosschecked backup piece: found to be
'AVAILABLE'
backup piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_T
crosschecked backup piece: found to be
'AVAILABLE'
backup piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_T
crosschecked backup piece: found to be
'AVAILABLE'
RMAN> crosscheck
backupset;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=107 device
type=DISK
crosschecked backup piece: found to be
'AVAILABLE'
backup piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20140217T163256_9J3V31V9_.BKP
RECID=1 STAMP=839781177
crosschecked backup piece: found to be
'AVAILABLE'
backup piece
handle=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\BACKUPSET\2014_02_17\O1_MF_NNNDF_TAG20140217T163331_9J3V44VV_.BKP
RECID=2 STAMP=839781212
RMAN> crosscheck
copy;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=107 device
type=DISK
specification does not match any
control file copy in the repository
validation succeeded for datafile copy
datafile copy file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_SYSTEM_9J3YT
validation succeeded for datafile copy
datafile copy file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_SYSTEM_9J3YP
validation succeeded for datafile copy
datafile copy file
name=C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\DATAFILE\O1_MF_SYSTEM_9J3YL
validation succeeded for datafile copy
RMAN> validate
datafile 3;
Starting validate at 18-FEB-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting
validation of datafile
channel ORA_DISK_1: specifying
datafile(s) for validation
input datafile file number=00003
name=C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
channel ORA_DISK_1: validation
complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty
Blocks Blocks Examined High SCN
---- ------ --------------
------------ --------------- ----------
3
OK 0 1 5120 695166
File Name: C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 5119
Finished validate at 18-FEB-14
No comments:
Post a Comment