This post is about re-synchronized a duplicated database: the source database is PROD@vsi08 server and the target database will have the same SID, but located @vsi10 server.

All the steps to set up a duplicated database are already explained in this previous post.
Let’s duplicate for the first time our target database PROD located on a different server (vsi10) using a backup taken from the source database PROD located on vsi08 server: the duplicated database have the same SID and directories structure of source database.

So I need to take a backup of PROD database at vsi08 server

The available backups for PROD database @vsi08 server are the following:

I copy all backup sets from vsi08 to vsi10 server, creating the same directories on the remote server:

To start the duplicate process I need to start in NOMOUNT mode the instance I want to duplicate:

Connecting from vsi10 server to the target (@vsi08 server) database and to the auxiliary (@vsi10 server) I can execute the duplicate target database command.

The database was duplicated using a backup coming from the target server. Let’s see if the two databases have the same data.

On vsi10 server I have of course the same amount of data:

Now on vsi08 server (the target database) I executes some switch of logfile, inserting 2000 more rows on SYS.TEST table:

I would like to resynchronize the already duplicated database with these 2000 rows so I first have to backup the new archived redo log @vsi08 server:

The PROD database @vsi10 server must run always in NOMOUNT mode to successfully re-synchronize it:

Using the same duplicate target database command as above on vsi10 server I can re-synchronize it with the new 2000 rows.

Let’s see how many rows are into SYS.TEST table

That’s all right.

My duplicated database is really synchronized with PROD database @vsi08 server: I have the same amount of rows into SYS.TEST table.

But now I want to go back in time on my vsi10 server and exactly I want to go back few minutes before I inserted 2000 more rows on vsi08 server.
After I inserted those rows on PROD database @vsi08 server I took a backup of the archived redo log: as you can seen above that backup started at 04-04-2013 12:05:03 (search in this post the following text: Starting backup at 04-04-2013 12:05:03) and, since it includes the new 2000 rows, I need simply to do not apply it during the duplicate process.

Let’s see what my current time is:

So I need to go back in time for about 40 minutes that is before the backup including the new 2000 rows started (11:58:31 < 12:05:03)

With the already available backups copied previously on vsi10 server I start in NOMOUNT mode the instance…

…and then I simply execute once again the duplicate target database command using also the until time clause.
In this way I’m able to have a complete copy on vsi10 server of the PROD database that was running on vsi08 server untill ’04-04-2013 11:58:31′ time:

As you can verify the above RMAN command didn’t apply the backup set o1_mf_annnn_TAG20130404T120505_8otn2kln_.bkp containing the 2000 rows: indeed when I query the SYS.TEST table I can see only the first 1000 rows.

Let’s insert on PROD database @vsi08 server other 2000 rows:

Let’s take another backup of the new archived redo logs:

Execute the same command to re-synchronize the PROD database @vsi10 server:

Again on PROD database @vsi10 server there are the same rows existing in PROD database @vsi08 server: the two database are again synchronized.

Thank you for giving your valuable time to read the above information.

Source

For More Detail , You can join us follow:

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Comments

Leave a Reply