Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Possible to alter a server-side trace without deleting and re-creating? Expand / Collapse
Author
Message
Posted Friday, April 5, 2013 10:01 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 1:13 PM
Points: 961, Visits: 4,980
On the servers I'm now responsible for, the previous DBA implented a server-side trace. This trace logs quite a bit, allows the files on disk to grow to 1GB, and keeps 5000(!) files.

Well, the servers don't have 5TB drives (I wonder if they had intended to have 1MB files) so I've been having to go in to delete old files to keep them from filling up whatever drive they're getting saved to.

What I'd like to do is, alter the trace to either keep the files to 1MB (maybe 10MB), or keep (a LOT) fewer files (maybe only 50 or so)

I've seen all sorts of articles on altering a trace to capture different data, or stop capturing some data, but nothing to indicate that I can alter the filesize or filecount.

Can I do this? Or will I need to stop the trace, delete the trace, and re-create the trace with the new values?
Thankfully, the previous DBA saved the trace creation script, so re-creating won't be too big a hassle, if that's the solution.

Thanks,
Jason
Post #1439334
Posted Friday, April 5, 2013 10:11 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:35 PM
Points: 5,975, Visits: 12,881
if this is a server side trace there must be a trace script file somewhere. In there there will be a set @maxfilesize statement, alter that to the value you want (its in MB)

---------------------------------------------------------------------

Post #1439342
Posted Friday, April 5, 2013 10:51 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 1:13 PM
Points: 961, Visits: 4,980
Won't that just create a new trace?

Or will it alter that setting for the existing trace?

Jason
Post #1439365
Posted Friday, April 5, 2013 12:23 PM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:35 PM
Points: 5,975, Visits: 12,881
you cannot alter the trace in flight, just stop and restart the trace and it will pickup the new settings.

---------------------------------------------------------------------

Post #1439416
Posted Sunday, April 7, 2013 5:20 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 1:13 PM
Points: 961, Visits: 4,980
Cool thanks!

I'll give it a go on Monday.

Jason
Post #1439672
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse