How to backup database into less size using LiteSpeed query?

Use below script to back up the database ‘kumartest’.

exec master.dbo.xp_backup_database

@database = N'kumartest',

@compressionlevel = 1,

@filename = N'J:\SQLBackup\MSSQL\kumartest\kumartest_Full_201003041713.bak',

@init = 0,

@with = N'SKIP',

@with = N'STATS = 10'

INITàspecifies that all backup sets should be overwritten, but preserves the media header. If INIT is specified, any existing backup set data on that device is overwritten.

SKIPàdisables the backup set expiration and name checking usually performed by the BACKUP statement to prevent overwrites of backup sets

STATS [= percentage] àDisplays a message each time another percentage completes, and is used to measure progress. If percentage is omitted, SQL Server displays a message after each 10 percent is completed.

Hope we will get compressed backups.


Popular posts from this blog

SQL Server:Steps to Configure Database Mirroring by T-SQL Script.

SSIS2008R2 Error: 0xC0209303 at Package: