This article is for InventoryControl v6. For versions 4, 5, and 7, see Related Content below.
Download and extract https://dl.waspbarcode.com/kb/ic/v6/BackupDB4ICv6.zip on the server, then run BackupDB4ICv6.bat to create a backup file in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\. The filename will be MIBackup_<date.stamp>.bkp.
If you need to change the path or filename, edit BackupDB4IC.wql with Notepad to change the line starting SET @FileName. If you are changing the file path, it must be directed to a local folder that already exists on the server, or the script will fail.
To schedule this process to run automatically, you can make use of the Windows Task Scheduler, as follows:
In Windows 7, go to Start > All Programs > Accessories > System Tools > Task Scheduler. It may spend a few seconds adding a snap-in to the management console, then it will open. On the Actions pane at the right, select Create Basic Task. Provide a name for the task, like WaspBackup, then click Next. Chose how often you wish the process to run from the list, then click Next to enter the details. Depending on how often you selected, you will be prompted to enter the day of the week or month and the time to run the process. On the next page, it will ask what action you want it to perform. Click the radio button for "Start a program" and click Next, then Browse. Locate BackupDB4ICv6.bat, select it and click Open, then Next. If you check the box for "Open the Properties dialog for this task when I click Finish", it will open an interface with many additional conditions for the task. This is where you can specify a different user for the task to run as, as well as options for whether to run when the user is logged in only, or whether the user is logged in or not. It does default to only when the user is logged in. Also, on the Settings tab, there are boxes for "Run task as soon as possible after a scheduled start is missed" and "If the task fails, restart every:", which you should look at. This Properties window is the same as what opens if you initially choose Create Task rather than Create Basic Task, so you may start here, but the initial rule creation may be easier in Basic Task. To see the task, click Task Scheduler Library at the top left. Click on the task in the top center pane, and the Properties will be shown in the bottom center pane for verification. If you need to change any of the settings, you will need to right click the task and select Properties
In Windows XP, go to Start > All Programs > Accessories > System Tools > Scheduled Tasks. Double click Add Scheduled Task. Click Next on the welcome message, then Browse. Locate the BackupDB4ICv6.bat file and select it. Chose how often you wish the process to run from the list, then click Next to enter the details. Depending on how often you selected, you will be prompted to enter the day of the week or month and the time to run the process. You will then be prompted for the username and password of a Windows user, and the task will run as that user. You should enter a user who has sufficient rights in Windows to run the bat file and write into the specified directory. If you choose to open the advanced properties for the task, you will be able to specify several additional things, like whether to run the task when the computer is on battery power, etc. Usually the default settings will be fine. The task will now be shown in the Scheduled Tasks window, should you wish to check/change the properties or verify the status of when it will run, when it last run, and whether it failed when last attempted.