Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Replication (2005)
 Transactional Replication & DDL Change to Existing

Author  Topic 

wimpag1
Starting Member

1 Post

Posted - 2007-09-24 : 10:27:13
I am trying to make a DDL change to an existing column for a transactionally replicated table. I am attempting to effect the ALTER on the Publisher. Below is the statement I am using:

[Begin Code Snippet]

ALTER TABLE Products ALTER COLUMN LegacyProductID varchar(20)NULL

[Begin Code Snippet]




This is the error message:



Msg 4928, Level 16, State 1, Line 3
Cannot alter column 'LegacyProductID' because it is 'REPLICATED'.



Column properties currently are:

INT
NULL
Not For Replication - False
Primary Key - False

I read this article http://www.replicationanswers.com/AlterSchema2005.asp but still cannot either get the statement to work or identify a reason it isn't working.


spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-24 : 10:49:46
change not for replication to true
change the column definiton,
change it not for replication back to false

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -