Backing up the JAMS Database in JAMS V6.x

Follow

JAMS ships with a Job in the JAMS Folder called, "JAMSBackup". The Job can be configured with Parameters to specify where the location of the backup is kept, and the name of the database you wish to backup. By default, this is set to JAMS. 

Next, we must configure our connection to the database. The SQLCommand execution method must be configured to connect to the appropriate SQL instance. If you are already using the SQLCommand Execution Method to connect to another SQL instance you may create a new Execution Method and use SQLCommand as a base.

Configuring the Execution Method is simply modifying the default value of the "ConnectionString" parameter in the SQLCommand Execution Method.

After that is completed, you can run the Job by right clicking on it and choosing Submit. You can monitor its progress in the Monitor, and you will be able to confirm in the log file that the backup has completed. The backup file will be stored in the location you have defined in the TARGET Parameter on the Job.

If you wish to modify your backup script, the source of the job can be customized to your liking, the below query is an example of what can be used.

DECLARE
@pathName NVARCHAR(512),
@databaseName NVARCHAR(512)
SET @databaseName = 'JAMS'
SET @pathName = 'C:\JAMSSamples\JAMSDB.sql' +
Convert(varchar(8), GETDATE(), 112) + '_' +
Replace((Convert(varchar(8), GETDATE(), 108)),':','-')+ '.bak'
BACKUP DATABASE @databaseName TO DISK = @pathName WITH NOFORMAT,
NOINIT, NAME = N'', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
Have more questions? Submit a request

Comments