sql server trace flag 3014

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

trace_flag_3014_1

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

trace_flag_3014_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

Avatar

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. Required fields are marked *