October 12, 2010 at 8:11 am
I also need to find out how often the function is used on the server
October 12, 2010 at 8:19 am
Run a server-side trace
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 13, 2010 at 12:10 am
October 13, 2010 at 6:16 am
If the function is embedded in other statements you'll probably need to generate the list of places where it's used and then run the server-side trace as Gail suggested, looking for the places where it is used in addition to looking for it.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 18, 2010 at 12:20 pm
just increment a value in a table whenever the function is executed.
The probability of survival is inversely proportional to the angle of arrival.
October 18, 2010 at 12:37 pm
sturner (10/18/2010)
just increment a value in a table whenever the function is executed.
Functions are not allowed to cause side-effects. They cannot insert, update or delete from permanent or temporary tables.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 18, 2010 at 12:43 pm
I was referring to adding a simple update statement in-line at the point of execution.
Obviously if it is called from many different locations (or dynamically generated SQL) he'll have to go with a trace.
The probability of survival is inversely proportional to the angle of arrival.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply