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

Log shipping 2k5 file retention issue - the files are not being deleted. Expand / Collapse
Author
Message
Posted Tuesday, May 07, 2013 9:21 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 2:38 AM
Points: 79, Visits: 420
The issue I have is with the file retention of the .trn logs in my log shipping drive.

5 days worth of files are being retained. However, I have set the file retention in db properties / log shipping / backup settings to 3 days. Re-run backup, copy & restore jobs (which run every 15 mins anyway) & still 5 days worth of files are retained.

I'm not sure which job (if any) is responsible for deletion of these files.

I've repeated with a 1 day setting. No difference.

I've checked the meta data. Backup_retention_period settings on primary & secondary servers = 1440 (24 hours), which is correct. Log shipping is up to date. The logs are not required. Permissions are fine (since files > 5 days are deleted). I need to cut this down as my drive is filling.

Any ideas gratefully received.

Thank you.



Post #1450215
Posted Tuesday, May 07, 2013 3:22 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Yesterday @ 5:33 PM
Points: 743, Visits: 1,067
Does the account/ SQL Server agent Service account has delete file permission on the server where job is set up?

Try logging in the folder with the account which is running the log shipping job and see if you are able to delete the file manually?
Post #1450345
Posted Wednesday, May 08, 2013 1:55 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 2:38 AM
Points: 79, Visits: 420
Yes, it does, the files are deleted after 5 days. I just can't cut that down at all.
Post #1450440
Posted Wednesday, May 08, 2013 7:23 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, March 21, 2014 9:46 AM
Points: 387, Visits: 1,078
Are Primary and Secondary server in different time zone?
Post #1450553
Posted Monday, May 13, 2013 6:02 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 2:38 AM
Points: 79, Visits: 420
Sorry for the delay, I've been away.

I've added space so circumvented the issue but it's annoying. I find log shipping on 2005 quite buggy though it may be my environment.

Fair question, but alas, they are in the same timezone.

Post #1452063
Posted Monday, May 13, 2013 7:06 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:26 PM
Points: 5,961, Visits: 12,847
which files are not being deleted the files on the primary or the secondary?


Results of the following please

Against the primary instance note the value for "backup_retention_period"
exec master.sys.sp_help_log_shipping_primary_database @database = 'yourprimarydb'


Against the secondary instance note the value for "file_retention_period"
exec sys.sp_help_log_shipping_secondary_database @secondary_database = 'yoursecondarydb'



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

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

Add to briefcase

Permissions Expand / Collapse