Database Reference
In-Depth Information
An Example of Using RMAN to Restore and
Recover a Database Table
In this example, we will use a database called ORCL . We will assume that you already have
an RMAN backup of that database and that all of the database's archived redo logs are
either backed up by RMAN or are available on disk. In this example, we will restore the
tables owned by the HR schema using the RMAN RESTORE FILE command after making
some changes to these tables. These tables are EMP , DEPT , SALGRADE , and BONUS . First, let's
look at the current time before any changes were made:
SQL> alter session set nls_date_format='mm/dd/yyyy hh24:mi:ss';
Session altered.
SQL> select sysdate, current_scn from v$database;
SYSDATE CURRENT_SCN
------------------- -----------
03/27/2013 10:24:29 2074999
Developers are using the HR schema in our database. The HR schema has four tables, as
shown in this query:
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE
The row counts in the table are shown here:
SQL> select count(*) from DEPT;
COUNT(*)
----------
4
SQL> select count(*) from EMP;
COUNT(*)
----------
14
SQL> select count(*) from BONUS;
Search WWH ::




Custom Search