I have set up merge replication web sync to sync a publication from a SQL Server 2012 database.

I am trying to make some parameterised filters using SUSER_SNAME() or HOST_NAME().

When I do a sync is it possible to find somewhere what the values of SUSER_SNAME() and HOST_NAME() actually were for that sync? E.g. in the system tables.

I will need to experiment with security to work out what settings will affect these values, but I will need to find out what these values actually are to verify my settings.

  • 1
    I don't believe SQL Server tracks this by default. You could likely set something up to do it going forward using extended events (or trace). – Aaron Bertrand Jun 12 '12 at 23:35

Not really anything obvious.

The easiest would be if you have a backup you could restore to view it.

Otherwise you'll properly try - either yourself, daunting, or via commercial tools to find a tool that lets you explore the transaction log for the given changes. For example something like: http://www.apexsql.com/sql_tools_log.aspx

I've not tried out such tools myself so I cannot vouch for them. I usually get by either by having backups to search, or in some cases, I've set up change tables to log changes to critical data.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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