Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Martyn123
Starting Member
29 Posts |
Posted - 2011-01-20 : 02:33:43
|
Hi,SUB: old log_xxx.trc files are getting deleted everyday from LOG. I am using SQL SERVER 2008 , I found that old .trc files from LOG folder gets deleted everyday and I don't want this to happen because When I was reading the .trc file using "fn_trace_gettable order by start time " I am not getting the old records which I was getting yesterday. Is there any job that runs daily by sql agent that deletes these files?Eagerly waiting for the reply.Thanks |
|
abhwhiz
Starting Member
37 Posts |
Posted - 2011-01-20 : 05:00:03
|
Can you check if you have a batch file or job scheduled for deleting this? I don't think any such built-in setting is there in SQL Server. |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-01-20 : 05:47:14
|
Yes they do. The default trace keeps 5 files of no more than 20 MB each. When a new one is created SQL automatically deletes the oldest. If you want to retain these you need to either import into a table on a regular basis or copy the older files elsewhere.--Gail ShawSQL Server MVP |
 |
|
Martyn123
Starting Member
29 Posts |
Posted - 2011-01-20 : 08:07:07
|
Thanks GilaMonster for replying to my post.Is there any settings that makes SQLServer not delete these files?Thanks again...Martyn |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-01-20 : 09:52:48
|
No. The default trace is hardcoded and fixed at 5 files of no more than 20 MB each.--Gail ShawSQL Server MVP |
 |
|
|
|
|