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 7, 2013 9:21 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 10:55 AM
Points: 79, Visits: 427
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 7, 2013 3:22 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 1:21 PM
Points: 809, Visits: 1,160
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 8, 2013 1:55 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 24, 2014 10:55 AM
Points: 79, Visits: 427
Yes, it does, the files are deleted after 5 days. I just can't cut that down at all.
Post #1450440
Posted Wednesday, May 8, 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: Thursday, July 24, 2014 10:55 AM
Points: 79, Visits: 427
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:30 AM
Points: 6,183, Visits: 13,330
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