Solved

cannot drop statistics in sql server

Posted on 2010-08-21
4
2,308 Views
Last Modified: 2013-11-21
I have a problem deleting one of the statistics in the table.
when i script
if  exists (select * from sys.stats where name = N'inx_add_1' and object_id = object_id(N'[dbo].[Call_Details_]'))
DROP STATISTICS [dbo].[Call_Details_].[inx_add_1]

then get an error below
Msg 3739, Level 11, State 1, Line 3
Cannot DROP the index 'dbo.Call_Details_.inx_add_1' because it is not a statistics collection.


any idea why is this happening, and when i  right click on the stats name the "script statistics as"  is grayed out by default. any idea friends....
0
Comment
Question by:espanolanthony
  • 3
4 Comments
 
LVL 8

Accepted Solution

by:
Yiogi earned 500 total points
Comment Utility
It appears that it's an index and not statistics
try drop index instead
0
 
LVL 1

Author Comment

by:espanolanthony
Comment Utility
But there is no index bu that name
0
 
LVL 1

Author Comment

by:espanolanthony
Comment Utility
yes i got it. thanks i removed all the indexes expect PK then deleted stats and then recreated all the indexes again.

thanks for the highlight
0
 
LVL 1

Author Closing Comment

by:espanolanthony
Comment Utility
thanks
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Some time ago I faced the need to use a uniform folder structure that spanned across numerous sites of an enterprise to be used as a common repository for the Software packages of the Configuration Manager 2007 infrastructure. Because the procedu…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now