Forum Discussion

littleboy124's avatar
2 years ago

how to create a bch file to restore SQL Server

Hi guys

Recently I am trying to  write a script to restore SQL Server database automatically.

And then I find  a way to create the bch file in  https://www.veritas.com/content/support/en_US/article.100016506

But the script will be  complex to work by  creating bch file manually.I want to figured out whether there is a command line to create it 

Looking forward to your reply,thanks inadvance.

  • No, there is not.
    You have to build the bch script line by line.

    As I told you before, the best way to do it is to create the bch once, using the GUI, and change everything that needs to change using an editor (ex. the new database name and paths).

    Then, using the bplist, you can find the SQL backup image, as described in the technote (hint: use find or grep for windows command), and place it at the correct bch line using sed (there is a sed for Windows).

2 Replies

  • No, there is not.
    You have to build the bch script line by line.

    As I told you before, the best way to do it is to create the bch once, using the GUI, and change everything that needs to change using an editor (ex. the new database name and paths).

    Then, using the bplist, you can find the SQL backup image, as described in the technote (hint: use find or grep for windows command), and place it at the correct bch line using sed (there is a sed for Windows).

    • littleboy124's avatar
      littleboy124
      Level 3

      Thanks for your reply.

      It is a little pity(lol),but your perfocessionalism makes me impressed.

      Thanks again