SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Log shipping 2k5 file retention issue - the files are not being deleted.


Log shipping 2k5 file retention issue - the files are not being deleted.

Author
Message
snomadj
snomadj
SSC Eights!
SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)

Group: General Forum Members
Points: 800 Visits: 670
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.
Neeraj Dwivedi
Neeraj Dwivedi
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2009 Visits: 1341
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?
snomadj
snomadj
SSC Eights!
SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)

Group: General Forum Members
Points: 800 Visits: 670
Yes, it does, the files are deleted after 5 days. I just can't cut that down at all.
SQL Show
SQL Show
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1499 Visits: 1078
Are Primary and Secondary server in different time zone?
snomadj
snomadj
SSC Eights!
SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)SSC Eights! (800 reputation)

Group: General Forum Members
Points: 800 Visits: 670
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
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)

Group: General Forum Members
Points: 53571 Visits: 17672
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" ;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search