2

I'm working on a script to iterate through all the snapshot folders and do some basic find and replace of the ANSI_PADDING OFF bug and replace it with SET ANSI_PADDING ON. I'd like to be able to dynamically point to any publisher and get a list of currently configured snapshot folders by publication. I can then filter and dedupe if needed.

I know I can query the distribution database for the default folder but how do I return the currently configured one, if say, someone changed the snapshot folder via the Replication Monitor GUI?

1 Answer 1

3

The snapshot folder is configured per Distributor. The stored procedure sp_helpdistributor returns a column directory which is the snapshot folder for a specified distributor.

1
  • Thanks, and sp_helpdistributor runs at the PUBLISHER, not the DISTRIBUTOR too
    – Jerry Hung
    Commented Jun 5, 2020 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.