Setting up SQL Profiler to troubleshoot eSync

  • Updated

If sync is running longer than expected or it is not syncing the expected items it can sometimes be helpful to create a SQL Profiler trace to show what queries are executing.

SQL Profiler Trace Setup Steps

  1. Open SQL profiler (tools > SQL Profiler from SQL Management Studio).
  2. Click File then New Trace
  3. Enter the SQL Server of the receiving database(if necessary you can also setup on the sending side) and click connect.
  4. On the next screen give the trace a name and in the "Use the template:" field click Standard.
  5. Click the check box next to Save to file, give it a path and name, and uncheck "Enable file rollover"(unless you expect a very large sync in which case use the rollover).
    2017-11-07_15_17_28-Setting_up_SQL_Profiler_to_troubleshoot_eSync.png
  6. Click the Events Selection tab.
  7. Uncheck the Security audit events on the left side. This should make the audit login and audit logout rows unchecked.
  8. Check the textdata column for the stored procedure event.
  9. When it's done it should look like this.
    2017-11-07_15_36_54-Trace_Properties.png
  10. Click Show all columns.
  11. Click Column Filters...
  12. Click DatabaseName
  13. Click like and enter the database name of the database you are syncing to.
  14. Click on TextData.
  15. Click like and enter %sync_%. 
  16. Click Run.