Most SOS G5 organizations will be using Microsoft SQL Server to store their data. This database engine is available in a wide range of versions. Most SOS users probably will be using the free SQL Server Express edition, SQL Server Standard, or perhaps, SQL Server Enterprise. All three of these editions share the same core functionality and may be managed using Microsoft’s user interface known as SQL Server Management Studio (SSMS). Assuming that you have the rights to do so, you will be able to use SSMS to manage the database, including backing up and restoring the SOS G5 database. Again assuming that you have the necessary rights, if you are on a network, you will be able
Typically, when you install SQL Server on your computer or server, you will also install a copy of SSMS. If you cannot locate a copy, want a copy on another computer, or want to update a copy you previously installed, you can download the installer for the current SSMS software at this Microsoft page: Download SQL Server Management Studio (SSMS).
Using SSMS to create a full backup of your database manually
Once you have installed your SOS G5 software and you have begun to enter data or have imported data from the previous version of SOS, you should backup that data as soon as you have the opportunity. As a start, let’s use SSMS to create a manual backup. We will then make a copy on external media as well.
- Start by opening SQL Server Management Studio (SSMS).
Once you have logged in, click the plus to the left of “Databases” to expand that node. Right-click the
The dialog for the backup task includes three panels. Go from one to the other using the navigation panel on the left:
Automating database backups using SQLCMD and Windows Scheduled Tasks
Thankfully, it is not necessary to manually go through the steps above every day (or more often). Instead, you can use Windows’ Task Scheduler to automatically run commands to create backups of the database and the transaction log in any desired location on the computer running SQL Server. For example, you could put the following two command lines in a file named BACKUP_SOSSUITE.CMD, and configure Task Scheduler to run this CMD file every night at 1:00 AM. Here are the two commands. The portions that would have to be changed to match your particular installation are in bold.
(all on one line) SQLCMD -E -S .\SQLEXPRESS -Q “BACKUP DATABASE[SOSSUITE] TO DISK=’C:\BACKUPS\SOSSUITE-DATABASE.BAK‘” > C:\BACKUPS\BackupDatabaseResults.txt
(all on one line) SQLCMD -E -S .\SQLEXPRESS -Q “BACKUP LOG[SOSSUITE] TO DISK=’C:\BACKUPS\SOSSUITE-TRANLOG.BAK‘” > C:\BACKUPS\BackupDBLogResults.txt
In this example
Creation of these BAK files IS NOT A SUFFICIENT BACKUP. By definition, these files will be created on a local drive, perhaps even the same drive as your database is running. In addition, every time the commands are run, these files will be replaced by the latest ones. That means that an equipment failure, fire, or theft could wipe out both your data and your only backup!
For that reason it is essential that you include these BAK files in your daily computer or server backups to external media, using third-party backup software such as NovaStor’s NovaBackup or Cloudberry Lab’s Cloudberry Backup products, among many others. High-end server backup software often includes the ability to backup SQL Server databases directly, without the intermediate steps described above, which would certainly be an excellent option. Your backup software will have options to encrypt your backups, which is absolutely essential, and to compress them to minimize the amount of space consumed on your backup media.