September 9, 2020 at 2:22 pm
Hi,
I'm have sysadmin rights but it is not possible for me to delete auto created statisitcs. I receive the message, that the statistic doesn't exits or I do not have enough rights to do this.
drop statistics [company$Sales Line].[_WA_Sys_00000001_73A22229];
What can I do to delete the auto created statistics.
September 9, 2020 at 8:04 pm
Can you run: DBCC SHOW_STATISTICS([company$Sales Line],[_WA_Sys_00000001_73A22229])
If this is a statistic on an index, then it cannot be dropped as it exists as long as the index exists. For your database, do you have the [Auto Update Create Statistics] or [Auto Update Statistics] set to True?
September 9, 2020 at 8:44 pm
Hi,
I'm have sysadmin rights but it is not possible for me to delete auto created statisitcs. I receive the message, that the statistic doesn't exits or I do not have enough rights to do this.
drop statistics [company$Sales Line].[_WA_Sys_00000001_73A22229];
What can I do to delete the auto created statistics.
is the [company$Sales Line] table name in the "dbo" schema? If not, you must specify the schema name along with the table name... which is a good habit to get into for all table and other object names. And, just to ask the question... the table name has a "$" sign in it? Or is that from something else and should be a "period" where the schema name is "company" and the table name is "Sales Line" and it actually does have a space in it.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 11, 2020 at 10:19 am
Hi,
my problem was, that I have been connected to the wrong datebase with mit script.
Thank you very much for your help.
September 13, 2020 at 12:55 am
Hi,
my problem was, that I have been connected to the wrong datebase with mit script.
Thank you very much for your help.
Thanks for the feedback and pretty darned honest of you, as well. I think we've all had a similar problem at least once.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply