Site icon IT Tutorial

Restore Tablespace, Archivelog and Datafile via RMAN | Oracle RMAN ( Recovery Manager ) Restore Recover Tutorials -5

Hi,

I will tell you about the RMAN (Recovery Manager) tool that we use frequently Backup and Restore operations in Oracle Databases in this fourth article of my tutorial series.

 

Read my rman backup tutorial series before this article with following links. We will use these backups in this restore recover tutorial series.

 

https://ittutorial.org/2019/03/27/oracle-rman-recovery-manager-backup-tutorials-8/

 

then read older article of this tutorial series with following link.

 

 

https://ittutorial.org/2019/03/28/oracle-rman-recovery-manager-restore-recover-tutorials-1/

https://ittutorial.org/2019/03/28/oracle-rman-recovery-manager-restore-recover-tutorials-3/

https://ittutorial.org/2019/03/29/oracle-rman-recovery-manager-restore-recover-tutorials-4/

 

 

You can restore users tablespace with following command.

RMAN> restore tablespace users;

Starting restore at 26-MAR-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK

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 00007 to /oradata/19c/DEVECI19C/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/backup/1rttdk6g_1_1
channel ORA_DISK_1: piece handle=/u01/backup/1rttdk6g_1_1 tag=TAG20190326T143143
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 26-MAR-19

RMAN>

RMAN>

 

Make tablespace online.

 

[oracle@MehmetSalih backup]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 26 15:35:26 2019
Version 19.2.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.2.0.0.0

SQL> alter tablespace users online;

Tablespace altered.

 

 

You can restore any datafiles with its number like following.

 

RMAN> restore datafile 4;

Starting restore at 26-MAR-19
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 00004 to /oradata/19c/DEVECI19C/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /u01/backup/1rttdk6g_1_1
channel ORA_DISK_1: piece handle=/u01/backup/1rttdk6g_1_1 tag=TAG20190326T143143
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 26-MAR-19

RMAN>

 

The following command is used to restore all archivelogs.

RMAN> RESTORE ARCHIVELOG ALL;




The following command is used to restore Archivelog in a certain sequence range.

RMAN> RESTORE ARCHIVELOG FROM SEQUENCE 1453 UNTIL SEQUENCE 2013;


The following command is used to be able to restore archivelogs  from a certain sequence number.

RMAN> RESTORE ARCHIVELOG FROM LOGSEQ= 1453;




In addition to this, the following command is used to restore archivelogs at certain time intervals.

RMAN> RESTORE ARCHIVELOG FROM TIME 'SYSDATE-10' UNTIL TIME 'SYSDATE-1';

The following command is used to restore Archivelogs in a specific SCN range.

RMAN> RESTORE ARCHIVELOG SCN BETWEEN 1453 and 2019;

 

https://ittutorial.org/2019/03/28/oracle-rman-recovery-manager-restore-recover-tutorials-2/

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

Exit mobile version