标签:targe serve mat col ecif int lock otherwise cannot
Try this:
Remove the constraint DF_Movies_Rating__48CFD27E before changing your field type.
The constraint is typically created automatically by the DBMS (SQL Server).
To see the constraint associated with the table, expand the table attributes in Object explorer, followed by the category Constraints as shown below:
You must remove the constraint before changing the field type.
The object ‘Address_e‘ is dependent on column ‘Addr1‘.
ALTER TABLE ALTER COLUMN Addr1 failed because one or more objects access
this column.
The views are probably created using the WITH SCHEMABINDING option and this means they are explicitly wired up to prevent such changes. Looks like the schemabinding worked and prevented you from breaking those views, lucky day, heh? Contact your database administrator and ask him to do the change, after it asserts the impact on the database.
From MSDN:
SCHEMABINDING
Binds the view to the schema of the underlying table or tables. When SCHEMABINDING is specified, the base table or tables cannot be modified in a way that would affect the view definition. The view definition itself must first be modified or dropped to remove dependencies on the table that is to be modified.
SCHEMABINDING
Binds the view to the schema of the underlying table or tables. When
SCHEMABINDING is specified, the base table or tables cannot be modified
in a way that would affect the view definition. The view definition
itself must first be modified or dropped to remove dependencies on the
table that is to be modified. When you use SCHEMABINDING, the select_statement must include the two-part names (schema.object) of tables, views, or user-defined functions that are referenced. All referenced objects must be in the same database.
Views or tables that participate in a view created with the
SCHEMABINDING clause cannot be dropped unless that view is dropped or
changed so that it no longer has schema binding. Otherwise, the Database
Engine raises an error. Also, executing ALTER TABLE statements on
tables that participate in views that have schema binding fail when
these statements affect the view definition.
The object 'DF__*' is dependent on column '*' - Changing int to double
标签:targe serve mat col ecif int lock otherwise cannot
原文地址:https://www.cnblogs.com/chucklu/p/14721377.html