Remote administration question

  • Does anyone know a way that I could create a batch file to start SQL Server, open Query Analyzer, mount a database and run a few queries? If not, is there any other alternative to a batch file? We have a backup server off-site and we're looking into some disaster recovery issues. Any help would be greatly appreciated.

    Thanks!

  • You can use the net start <instanceName> to start SQL Server from within a batch file.  Then you could osql to attach the database and run some queries spooling the results out to a file(s) if you need to.

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply