2 Comments

  1. James said:

    @ECHO OFF
    del “[FULL PATH TO SQL FILE]”
    osql -S [SERVER]\[INSTANCE] -U [USERNAME] -P [PASSWORD] -i “[FULL PATH TO SQL FILE]“

    If you del “[FULL PATH TO SQL FILE]“ surely it won’t be there when you address it with the next line. Shouldn’t it be something more like delete the old backup file then point osql at the script to create the new one?

    March 8, 2010
    Reply
    • said:

      James,
      Thank you for the post, I’ve updated the example to reference [FULL PATH TO SQL BACKUP FILE] instead. The original intent was to delete the .bak file prior to running the script again.
      -Aaron

      March 8, 2010
      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *