Snapshot Replication Retention I've got Snapshot replication set up on my SQL Server 2008 production server, and I just noticed that there are snapshots ranging back to a year ago in the snapshot folder.  How can I change the retention for these snapshots?  Specifically I'd like it to retain snapshots for 5 days.

Here's a screenshot of the folder I'm looking at:
This is usually an issue where the permissions on xp_cmdshell have been modified for security reasons. You can also have this issue if the SQL Agent account does not have the required network permissions to delete data from your replication folder.


Verify xp_cmdshell is enabled and that the account executing it has proper permissions.

USE master
GO
EXEC sp_configure 'show advanced option', '1';
reconfigure;
GO
exec sp_configure 'xp_cmdshell';



Output should be:

name         minimum    maximum config_value run_value
xp_cmdshell  0          1       1            1