|
|
| SIMS .net database backup |
| Written by Terry Watts | |
| Thursday, 25 November 2004 | |
|
With the move to SIMS .net backing up your schools data has never been so important, but as you may already know the SIMS SQL database is held open by the Microsoft SQL database engine all the time, so the SIMS.MDF and SIMS.LDF data files can't be backed up using conventional means. If you are looking for a good way to ensure a SIMS database backup then read on.
Ok, you could stop the Microsoft SQL services prior to a tape backup being run or you could buy an add-on to your backup product, but this could cost money that you don't have, or you may might forget to re-start the database service. Fortunately Captia have provided a method that will allow a scripted backup of the SIMS database to a compressed ZIP file that can be backed up by your tape backup software without the expensive add-on's. First you will need to create a new SIMS.net user using System Manager. The new user should be called BACKUP, you will need to give this user operator rights to SIMS.net. Once you have created the new user, log on to SIMS.net as the BACKUP user and change the password from the default random password to something a little more manageable, and make a note of the new password. Log out of SIMS.net. Now create a new batch file called SIMSBackUp.bat with the following line in it. Save the batch file to somewhere like C:\Backup or maybe in your public folder D:\Admin\Public\Backup. @Echo Off
Obviously replace <servername\instance> with the name of your SIMS server database, eg SERVER1\SIMS, you can find this out by looking for the SQL server manager in the taskbar of Windows or in your Connect.ini folder in C:\Program Files\SIMS\SIMS .net\. The above line should be a single line in the batch file otherwise it won't work. If your Microsoft SQL server software has been installed on a different drive letter then alter the path at the beginning to match your system. Testing: Simply double click on your batch file, then if you have used the Echo statements, the computer will tell you what is happening, if there the Starting and Finishing wiz by then there is likely to be a problem with the user account or the command line that you are trying to use. Try resolving the problem. As a guide, the backup process will take several minutes depending on your computer system. You can even check what is happening by viewing the files in C:\Program Files\Microsoft SQL Server\MSSQL$SIMS\Backup. The backup process is complete when there is a new ZIP file in that folder, also your batch file will display the Finished message and close the window. Now you will need to schedule your batch file to run automatically, this can be done using the AT command line scheduler or through the Windows Tasks (Start, Run, TASKS, OK). Here is an example of using the AT command. NOTE this runs the task as the SYSTEM account user. AT 22:00 /Interactive /Every:M,T,W,Th,F C:\Backup\SIMSBackUp.Bat Backing up your database in this way will certainly help you if the worst happens, although there is a hidden consequence. This method of backing up is quite untidy and eventually there will be hundreds of ZIP files filling the valuable space on your hard drives. You should manually tidy these backups by deleting them from the C:\Program Files\Microsoft SQL Server\MSSQL$SIMS\Backup folder. There isn't any need to log into the SIMS .net System manager and use the Tidy procedure as this type of backup is not recorded in there. Your data is at risk if you do not check that your backup system is working. You should try a test restore from tape at least once every 2 weeks to ensure your disaster recovery plan. Also remember to use that cleaning tape that you bought, it will help to keep your tape drive operating at peek condition and may prolong the life of your backup tapes. |
|
|