SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Possible to alter a server-side trace without deleting and re-creating?


Possible to alter a server-side trace without deleting and re-creating?

Author
Message
jasona.work
jasona.work
SSCarpal Tunnel
SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)

Group: General Forum Members
Points: 4039 Visits: 11741
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
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10294 Visits: 13687
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)

---------------------------------------------------------------------
jasona.work
jasona.work
SSCarpal Tunnel
SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)

Group: General Forum Members
Points: 4039 Visits: 11741
Won't that just create a new trace?

Or will it alter that setting for the existing trace?

Jason
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10294 Visits: 13687
you cannot alter the trace in flight, just stop and restart the trace and it will pickup the new settings.

---------------------------------------------------------------------
jasona.work
jasona.work
SSCarpal Tunnel
SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)

Group: General Forum Members
Points: 4039 Visits: 11741
Cool thanks!

I'll give it a go on Monday.

Jason
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search