facebook twitter youtube facebook facebook facebook

E-Mail : info@askmlabs.com

Phone : +1.215.353.8306

Latest Post
Showing posts with label refresh. Show all posts
Showing posts with label refresh. Show all posts

Refreshing a Database with backups available on Tape

Written By askMLabs on Wednesday, May 4, 2011 | 3:30 PM

In the present article i am going to describe how to refresh a database. Assume that you have some consistant backups available on TAPE for the database to be refreshed.

Just follow the following sequence of steps to refresh a database ....

$sqlplus '/as sysdba'
SQL> select dbid,created,controlfile_created,last_open_incarnation# from v$database;
-- Note down the dbid and incarnation
SQL> archive log list
-- Note down sequence numbers
-- Now create one user and input some data to user. This is to verify  that after refresh we should not get this data.
SQL> create user askm identified by askm;
SQL> grant connect,resource to askm;
SQL> conn askm/askm
SQL> create table test_table as select * from sys.dba_objects;
-- Verify the tape configuration
$ tdpoconf SHOWENVironment
$ tdpoconf SHOWENVironment -tdpo_optfile=tdpo.opt
-- Connect to RMAN and verify the available backups
$ rman target / catalog rman/rman@rmancat
RMAN> list backup summary;
-- Exit from RMAN session and shutdown the database
SQL> shut immediate

RMAN Refresh Script:

$ rman target / catalog rman/rman@rmancat
RMAN> startup nomount;
RMAN> run {
allocate channel t1 type 'SBT_TAPE' parms="ENV=(TDPO_OPTFILE=tdpo.opt)";
restore controlfile;
alter database mount;
restore database;
recover database noredo;
release channel t1;
}
alter database open resetlogs;

Verification Steps :

$sqlplus '/as sysdba'
SQL> select dbid,created,controlfile_created,last_open_incarnation# from v$database;
-- compare incarnation with earlier value
SQL> archive log list
-- compare sequence numbers,it now starts from 0.
SQL> select username ,created from dba_users where username='ASKM';
-- Should return no rows.

Follow the video demo showing how to restore a database from backups available on tape. This is a private video so, send me a personal request if you need access to this video.



Hope it helps
SRI
 
Support :
Copyright © 2013. askMLabs - All Rights Reserved
Proudly powered by Blogger