|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:10 PM
Points: 22,
Visits: 139
|
|
Hi, I have a sproc that does millions of deletes every hour. It grew everytime i manually set the date range in the sp and executed the alter statement in the sp and ran it. But, then when i went I put in the date range in the variable and executed the alter statement on the sp again for the last time it grew again initially, but then it stopped growing after that even though it was executing every hour? But, the deletes are occuring cause i see the records going down? Can somebody explain why the trans log is not growing when it's supposed to be?
Appreciate it.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:10 AM
Points: 37,642,
Visits: 29,896
|
|
Probably because you have log backups scheduled that are marking the log as reusable. That way the later deletes reuse the same space as the first set
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:10 PM
Points: 22,
Visits: 139
|
|
| Oh interesting that would explain it! This client does have their own trans log backup system and one of my concerns was that they had hourly trans log back up but i didn't see the trans log clearing out like when we do it in the sql world. So, like you said that system they use probably has the trans log backup marked as reusable. Good to know. Appreciate it so much!
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:10 PM
Points: 22,
Visits: 139
|
|
ok i think here is an article that helped clear things up. Read the "Transaction Log Architecture" section. Basically, the trans log is a endless circle and the trans log backup will mark the virtual logs that are being backed up to through the trans log backup and when the next round of deletes happens it uses the inactive virtual logs. So, that is why we are seeing the Trans log grow and then not grow cause we resuse the tran log. Awesome good to know. Thanks.
http://www.sqlservercentral.com/articles/Transaction+Logs/72488/
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:10 AM
Points: 37,642,
Visits: 29,896
|
|
Yup, exactly.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|