I am in the process of automating a RAC to NON-RAC clone using traditional method [ not using RMAN ].
Here are the steps:
Record the sequence number and thread of the instance
put the database in begin backup mode
copy the files
disable the backup mode
record the sequence number and thread of the instance
prepare the order of the archive logs which will be needed for recovery ==> Here is where I need help
Restore the backup
Issue recovery using the order of archive logs identified ==> Failing as order is not correct.
I am finding the archive logs based on FIRST_TIME# and preparing the order which is not correct. I think i should be using SCN but not sure what should be the criteria.
Could you please let me know on what basis we can find the order of the archive logs which will be asked during the recovery ?
Your quick response is appreciated. Thanks in advance for your help.
I'm working from memory, but I thought you would be promptd for the archivelogs from both threads in whatever order is necessary. And if there is any doubt, querying v$recovery_log after the restore and mount should tell what will be needed.
What are the prompts and errors you are getting? (Note that "Failing as order is not correct" is not an Oracle error message).
Yes, When we execute recover database using backup controlfile until cancel, will prompt for the redo log sequences.
But as i mentioned before, I am trying script everything and cannot manually enter the sequence numbers required. I need to know the archives and thread it is going to ask [ in what order as well ] so that recovery command can be scripted in shell.
Please let me know if there is a away to find the order of archive logs which needs to be applied to recover [ if this is a NON-RAC, we can simply go with the sequence numbers but since it is a RAC, i should know the thread number as well ].
Can you not do the restore and mount; query v$recovery_log to discover what archives are needed; copy those archives to a common location; set the logsource to that location; and (at last!) recover automatic. That should be scriptable, and Uncle Oracle can sort out the order.