Starting with RMAN Commands :
In this Blog I will explain some basic steps with hands-on output to start with RMAN Backup and Recovery process in Oracle Database 11g. I will cover the below RMAN commands :
- backup database;
- backup database plus archivelog;
- backup datafile 4;
- backup spfile;
- backup current controlfie;
- backup archivelog all;
- configure controlfile autobackup all;
- list backup of database;
- report schema;
- backup datafile;
- backup datafile '<path>';
- list backup of datafile 4;
- backup tablespace ttbs;
- show all;
- delete EXPIRED backup;
- delete OBSOLETE backup;
- crosscheck backup;
[oracle@racnode2 ~]$ rman ---------> Enter into RMAN prompt
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 20 13:26:34 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target / -----------> Connect to target Database
connected to target database: TESTDB2 (DBID=1284867013)
RMAN> list backup; ----------> List existing RMAN backups present in the Server
using target database control file instead of recovery catalog
specification does not match any backup in the repository
RMAN> report need backup;--------> list the datafiles that need backup
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of files with less than 1 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1 0 /u01/app/oraclebase/oradata/testdb2/system01.dbf
2 0 /u01/app/oraclebase/oradata/testdb2/sysaux01.dbf
3 0 /u01/app/oraclebase/oradata/testdb2/undotbs01.dbf
4 0 /u01/app/oraclebase/oradata/testdb2/users01.dbf
5 0 /u01/app/oraclebase/oradata/testdb2/example01.dbf
RMAN> report schema; ------------> Report the files that needs to be backed up(fetches info from Control File), includes tempfile information also.
Report of database schema for database with db_unique_name TESTDB2
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 750 SYSTEM *** /u01/app/oraclebase/oradata/testdb2/system01.dbf
2 520 SYSAUX *** /u01/app/oraclebase/oradata/testdb2/sysaux01.dbf
3 90 UNDOTBS1 *** /u01/app/oraclebase/oradata/testdb2/undotbs01.dbf
4 5 USERS *** /u01/app/oraclebase/oradata/testdb2/users01.dbf
5 313 EXAMPLE *** /u01/app/oraclebase/oradata/testdb2/example01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 /u01/app/oraclebase/oradata/testdb2/temp01.dbf
RMAN> report; -----------> Lists all the options we can use with 'report' command in RMAN
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "device, need, obsolete, schema, unrecoverable"
RMAN-01007: at line 1 column 7 file: standard input
RMAN> report obsolete;---------> Reports backups that are no longer required
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
no obsolete backups found
No comments:
Post a Comment