Saturday, February 25, 2012

Publication creating bcp files on server

using publication from server one to server two. On server one, I have several directories with bcp files. Can the older files and directories be deleted?

Hi Paul

Are these bcp files being created by merge/tran replication? If so here is a detailed reply from Raymond Mak from a previous post specifically for tran replication. Post back here if you need any further help.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=265814&SiteID=1

Cleanup of snapshot files for transactional\snapshot replication is actually handled automatically by the 'distribution cleanup agent' which is basically a SQLServerAgent job that runs the sp_MSdistribution_cleanup stored procedure periodically at the distribution database. Thus, you may want to check the job history of the cleanup agent and see if it had any troubles removing snapshot folders or if it is running at all. And if you find that the distribution cleanup agent had trouble cleaning up the snapshot folders, it is more than likely that either the SQL Server service account or the xp_cmdshell proxy account lacks sufficient privilege to remove the snapshot folders. Now, I suspect that what I have said so far has very little to do with your particular scenario but instead I am guessing that one of your publications has the immediate_sync (select immediate_sync from syspublications at publisher database to confirm) set to 1. Normally, if none of your publications has the immediate_sync property set to 1, the distribution cleanup agent will remove the snapshot folder as soon as the snapshot data has been distributed to all applicable subscribers. However, if any of your publications has the immediate_sync property set to 1, the snapshot files for that publication may stay around until the max distribution retention (default 72 hours) is past. This is because immediate_sync = 1 means that snapshot data should be made available for initializing any new subscriptions added after the snapshot has been generated. The SQL2005 create publication wizard will enable the immediate_sync publication if you check the "Generate snapshot immediately ... " check-box and that may explain how some of your publications have the immediate_sync property set to 1 in the first place.

Hope that helps.

Nabila Lacey

No comments:

Post a Comment