Skip to content

Instantly share code, notes, and snippets.

@bdunnette
Last active June 16, 2016 17:37
Show Gist options
  • Save bdunnette/11c36fd5fcada9535a4b68859a8e117c to your computer and use it in GitHub Desktop.
Save bdunnette/11c36fd5fcada9535a4b68859a8e117c to your computer and use it in GitHub Desktop.
--Run as a scheduled task: "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE" -i F:\Images2\Backup\AperioDBBackup.sql -o F:\Images2\Backup\AperioDBBackup.log
DECLARE @BackupFile varchar(1000)
SELECT @BackupFile = (SELECT 'F:\Images2\Backup\NSAperio-FullDB-'+ CONVERT(varchar(500),getDate(),112) +'.bak')
BACKUP DATABASE Aperio
TO DISK = @BackupFile
WITH FORMAT;
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment