May 7, 2013 at 9:21 am
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.
May 7, 2013 at 3:22 pm
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?
May 8, 2013 at 1:55 am
Yes, it does, the files are deleted after 5 days. I just can't cut that down at all.
May 8, 2013 at 7:23 am
Are Primary and Secondary server in different time zone?
May 13, 2013 at 6:02 am
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.
:ermm:
May 13, 2013 at 7:06 am
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" 😉
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply