question

Katie 1 avatar image
Katie 1 asked

.trc files in the data folder of sql server

what is this file in the data folder of the sql server master.mdf..2010.09.27.09.51.10.trc can i delete it is taking around 80 gb of disk space?? Thanks
sql-server-2008sqltransaction-loglogs
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image
Fatherjack answered
run both of these to see what traces are running and confirm that no traces are writing to that file DBCC TRACESTATUS go SELECT * FROM :: FN_TRACE_GETINFO(0) If not, then the file can be deleted without needing to do anything else. If there looks to be a trace writing to the file then you may need to investigate who started it before making changes.
9 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sure i would . i was busy removing those files :)
1 Like 1 ·
1 2 C:\\Program Files\\Microsoft SQL Server\\MSSQL10.MSSQLSERVER\\MSSQL\\Log\\log_12.trc 1 3 20 1 4 NULL 1 5 1 2 1 1 2 2 NULL 2 3 NULL 2 4 NULL 2 5 0 3 1 1 3 2 NULL 3 3 NULL 3 4 NULL 3 5 0 5 1 1 5 2 NULL 5 3 NULL 5 4 NULL 5 5 0 7 1 1 7 2 NULL 7 3 NULL 7 4 NULL 7 5 0 This is what i get when i run the above two statements, how do i know what process is writing is writing this trace file?
0 Likes 0 ·
that shows that traces that are currently running are using a file called Log_12.trc in the Log directory. If you problem trc file is in a different directory then it is not part of an active trace and can be deleted without affecting anything else. When was the file last changed/updated/modified?
0 Likes 0 ·
there are two dates one was on 9th sept of last 2011 and other date is 14th of september of 2011. for the later date there are around 12000 files
0 Likes 0 ·
so it seems someone is starting a trace that is poorly configured - in that it has created so many files, in the wrong (ie with database files) and allowed it to take up so much HDD.
0 Likes 0 ·
Show more comments
Sharma avatar image
Sharma answered
Is any trace enable on database ? If yes then stop that trace and then delete the trace file if not required.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Shawn_Melton avatar image
Shawn_Melton answered
Just to add something to it, since you have the log_xx.trc running you can actually query that file (going back to when those rogue trace files were created) and try and determine who started the traces. The log_xx.trc is your default trace and I do believe it captures trace files being configured/started. **EDIT**: [Learn Who Started that Trace with the Default Trace][1] [1]: http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/12/29/learn-who-started-that-trace-with-the-default-trace.aspx
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

good point about checking default trace for other trace start. providing its still there. If the rogue trace is 80GB it may have been running a while
0 Likes 0 ·
Added a link I came across.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.