Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Statistics and an ALTER statement
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Titre:
Statistics and an ALTER statement
Divers
Thread ID:
00628999
Message ID:
00628999
Vues:
35
SQL Server 7 Question:
I have a field in a table that I am attempting to change from INT to NUMERIC(9,4) - data does exist in this table.

I have created a script with the ALTER TABLE statement so that I can send it out to multiple clients. When I attempt to run the script, I get the following message:

Server: Msg 4922, Level 16, State 3, Line 1
ALTER TABLE ALTER COLUMN etime failed because STATISTICS hind_114_3_14_4_1_2_5_8_9_10_11_12_18 accesses this column.

Is it safe to delete the statistic before running my ALTER TABLE statement? I
attempted to do this by issueing:
DROP STATISTICS tctxy1.hind_114_3_14_4_1_2_5_8_9_10_11_12_18
before my ALTER statement, but another statistic is also blocking the alter statement:
hind_114_9_1_2_3_4_5_8_10_11_12_14_18

If it is safe to delete these statistics before my ALTER statement, is there a way to get all the statistic names that are hindering the alter statement so that I can delete all that apply. I would like to do this in code so that the script will run smoothly on all client databases. If not, I guess I can hard code the statistic names.
Shawn Dorion
Geo Sektor Dot Com
Website: http://www.geosektor.com

Web Hosting Plans
Visit : http://WebHosting.Applications4u.com/
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform