Bobby Heid
bheid at sc.rr.com
Mon Jan 18 20:10:38 CST 2010
John, BACKUP DATABASE [db] TO DISK = N'C:\Path\db.bak' WITH NOFORMAT, NOINIT, NAME = N'Some description', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10 GO I let SSMS 2008 generate this for me. What I did was: 1) Right-click on the db you want to backup 2) Choose Tasks\Backup... 3) Under the options (list on left hand side), select the 'Set backup compression' (lower right) and change the dropdown to compression. 4) Then at the top of the backup window, you'll see a dropdown that says 'Script'. Select 'Script action to new query window' (or one of the other options) and it will create the script for you. This can be done with many of the options in SSMS. Bobby -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 18, 2010 3:40 PM To: Dba-Sqlserver; VBA Subject: [dba-SQLServer] 2008 backup / restore scripts I obtained a developer copy of SQL Server 2008, which has full backup / restore with compression if I understand correctly. I had been using Idera's SQL Safe free version but that is no longer free. Of course now all of my backups are locked away in a version of a program that I can no longer use. Free is only free until it's not, whereupon it is a liability. Sigh. Anyway... I am wondering if anyone has a stored procedure that will use the 2008 built-in backup to do a full backup with compression. I built a C# program to use the Idera scripts to do my backups and restores. I am hoping that I can get a similar native 2008 stored procedure that I can call to do the same thing. -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com