DBA > Job Interview Questions > Replication - MS SQL Server 7.0 Enterprise Manager

How to find out whether a change to the data is

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

How to find out whether a change to the data is made by replication or by other users/applications?

Use the APP_NAME function. This function returns the name of the application that is modifying the data. First, find out the output of APP_NAME function when replication is modifying the data. The output of this function will be the distribution agent's name, when replication is modifying the data. Once you know this name, you can write a trigger which uses APP_NAME function to detrmine if replication is making any changes, and proceed with your custom processing.

(Continued on next question...)

Other Job Interview Questions