General discussion

  • Creator
    Topic
  • #2303984

    Script startup & stop of service

    Locked

    by simon@srn ·

    How can i set a service to start and stop at certain times in order that i can do a backup of a database. I assume i need to write a script and put it in scheduler, but i can’t find one that works.

    Server is windows 2000 SBS but operates as a simple file server with no domain.

All Comments

  • Author
    Replies
    • #3359692

      Script startup & stop of service

      by cactus pete ·

      In reply to Script startup & stop of service

      You can use:

      NET STOP “SERVICE NAME”
      and
      NET START “SERVICE NAME”

      to handle the service.

      To schedule this, use “at”.

      For usage, type “at /?” in a cmd window.

    • #3516267

      Script startup & stop of service

      by beermonster ·

      In reply to Script startup & stop of service

      Hi,
      Couple of things. As per the first answer a net use command needs to be passed the ‘working’ name of the service rather than the name that appears in the services mmc. these are nt always the same. to find the working name type

      net start
      and this will return the list of services in working name format. Secondly, you shouldn’t be stopping services to back up a database (is it SQL?). the idea is to backup the database using the database engine – which can be scheduled and run while the db is in use – and then back up the resulting file.

    • #3516188

      Script startup & stop of service

      by simon@srn ·

      In reply to Script startup & stop of service

      Database is progress if that helps and size is just over 2GB

    • #2742222

      Reply To: Script startup & stop of service

      by simon@srn ·

      In reply to Script startup & stop of service

      This question was closed by the author

Viewing 3 reply threads