Sachin Patil
Sachin Patil

Reputation: 23

Msg 5074, Level 16, State 1, Line 1 The index 'IX_Alias_Alias' is dependent on column 'Alias'

Want to change the collation

using the below script

ALTER TABLE Alias ALTER COLUMN Alias nvarchar(25) COLLATE SQL_Latin1_General_CP1256_CI_AS

Error occurs

Msg 5074, Level 16, State 1, Line 1
The index 'IX_Alias_Alias' is dependent on column 'Alias'.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE ALTER COLUMN Alias failed because one or more objects access this column.

Actually I want to change the collation of all the table in database

Upvotes: 1

Views: 3580

Answers (2)

Ardalan Shahgholi
Ardalan Shahgholi

Reputation: 12575

You should delete the index first and then modify the column.

Upvotes: 0

PraveenVenu
PraveenVenu

Reputation: 8337

You can use the below link to alter the collation of all the objects in a database.

Alter Collation for all the objects in a DB

Upvotes: 1

Related Questions