Dropping All Index From A database

  • The Problem is:

    I have to Change Collation On All Database Tables Columns (Char , Varchar)

    I was referd to an artical acompnied by SP's

    To Log and drop and recreate the Indexes

    While Runing the drop Index or Constraint or Statistics there where Indexes that could not Be Droped

    These Idexes were created by the server and they are Hypothetical

    How Can I Drop Them since they are blocking the Change Of Collation

    ??

  • If these 'hypothetical' indexes have a name that starts with _WA, then they are statistics created as a result of having the 'Auto Create Statistics' option set on.

    You can get rid of them by doing a 'DROP STATISTICS tablename.statisticsname'

  • No They Cnaot Be Drop Using Drop Statistic And They Are Not starting with _WA

    By The Way The Index Status is 10485792

    it is int form of hypothetical auto create nonclustered

    the stored procedure decides if it is a statiscal index or not by using

    status & 32

    status & 64

  • I have an example here http://www.insidesql.de/scripts/sqlserverfaq.php?id=42

    Though it only works on one table.

    I'm pretty sure, you'll find something here in the script section of this site.

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply