Forum Stats

  • 3,759,874 Users
  • 2,251,609 Discussions
  • 7,870,852 Comments

Discussions

Restore multiple non-sequential archivelogs

user1151048
user1151048 Member Posts: 55 Blue Ribbon

Hello community,

I am standing up a Data Guard copy of a database and found that there are a few dozen missing archivelogs, spread across a range of sequence numbers. I am looking for an efficient way to restore those, like a comma-delimited list or something similar. Right now I am performing individual restore commands on each log. Is there a way to restore many non-sequential logs in one command?


Thanks,

John

Best Answer

  • Luís Gustavo Lira
    Luís Gustavo Lira Member Posts: 112 Silver Badge
    Accepted Answer

    You need to check the syntax according to your version, but I believe that you will need to do something like this:

    run {

    restore archivelog sequence 1;

    restore archivelog sequence 5;

    restore archivelog sequence 10;

    restore archivelog sequence 15;

    restore archivelog sequence between 20 and 25;

    ...

    }

Answers

  • Luís Gustavo Lira
    Luís Gustavo Lira Member Posts: 112 Silver Badge
    Accepted Answer

    You need to check the syntax according to your version, but I believe that you will need to do something like this:

    run {

    restore archivelog sequence 1;

    restore archivelog sequence 5;

    restore archivelog sequence 10;

    restore archivelog sequence 15;

    restore archivelog sequence between 20 and 25;

    ...

    }

  • user1151048
    user1151048 Member Posts: 55 Blue Ribbon

    Thanks Luis, that's not as efficient as I hoped but it looks like the only way. I tested this in RAC and it worked as well.


    run {

    restore archivelog sequence 28466 thread 1;

    restore archivelog sequence 29112 thread 2;

    restore archivelog sequence 28990 thread 3;

    restore archivelog sequence 28992 thread 3;

    }


    John