June 25, 2013 at 10:29 am
The "sp_updatestats" stored procedure resides in the master database.
Right clicking on it in SSMS offers the option of altering it. Selection of this option produces a SQL script that appears to offer the opportunity to alter the stored procedure.
Performing a syntax check on the script or attempting to execute the script produces the following error:
"Msg 195, Level 15, State 10, Procedure sp_updatestats, Line 125"
"'stats_ver_current' is not a recognized built-in function name."
However, the stored procedure, unmodified, can be successfully executed.
Where is the function "stats_ver_current"? I've searched for it and cannot find it.
June 25, 2013 at 12:09 pm
Take a look at this thread. http://dbaspot.com/sqlserver-server/457646-stats_ver_current.html
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
June 25, 2013 at 1:23 pm
Thanks, Sean. I had already read that and many other posts on the subject.
My original purpose was to alter the "sp_updatestats" stored procedure reduce the sensitivity to data changes on one of my employer's productions servers.
To make a not-too-long story even shorter, I created my own version of the "sp_updatestats" stored procedure that doesn't use the "stats_ver_current" function call.
I'm now experimenting with a suitable number for the modified row count to optimize execution times and still produce the desired results when updating index statistics.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply