![]() ![]() ![]() The script will be broken, and its execution will fail.Ī dependency is “enforced” when the referencing object has a schema-bound expression. Therefore, the Sales.SalesTerritory table will contain the TerrID column, but the stored procedure will call, which does not exist anymore. The sp_rename procedure will only rename the TerritoryID column in the Sales.SalesTerritory table, but not the one in the Sales.vTer stored procedure. What are these scripts that will be broken?įor example, let’s say there is a Sales.vTer stored procedure that references the TerritoryID column in the Sales.SalesTerritory table. Object ‘’ cannot be renamed because the object participates in enforced dependencies. The problem is that you will get the following warning:Ĭaution: Changing any part of an object name could break scripts and stored procedures. EXECUTE sp_rename '', 'TerrID', 'COLUMN'
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |