SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Snapshot replication


Snapshot replication

Author
Message
Brandon J Williams
Brandon J Williams
SSC-Enthusiastic
SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)

Group: General Forum Members
Points: 141 Visits: 930
To add a new column to a table and include it in an existing publication, you'll need to use ALTER TABLE <Table> ADD <Column> syntax at the publisher. By default the schema change will be propagated to subscribers, publication property @replicate_ddl must be set to true. The column must allow NULL values or include a default constraint. See Make Schema Changes on Publication Databases for more information.
MyDoggieJessie
MyDoggieJessie
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12416 Visits: 7444
@Lempster and @Brandon - quite right, my ID10T error. I am fully aware of the flag in the publication options to replicate schema changes, however as a quick test I used the GUI to make the change to the table (and MS's way of doing so is to create a temp copy of the table with the new change, copy everything into the temp table, drop the old table, and rename the temp to the original table). This is what generated the error I posted. My bad for not dotting my I's and crossing my T's - very lame w00t

Thanks for pointing this out.

______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience" ;-)
Lempster
Lempster
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5125 Visits: 1657
Phew! Thought I was going mad for a minute. Crazy
RatanDeep Saha
RatanDeep Saha
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1190 Visits: 693
What is the error you are facing , you can alter the Table if there is no index exists on the column you are altering and if any index exists the only change it will allow is increasing the datatype limit .

So if you are changing Datatype varchrar(200) to nvarchar(200) it will fail and if you run varchar(100) to varchar(200) it will successfully execute .


Please post error !

RatanDeep Saha
RatanDeep Saha
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1190 Visits: 693
What is the error you are facing , you can alter the Table if there is no index exists on the column you are altering and if any index exists the only change it will allow is increasing the datatype limit .

So if you are changing Datatype varchrar(200) to nvarchar(200) it will fail and if you run varchar(100) to varchar(200) it will successfully execute .


Please post error !

RatanDeep Saha
RatanDeep Saha
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1190 Visits: 693
What is the error you are facing , you can alter the Table if there is no index exists on the column you are altering and if any index exists the only change it will allow is increasing the datatype limit .

So if you are changing Datatype varchar(200) to nvarchar(200) it will fail and if you run varchar(100) to varchar(200) it will successfully execute .


Please post the error !
RatanDeep Saha
RatanDeep Saha
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1190 Visits: 693
Sorry for multiple posts , I promise this was unintentional blame to my browser's Friday mood .
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search