Login  Register

database restore

classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

database restore

satish
1160 posts
Dear Erman,

we are performing a database refresh.we are instructed to perform ram duplicate using until scn.could you please provide some queries which is helpful to put the correct scn during rman duplicate.

Thanks for all the support
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: database restore

ErmanArslansOracleBlog
Administrator
5731 posts
You will basically use " UNTIL SCN " clause in your rman script.
There are plenty of documents for this.

For finding the right SCN, you can use TIMESTAMP_TO_SCN function.

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: database restore

ErmanArslansOracleBlog
Administrator
5731 posts
You can even use a date to find the relevant scn ->

select timestamp_to_scn(to_timestamp('20/05/2018 18:24:54','DD/MM/YYYY HH24:MI:SS')) as scn from dual;
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: database restore

satish
1160 posts
Dear Erman,

Thanks for the update

could you please let us know why we are unable to get the scn

SQL> SELECT DATABASE_NAME, TIMESTAMP_TO_SCN('20-MAY-18 05:56:12 PM') FROM DUAL;
SELECT DATABASE_NAME, TIMESTAMP_TO_SCN('20-MAY-14 05:56:12 PM') FROM DUAL
                      *
ERROR at line 1:
ORA-08180: no snapshot found based on specified time
ORA-06512: at "SYS.TIMESTAMP_TO_SCN", line 1
 
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: database restore

ErmanArslansOracleBlog
Administrator
5731 posts
It is related with undo_retention. The information in undo is overwritten.

Read the documentation:

The association between an SCN and a timestamp when the SCN is generated is remembered by the database for a limited period of time. This period is the maximum of the auto-tuned undo retention period, if the database runs in the Automatic Undo Management mode, and the retention times of all flashback archives in the database, but no less than 120 hours. The time for the association to become obsolete elapses only when the database is open. An error is returned if the SCN specified for the argument to SCN_TO_TIMESTAMP is too old.