Solved

cannot drop statistics in sql server

Posted on 2010-08-21
4
2,403 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
ID: 33491601
It appears that it's an index and not statistics
try drop index instead
0
 
LVL 1

Author Comment

by:espanolanthony
ID: 33491617
But there is no index bu that name
0
 
LVL 1

Author Comment

by:espanolanthony
ID: 33491626
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
ID: 33491629
thanks
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

776 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