tag:blogger.com,1999:blog-2807785752181271137.post7207282998558250158..comments2024-03-06T12:33:57.350+01:00Comments on Damir Vadas, Oracle as I learned: How to find correct SCN?Damir Vadashttp://www.blogger.com/profile/15963017378937428976noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-2807785752181271137.post-82063650388537845682019-04-18T07:14:35.227+02:002019-04-18T07:14:35.227+02:00Thank youThank youDamir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-80938848361372911722019-04-17T05:20:19.798+02:002019-04-17T05:20:19.798+02:00Good Blog. Nicely written.Good Blog. Nicely written.shiveshdbahttps://www.blogger.com/profile/11262832736719732909noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-34319110019899727812017-03-09T07:43:57.660+01:002017-03-09T07:43:57.660+01:00sooper explanation. Still helped me.sooper explanation. Still helped me.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-59718186771119614862015-12-24T18:33:20.577+01:002015-12-24T18:33:20.577+01:00is this RAC database?
If yes then every node has o...is this RAC database?<br />If yes then every node has own thread.Damir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-71588605410923150872015-12-24T18:26:31.556+01:002015-12-24T18:26:31.556+01:00Hi, I was running backup to disk but now I want to...Hi, I was running backup to disk but now I want to switch to SBT_TAPE. I have run a full database backup to my SBT device using the following command: backup as backupset full check logical database<br />Then I am trying to restore from the SBT backup but I am getting errors "RMAN-06054: media recovery requesting unknown archived log for thread...".<br />Why is it looking for archived logs?<br />From the controlfile information I have noticed that are datafiles with different Ckp SCN. For instance, in BS 19160 the datafiles have the Ckp SCN = 12489436489235, and for the BS 19161 the Ckp SCN is 12489436489236 (lastest BS).<br />I am running the RESTORE/RECOVERY using the UNTIL SCN=12489436489237 (12489436489236 + 1).ashumhttps://www.blogger.com/profile/08528835388303529064noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-58792236884184893472014-10-25T22:18:15.924+02:002014-10-25T22:18:15.924+02:00Good point, in fact I’ve been thinking of incorpor...Good point, in fact I’ve been thinking of incorporating “Restore Points” as part of my backups, without using flashback. Of course that would not work for my initial scenario, but it’ll reduce de guessing for most of the cases we normally face day to day.<br />Orlando.<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-34312160199764123582014-10-25T08:25:03.150+02:002014-10-25T08:25:03.150+02:00Here is an example how to create autonomous backup...Here is an example how to create autonomous backup,where you can see how to gather all important values youu need for restore and cover RAC version<br />http://damir-vadas.blogspot.com/2009/10/autonomous-rman-online-backup.html<br />Cheers<br />DamirDamir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-14757703705508881842014-10-25T08:19:17.596+02:002014-10-25T08:19:17.596+02:00Thanks for sharing this info. Looking forward to s...Thanks for sharing this info. Looking forward to see that script-appreciated in front.<br />But now come to mine mind...<br />If you want something bullet proof restore methods with SCN, maybe, just maybe, idea to place some logging activities in PLSQL which will save data to plain file (with action name, time and SCN ... and thread as well in RAC case ... anything you need), before any interesting activity over any kind of batch or mass processing.<br />This would be really huge help to get proper values for any restore in the future.<br />Hope this helps,<br />DamirDamir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-3657268745045677512014-10-24T23:21:55.585+02:002014-10-24T23:21:55.585+02:00Thanks for the quick response Damir, yes this help...Thanks for the quick response Damir, yes this helps. Now, using until time might have some issues due to “Bug 11694127” which might truncate the time part of the date, in fact the workaround Oracle offers (Doc ID 11694127.8) does not work consistently, I have tested that a few times.<br /><br />Due to that, yes I always use SCN for all my restores and duplicates; also, the TIMESTAMP_TO_SCN does not work all the time either, because as you know, some of the SCN’s returned might not be related to a log switch but for some other checkpoint activity, so I have seen RMAN trying to honor an SCN and no finding proper logs to apply, although all logs are there.<br /><br />Finally, the sequence values also help a lot, but when dealing with RAC environments, it is a bit confusing for some people because each instance normally have a different set of numbers and on top of that they also have multiple treads so it is not that easy to come up with the exact SCN.<br /><br />What we are trying to do is to have a very solid and bullet proof method and hopefully a small script that will take a time stamp as parameter and return that exact SCN we need every single time, whether we use a catalog or just control file.<br /><br />I have a very simple script that works most of the times, but for the long running scenario I described earlier, it might not be provide what we need and it only works with catalogs. As soon as I come up with a better one I’ll let you know.<br /><br />Nice talking to you again.<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-20159052734263280782014-10-23T18:29:19.657+02:002014-10-23T18:29:19.657+02:00Your restore must begin with backup from time when...Your restore must begin with backup from time when backup completed BEFORE restore point. From that moment, use archived logs (probably from both backups) and come to desired restore moment.<br />To define restore, you do not have to use SCN but also timestamp as well. here are some examples of that:<br />SET UNTIL SCN 1000;<br /># Alternatives:<br />SET UNTIL TIME 'Nov 15 2004 09:00:00';<br />SET UNTIL SEQUENCE 9923;<br />If you want to stay in SCN terminology, look for TIMESTAMP_TO_SCN function (http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions176.htm)<br />Hope this helps,<br />DamirDamir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-43032353398831948772014-10-23T18:25:30.972+02:002014-10-23T18:25:30.972+02:00searching internet .... and looking on many places...searching internet .... and looking on many places...Damir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-6696091904459095542014-10-23T03:00:02.982+02:002014-10-23T03:00:02.982+02:00Hi Damir, what about this scenario: We have a leve...Hi Damir, what about this scenario: We have a level 0 backup that starts on day 1 at 6:00 am and runs for over 30 hours, ending on day 2 at 13:00, during the time no archive log backups are taken but the LV0 includes archive log all and deletes them.<br /><br />Now, we need to restore the DB back to day 1 at 14:00, obviously this LV0 would not help since it had not finished by then; but we do have previous LV0, previous LV1 and all archive logs to roll forward.<br /><br />Question is: what is the best place to find the exact SCN to use here (the closest to day 1 14:00+), we don't have much info on the catalog because no archive logs were backed up during the LV0, so the RC_ARCHIVE_LOG view does not help much, we could use the v$log_history and list backup, and a few other places, but is there a better and more accurate way? I like the idea of using the x$ tables, although even querying them might be dangerous sometimes, but probably more accurate.<br /><br />Any thoughts and guidance would be very much appreciated, you info here is great and I have enjoyed reading it very much. Keep up the good work.<br /><br />Thanks<br /><br />Orlando.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-88803520981484663752014-08-11T21:47:19.061+02:002014-08-11T21:47:19.061+02:00Hi, can you explain how you got to these two table...Hi, can you explain how you got to these two tables/views? <br />FROM x$kccfe fe, <br />x$kccfn fn <br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-58157434171056375922013-04-04T22:01:12.866+02:002013-04-04T22:01:12.866+02:00yesyesDamir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-11136717215119105092013-04-04T18:34:15.509+02:002013-04-04T18:34:15.509+02:00one question, do we need all the time to be increa...one question, do we need all the time to be increased the scn by 1 , suppose if the scn is 12345 while recovering the db should it be 12346? also, what about if I go through the recovery using time stamp?Abdulhttps://www.blogger.com/profile/06948830052584374924noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-82007386129960411842013-04-04T18:31:56.959+02:002013-04-04T18:31:56.959+02:00Appreciated your efforts!! Thanks A lot for writin...Appreciated your efforts!! Thanks A lot for writing this block.Abdulhttps://www.blogger.com/profile/06948830052584374924noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-81685455038305599532013-01-19T02:27:10.681+01:002013-01-19T02:27:10.681+01:00Thank you. This post helped me do a successful res...Thank you. This post helped me do a successful restore. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-21956828151682046482012-05-25T15:14:48.742+02:002012-05-25T15:14:48.742+02:00"Media recovery start SCN is 2483662717"..."Media recovery start SCN is 2483662717"<br />This is starting SCN<br />When backup was taking place, SCN are changed so when backup ends, then SCN was "2484364327".<br />This is the number of SCN that you must have in archived redo logs to have valid backup.Damir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-81846893332060151522011-12-28T18:35:23.442+01:002011-12-28T18:35:23.442+01:00How do you obtain SCN in your post?How do you obtain SCN in your post?Damir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-31855664812925661442011-05-26T05:09:27.716+02:002011-05-26T05:09:27.716+02:00When I run a RESTORE PREVIEW, it ends with:
Media...When I run a RESTORE PREVIEW, it ends with:<br /><br />Media recovery start SCN is 2483662717<br />Recovery must be done beyond SCN 2484364327 to clear datafile fuzziness<br />Finished restore at 25-MAY-2011 22:03:08<br /><br />Why are the SCNs different here?<br />Since this was a one off special bkup taken to disk (not tsm which is typical), how do I verfiy I have all my archive logs on disk before I begin restore & recovery?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-20261430215418853122010-05-15T22:26:10.099+02:002010-05-15T22:26:10.099+02:00Thank you Leika.
Glad you'd find it useful.Thank you Leika. <br />Glad you'd find it useful.Damir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-32105159430611029932010-02-23T03:34:06.672+01:002010-02-23T03:34:06.672+01:00Very nice. So clear and easy to understand the mai...Very nice. So clear and easy to understand the main point. Appreciate a lot.<br />LeikaAnonymousnoreply@blogger.com