all groups > sql server replication > april 2004 >
You're in the

sql server replication

group:

sp_createstats



sp_createstats TJSS
4/28/2004 8:11:02 PM
sql server replication: If sp_autostats <tablename> will display the current statistics status of all indexes in the authors table, is there a counterpart for sp_createstats? Based on Books online, sp_createstats will create statistics for all eligible columns for all user tables in the current database. I'm afraid to execute sp_createstats <tablename> as it might create statistics for all eligible columns in that particular table instead of showing the status

Is it actually possible to disable automatic create statistics for a specific table or is it applied to the entire database as a whole? Because sp_autostats <tablename>, 'OFF' will disable the automatic update statistics for the specified table, is there a counterpart for automatic create statistics?

Re: sp_createstats TJSS
4/29/2004 3:21:02 AM
Thanks for the feedback

I would like to disable auto create statistics because we are having issues with data delivery via DataMirror Transformation Server. We use bcp refresh mode so the indexes and statistics are dropped at the beginning of the refresh and stored in a bcp file. At the end of the refresh, the bcp file is extracted and the indexes and statistics are re-created. However in the middle of the refresh, auto create statistics options somehow kicks off so by the time they are re-created based on the bcp file, we receive an error. That is why I would like to know if it is possible disable autocreate statistic for a specific table. But since you say that SQL Server doesn't know the tablename before it is created, I am wondering if it will be any help at all

Re: sp_createstats Paul Ibison
4/29/2004 9:40:22 AM
"Update Statistics" can be used on an individual table while the
corresponding table-level creation command is "Create Statistics". Disabling
automatic create statistics for a specific table doesn't really make sense
as SQL Server doesn't know the tablename before it is created, so it is a
database setting.
HTH,
Paul Ibison

AddThis Social Bookmark Button