Recently I needed a way to automate some testing on SQL Server 2005.
The easiest way was to start with restoring some predetermined database state from a .BAK file.
Hence I wrote the script below.
Next to SQLCMD, this script uses SubInACL, which you can download here (don’t worry that version seems to be only for Windows 2000..2003: it still works in Windows 7).
Microsoft does not have much documentation (except the built-in by calling “SubInACL /help /full”.
But this SubInACL page has some more insight on how to use it. Read the rest of this entry »