Friday, January 13, 2012

Simple backup script for SQL Express

in backup.bat

"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe" -S (local)\TOCTTARGPPC05 -i "C:\Documents and Settings\Administrator\Desktop\backup.sql"

In backup.sql

BACKUP DATABASE [ETLSPA] TO DISK = N'\\mbbk\backup_to_folder\mbppc\mbppc.bak' WITH RETAINDAYS = 5, NOFORMAT, INIT, NAME = N'ETLSPA-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

 

 

No comments:

Post a Comment

Azure MFA NPS extension stopped working due to expired certification

 Users complained they were unable to log in VMware Horizon Client portal and the logon stuck at "Authenticating...." screen. So I...