Hi Friends,
This is my 9th blog on SQL Server Trace Flag 3014 in the series of One Trace Flag a Day. You can go to all blogs under that series by clicking here.
Taking a database backup is most important activity for a DBA. Whenever we have taken backup in SSMS through TSQL then it gives us some output that contains information related to backup as mention below.
Processed # pages for database ‘xxxx’, file ‘xxxx’ on file 1.
Processed # pages for database ‘xxxx’, file ‘xxxx’ on file 1.
BACKUP DATABASE successfully processed # pages in 1.656 seconds (1.596 MB/sec).
Almost same information will also be logged in error log. Can we get more internal information in the sql server error log for each backup operation? Yes, we can by using Trace Flag 3014 with 3605. If we will enable these trace flags then it will write that output to error log and we can check that.
Let me show you this thing practically:
Backup database [CheckpointTest3] to disk='E:\Checkpoint3_Native_Full_29092014.bak' go exec xp_readerrorlog go
let me show you the entries after enabling trace flag 3014 and 3605.
DBCC TRACEON(3014,3605,-1) go Backup database [CheckpointTest3] to disk='E:\Checkpoint3_Native_Full_29092014.bak' go DBCC TRACEOFF(3014,3605,-1) go go exec xp_readerrorlog 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