Default trace retention
Question
Tuesday, August 14, 2018 3:20 PM
Is there a way to change the retention settings on the default trace? For example increase file size or number of files?
Chuck
All replies (3)
Tuesday, August 14, 2018 3:32 PM | 1 vote
Default are 5 trace files รก 20 MB; if you need more create a customer trace, or better use Extended Events to trace events of your interest.
Olaf Helper
Tuesday, August 14, 2018 4:12 PM
Is there a way to change the retention settings on the default trace? For example increase file size or number of files?
Chuck
NO you cannot change retention setting of default trace. As fact you hardly have any control on it you only option is to manually move the trace files generated to some safe location before its gets overwritten.
Further reading
https://blogs.msdn.microsoft.com/cindygross/2009/12/16/sql-servers-default-trace/
Cheers,
Shashank
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
Wednesday, August 15, 2018 12:10 AM
Is there a way to change the retention settings on the default trace? For example increase file size or number of files?
No.
However, if you like the events the default trace captures then you can export the default trace definition by opening it in SQL profiler and go to-->file-->save as-->Trace template-->give a new name and save.
Now that you have the template saved, you can simply open profiler again and hit "new trace" and on the main "trace properties" page, you can select the template you saved in the "Use the template" drop-down.
Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.