+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, SIMS Script in Coding and Web Development; i need a script to stop SQL services so the sims backup (scheduled nt backup) can start, then a reboot ...
  1. #1
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0

    SIMS Script

    i need a script to stop SQL services so the sims backup (scheduled nt backup) can start, then a reboot / shutdown (in a set amount of time / when the back ups done) so the services will start again.

    Anyone got a script like this? if not what do you use to backup sims and stop SQL??

    psuedo code:
    Code:
    Stop SQL services
    if SQL Services are stopped
         Start backup
    end if
    if backup complete / if time >= 10 mins
          start sql services
    end if
    Shutdown
    
    if script does not work
         Place gun to head
         Pull trigger
    end life
    Thanks in advance

  2. #2
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0
    All sorted!!

    @Echo Off
    Echo Starting to Backup the SIMS Database
    C:\Program Files\Microsoft SQL Server\MSSQL$SIMS\Binn\dbattach
    /backup /auto /server=<servername\instance name> /database=SIMS
    /user=BACKUP /password=backup
    Echo Finished Backing up the SIMS Database
    Pause


    AT 22:00 /Interactive /Every:M,T,W,Th,F C:\Backup\SIMSBackUp.Bat

  3. #3

    Join Date
    Apr 2010
    Posts
    2,054
    Thank Post
    83
    Thanked 188 Times in 155 Posts
    Rep Power
    84
    Why not do a maintenance task in sql manager to create a backup of the Sims / other databases and move them to another location? It can also clean up the database and a few other options.

SHARE:
+ Post New Thread

Similar Threads

  1. SIMS to MRBS: Script Available
    By McTedo in forum Scripts
    Replies: 105
    Last Post: 21st March 2014, 12:16 PM
  2. [SIMS] SIMS AM7 Template Change resultset script
    By vikpaw in forum MIS Systems
    Replies: 71
    Last Post: 25th October 2011, 09:38 AM
  3. Script in SIMS
    By aneena in forum MIS Systems
    Replies: 6
    Last Post: 22nd May 2010, 01:19 PM
  4. Changing passwords for SIMS users by script
    By academic_mwnci in forum MIS Systems
    Replies: 2
    Last Post: 3rd September 2008, 12:02 AM
  5. SIMS update script
    By nicholab in forum MIS Systems
    Replies: 1
    Last Post: 27th April 2007, 08:17 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •