I want to change the length of a replicated column. I ran this:
exec sp_articlecolumn @publication = N'DIONLINE-SQL2014' , @article = N'Valuation' , @column = N'WallConstruction' , @operation = N'drop' , @force_invalidate_snapshot = 1 , @force_reinit_subscription = 1
(1 row(s) affected)
alter table Valuation.Valuation alter column WallConstruction varchar(255) null
Msg 4928, Level 16, State 1, Line 1
Cannot alter column 'WallConstruction' because it is 'REPLICATED'.
I've successfully used a very similar approach to perform a very similar task - altering the Valuation.Valuation.RoofConstruction column (except I removed that column from the publication via the UI) - so I'm puzzled why this won't work.
I plan eventually to add the column back into the publication.
What's going on here, or where do I look to find out?
Luckily the column I was trying to alter had not yet received any values, so I was able to do this:
alter table Valuation.Valuation drop column WallConstruction alter table Valuation.Valuation add WallConstruction varchar(255) null
but that doesn't really seem like the most useful answer. So if anyone has a better solution...