Hi Friends,
This is my 10th blog on SQL Server Trace Flag 3023 in the series of One Trace Flag a Day. You can go to all blogs under that series by clicking here.
Backup database is a very important operation for a DBA. There are so many options available while you are taking backup like COMPRESSION, FORMAT, NOFORMAT, NOINIT etc. One of them is CHECKSUM that is used to perform checksum operation. Sometimes if we want to use this option then we specify it at the time of backup operation. As mention below:
Backup database [CheckpointTest3] to disk='E:\Checkpoint3_Native_Full_29092014.bak' WITH CHECKSUM go -- for a backup, checksum was enabled or not can be checked using below command RESTORE HEADERONLY FROM DISK = 'E:\Checkpoint3_Native_Full_29092014.bak' go
If you will enable the trace flag 3023 then no need to specify CHECKSUM option at the time of taking backups. WITH CHECKSUM option will be automatically applied for all database backup operations. Let me show you practically:
DBCC TRACEON(3023,-1) go Backup database [CheckpointTest3] to disk='E:\Checkpoint3_Native_Full_29092014_2.bak' go -- checksum was enabled or not can be checked using below command RESTORE HEADERONLY FROM DISK = 'E:\Checkpoint3_Native_Full_29092014_2.bak' go DBCC TRACEOFF(3023,-1) go
PS: Do not use trace flags in production environment without testing it on non production environments and without consulting because everything comes at a cost.
HAPPY LEARNING!
Regards:
Prince Kumar Rastogi
Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook
Follow Prince Rastogi on Twitter | Follow Prince Rastogi on FaceBook