sql server trace flag 3023

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

trace_flag_3023_1

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

TRACE_FLAG_3023_2

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

   

About Prince Rastogi

Prince Rastogi is working as Database Administrator at Elephant Insurance, Richmond. He is having more than 8 years of experience and worked in ERP Domain, Wealth Management Domain. Currently he is working in Insurance domain. In the starting of his career he was working on SQL Server, Internet Information Server and Visual Source Safe. He is post graduate in Computer Science. Prince is ITIL certified professional. Prince likes to explore technical things for Database World and Writing Blogs. He is Technical Editor and Blogger at SQLServerGeeks.com. He is a regular speaker at DataPlatformDay events in Delhi NCR. He has also presented some in depth sessions about SQL Server in SQL Server Conferences in Bangalore.

View all posts by Prince Rastogi →

Leave a Reply

Your email address will not be published.