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...
  • StefanosM's avatar
    2 years ago

    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).