Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Logshipping Backup Files Management

By Vaibhav Mehta, 2012/06/28

PROBLEM DESCRIPTION:

The problem occurs very frequent in the environments where Log Shipping is configured. Many times log files on disk get larger due to large SQL processes eating extra disk space This makes DBA to identify the log files which are restored on destination server and are no more required on source server , but are still occupying unnecessary space on source server disk. With this the database that are using same disk in which logs are saved can go in suspect mode If it would not be taken care in time than end users\work would be affected very badly . So to remove log files ,DBA has to first identify the primary and all the secondary servers involved in log shipping. Secondly, which all logs are restored on secondary servers , helping to identify which logs are no more required. So to resolve issues well in time, the DBA will use the automated script to do the job well in short time. This is very typical for any DBA to handle this type of situation in minimum time.

HOW TO USE:

There are two separate scripts for primary and secondary log shipping server. Execute the script accordingly or schedule it as job.

 Change the value of "@DriveSpace" parameter to the Percent % free space you want on drive. At present it is set to 20. Which will leave 20% free space on drive.

Total article views: 485 | Views in the last 30 days: 10
 
Related Articles
SCRIPT

Check Used Table Space for User Defined Tables

Query the System Tables to find the space usage, which helps Database Administrators identify the Ta...

FORUM

How to get space used in SQL Server 2000

How to get space used in SQL Server 2000 (script)

SCRIPT

Automate drive space monitoring for all production servers

Monitoring space in production server is one of the top priority tasks for a DBA. This script will a...

FORUM

Identifying Resources Hogs (Users)

I need a script to identify resource hogs.

BLOG

SQL Server – How to identify service pack installed

Identifying current service pack installed for SQL Server can be difficult if you don’t know which c...

Tags
logshipping    
sql2005    
sql2008    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones