RE: Dropping System Generated Indexes

RE: Dropping System Generated Indexes

 

  

Ok, well I tried dropping statistics for that column by executing this:
DROP STATISTICS AcctsRec.ARAmt
GO
And I get this error:
Server: Msg 3701, Level 11, State 6, Line 1
Cannot drop the statistics 'AcctsRec.ARAmt', because it does not exist in
the system catalog.

To see if it was a CONSTRAINT, I did this:
ALTER TABLE [dbo].[AcctsRec] DROP CONSTRAINT [_WA_Sys_ARAmt_75D7831F]
GO
And I got this error:
Server: Msg 3728, Level 16, State 1, Line 1
'_WA_Sys_ARAmt_75D7831F' is not a constraint.
Server: Msg 3727, Level 16, State 1, Line 1
Could not drop constraint. See previous errors.

So, if its not an index, not a constraint, not a statistic, then what is
it?? Has to be one of the 3 I would think.

Thanks,
Greg

-----Original Message-----
From: jason_whiffin
[mailto:mssqldba-ezmlmshield-x7968497.[Email address protected]
Sent: Wednesday, March 30, 2005 5:03 AM
To: LazyDBA Discussion
Subject: RE: Dropping System Generated Indexes


Those are statistics which are held on indexes and columns; they're rather
useful to help the Query Processor determine the best query plan...
You can drop them using drop statistics etc; but i'd advise a bit more
research to understand if that is really what you want to do !!
hth

regards





"Yilmaz Eralper "

<mssqldba-ezmlmshield-x7045241.[Email address protected]
To: "LazyDBA Discussion"
om>
<[Email address protected]

cc:

Subject: RE: Dropping System Generated Indexes
Wednesday March 30, 2005 07:50










Hi,

Are you sure that it is an index? It may be an constraint.

I had a similar case when I took the drop script from an other database
(replica of the one you are working on), I also had some constraints that
have different names on both servers.


Eralper
http://www.kodyaz.com


-----Original Message-----
From: KPS Info
[mailto:mssqldba-ezmlmshield-x77692067.[Email address protected]
Sent: 30 Mart 2005 Çarşamba 04:58
To: LazyDBA Discussion
Subject: Dropping System Generated Indexes

Hi all,

I am in the process of optimizing a SQL database and there are alot of auto
generated indexes that I would like to remove. They start with _WA_Sys_...

I tried executing a
DROP INDEX AcctsRec._WA_Sys_ARAmt_75D7831F GO but it gives me this error:
Server: Msg 3703, Level 11, State 7, Line 1 Cannot drop the index
'AcctsRec._WA_Sys_ARAmt_75D7831F', because it does not exist in the system
catalog.

I queried the sysindexes table and the record exists for this index and when
I look at the Taskpad view for the database, the index shows up.

So, my question is, how (if possible) can I remove this index? I want to
remove all of these indexes and then see if they get regenerated as part of
my optimization process.

Thanks,
Greg



---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]





---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]




MS Sql Server LazyDBA home page