Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't change field lenght in replication

Status
Not open for further replies.

CFPR

MIS
May 9, 2003
58
0
0
PR
I have setup up (finally!) merge replication and I am able to add / remove columns to replicated tables. The problem is I now have to change the fields length in some of my tables. For example from chr(25) to chr(50). Is there a way to do this other than creating a new field (temp field) with the right length (through replication sp_repladdcolumn), then copying the tempfield with the old field, drop the old field (through replication), create the final new field(through replication), copying tempfield 1 into final field, and FINALLY, dropping tempfield (throught replication)? :)

Thanks to all.
 
I just had the exact same need (using snapshot repl), and couldn't find a way to just drop 1 "article" (table) from the publication so I could change one of the fields. After a little poking around, I came up with this plan to drop a table from a publication so it can be modified, then add the table back in.

1) I just scripted out the CREATE Publication and the DROP publication commands to text files.

2) Ran just the portion of the DROP publication that had to do with TableA

3) Modified FieldA from 6 char to 8 char on publication & subscription databases.

4) Ran just the portion of the CREATE Publication dealing with TableA

5) Ran the snapshot job

6) Ran the pull subscription job

7) Checked the table in the subscription database & it has the same data as the source table.

Disclaimers:
I only just tried this with a snapshot replication ..... seemed to work fine. I don't know if there are any "gotcha's" lurking in this idea.

Any other ideas ?
 
Interesting.. I'' give it a try and get back to you soon.

Thanks!

MW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top