How to configure Oracle RMAN backup for the first time | DBAtr... https://dbatricksworld.com/how-to-configure-oracle-rman-backu...
Published 3 years ago by Jignesh Jethwa
Search
Platform independent database - Embeddable SQL/PL database
[oracle@centos ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 3 11:28:24 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
1 of 6 5/24/17, 5:02 PM
How to configure Oracle RMAN backup for the first time | DBAtr... https://dbatricksworld.com/how-to-configure-oracle-rman-backu...
SQL> select log_mode from v$database;
LOG_MODE
------------
NOARCHIVELOG
Database is in NOARCHIVELOG mode.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 308981760 bytes
Fixed Size 2212896 bytes
Variable Size 163580896 bytes
Database Buffers 138412032 bytes
Redo Buffers 4775936 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
SQL> alter system set log_archive_dest_1='location=/home/oracle/arch' scope=both;
System altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch
Oldest online log sequence 2
Next log sequence to archive 4
2 of 6 5/24/17, 5:02 PM
How to configure Oracle RMAN backup for the first time | DBAtr... https://dbatricksworld.com/how-to-configure-oracle-rman-backu...
Current log sequence 4
SQL> show parameter db_recovery_file_dest
[oracle@centos ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jan 3 11:46:22 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1363580714)
RMAN>
RMAN> configure controlfile autobackup on;
RMAN> configure backup optimization on;
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
[oracle@centos ~]$ sqlplus "/ as sysdba"
SQL> select global_name from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
CATALOGD
SQL> create tablespace catalogtbs datafile '/home/oracle/dbfile/catalogtbs1.dbf' size 100M autoextend
Tablespace created.
SQL> create user recoveryman identified by recoveryman;
User created.
SQL> alter user recoveryman default tablespace catalogtbs temporary tablespace temp;
User altered.
SQL> grant recovery_catalog_owner to recoveryman;
Grant succeeded.
SQL> grant connect,resource to recoveryman;
3 of 6 5/24/17, 5:02 PM
How to configure Oracle RMAN backup for the first time | DBAtr... https://dbatricksworld.com/how-to-configure-oracle-rman-backu...
Grant succeeded.
[oracle@oracle ~]$ rman target / catalog recoveryman/recoveryman@catalogdb
Recovery Manager: Release 11.2.0.1.0 - Production on Sat Jan 4 14:30:28 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1363580714)
connected to recovery catalog database
RMAN> create catalog;
recovery catalog created
[oracle@oracle ~]$ sqlplus "recoveryman/recoveryman@catalogdb"
SQL> show user;
USER is "RECOVERYMAN"
SQL> select table_name from user_tables;
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> report schema;
Report of database schema for database with db_unique_name ORCL
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 670 SYSTEM YES /home/oracle/app/oracle/oradata/orcl/system01.dbf
2 490 SYSAUX NO /home/oracle/app/oracle/oradata/orcl/sysaux01.dbf
3 30 UNDOTBS1 YES /home/oracle/app/oracle/oradata/orcl/undotbs01.dbf
4 5 USERS NO /home/oracle/app/oracle/oradata/orcl/users01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- ----------- --------- -------------------------------
1 20 TEMP 32767 /home/oracle/app/oracle/oradata/orcl/temp01.dbf
RMAN> LIST INCARNATION OF DATABASE;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- ------------ --- --------
89 102 ORCL 1363580714 PARENT 1 15-AUG-09
89 90 ORCL 1363580714 CURRENT 945184 02-JAN-14
4 of 6 5/24/17, 5:02 PM
How to configure Oracle RMAN backup for the first time | DBAtr... https://dbatricksworld.com/how-to-configure-oracle-rman-backu...
Share Tweet submit 12
Share 0
Email Print
This entry was posted in Oracle Backup & Restore and tagged Oracle, rman.
←
→
5 of 6 5/24/17, 5:02 PM
How to configure Oracle RMAN backup for the first time | DBAtr... https://dbatricksworld.com/how-to-configure-oracle-rman-backu...
RMAN> BACKUP DATABASE;
RMAN> BACKUP ARCHIVELOG ALL;
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
Leave a Reply
6 of 6 5/24/17, 5:02 PM