backups

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jeff wilmoth

    backups

    I am in search of a simple .bat file or .vbs script that I can use to
    stop my SQL database server. I am looking to schedule a script of sorts
    to initiate at a certain time every day. This script needs to be able to
    stop my server and/or initiate a backup. The script should be able to be
    ran remotely from the lan. can anyone help me?

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Greg D. Moore \(Strider\)

    #2
    Re: backups


    "jeff wilmoth" <jeff_wilmoth@y ahoo.com> wrote in message
    news:40185174$0 $70300$75868355 @news.frii.net. ..[color=blue]
    > I am in search of a simple .bat file or .vbs script that I can use to
    > stop my SQL database server. I am looking to schedule a script of sorts
    > to initiate at a certain time every day. This script needs to be able to
    > stop my server and/or initiate a backup. The script should be able to be
    > ran remotely from the lan. can anyone help me?[/color]

    First question, why not use the online backup capabilities of SQL Server?

    In any case, a simple

    NET STOP MSSQLSERVER

    and

    NET START MSSQLSERVER

    will stop and start SQL Server

    If you have SQL Server Agent running, you can either do:

    NET STOP SQLSERVERAGENT
    NET STOP MSSQLSERVER

    or

    NET STOP MSSQLSERVER /Y

    And then to start either

    NET START MSSQLSERVER
    NET START SQLSERVERAGENT

    or simply

    NET START SQLSERVERAGENT

    which should start SQL Server first.


    [color=blue]
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it![/color]


    Comment

    Working...