title: Finding Caller of SQL Function
body: <p>There's a SQL function that I'd like to remove from a SQL Server 2005 database, but first I'd like to make sure that there's no one calling it.  I've used the "View Dependencies" feature to remove any reference to it from the database.  However, there may be web applications or SSIS packages using it.</p>
  
  <p>My idea was to have the function insert a record in an audit table every time it was called.  However, this will be of limited value unless I also know the caller.  Is there any way to determine who called the function?</p>