Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need to delete backup files which are restored on secondary database Expand / Collapse
Author
Message
Posted Friday, September 6, 2013 3:46 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 4:14 AM
Points: 576, Visits: 538
Hi,

I have configured log shipping on 10 databases ,
On secondary i am facing space issue regularly as .trn files for the databases are stored on same drive.

Now I want to delete all the .trn files that are restored on secondary after 1 hour.

Is there any way to do that.


Post #1492126
Posted Friday, September 6, 2013 7:17 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:55 PM
Points: 6,350, Visits: 13,676
use the following to purge backup files from the secondary

exec sys.sp_change_log_shipping_secondary_primary
@primary_server='primary sql instance'
, @primary_database='primary db name'
, @file_retention_period = no_of_minutes_to_keep



-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1492217
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse