Thursday, March 22, 2012

Alter table that is masked for replication

Hi,
I have a snapshot replication between two SQL server 2000 (Main Svr & Backup
Svr). At present the replication is working well but now due enhancement i
need to alter soem of the table. When I perform the alteration to the 'Main
Svr' I get a error message 'Cannot delete and create table and it is used by
replication'.
How can I alter the table?
After alteration will this be reflected back to 'Backup Svr'?
The 'Backup Svr' is hosted as another SQL instance on a Win2k server. How
can I connect to this second instance using ADODB (V2.8) from visual basic.
Thanks
Hari
Hi Paul,
Thanks for that let me try it.
Hope you could also help me on this.
How can i connect to secodn sql instance using ADODB in VB.
Thanks,
Hari
"Paul Ibison" wrote:

> To add a column, use sp_repladdcolumn. To drop one use
> sp_repldropcolumn. To change an existing column, you
> could add a new column with the new datatype
> (sp_repladdcolumn), do an update on the table to populate
> the column, then drop the column (sp_repldropcolumn). Do
> this again to create the column having the same original
> name. Alternatively you could use:
> sp_dropsubscription @.publication = 'northwindxxx'
> , @.article = 'region'
> , @.subscriber = 'pll-lt-16'
> sp_droparticle @.publication = 'northwindxxx'
> , @.article = 'region'
> sp_refreshsubscriptions @.publication ='northwindxxx'
> And do the opposite to add back in once the change has
> been made.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>

No comments:

Post a Comment