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.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 script for automatic deletion of restored log

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2010-08-23 : 06:07:11
Hi Experts,
in our environment, one server is very critical, and used to generate huge logs regualrly. space is the main issue in this server (will retire soon).
can you provide me a script to delete all the log filess which are already restored for aparticular database?

ex: sss is the database, and M:\log_shipping\sss is the folder. for sss database, soon after restoring a log file, that should be deleted.

thanks in advance.



Arnav
Even you learn 1%, Learn it with 100% confidence.

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-08-23 : 06:31:48
Check out the table msdb.dbo.restorefile. It holds information about every file that has been restored.

- Lumbago

My blog (yes, I have a blog now! just not that much content yet)
-> www.thefirstsql.com
Go to Top of Page
   

- Advertisement -