Re: Replicating database schema changes in "daisy chain" situation

From: Vijay [MSFT] (vijayts_at_online.microsoft.com)
Date: 11/30/04


Date: Mon, 29 Nov 2004 17:31:12 -0800

I know this scenario works in general. I tried very simple scenario
mimicing yours. So can you take a look at these steps to find any
significant difference with yours or send me yours if you have one?

create database central
create database hub1
create database spoke1
go
exec sp_replicationdboption 'central','merge publish','true'
exec sp_replicationdboption 'hub1','merge publish','true'
use central
go
create table t1(c1 int, c2 int)
exec sp_addmergepublication 'pubname'
exec sp_addpublication_snapshot 'pubname'
exec sp_addmergearticle 'pubname','t1','t1'
exec sp_addmergesubscription
@publication='pubname',@subscriber=@@servername,
@subscriber_db='hub1',@subscriber_type='global'
--Run snapshot and merge between central and hub1
use hub1
go
exec sp_addmergepublication 'pubname'
exec sp_addpublication_snapshot 'pubname'
exec sp_addmergearticle 'pubname','t1','t1'
exec sp_addmergesubscription
@publication='pubname',@subscriber=@@servername,
@subscriber_db='spoke1',@subscriber_type='local'
--Run snapshot and merge between hub1 and spoke1
use central exec sp_repldropcolumn 't1','c2'
--Run merge between central and hub1 and then between hub1 and spoke1

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
"Tommy" <Tommy@discussions.microsoft.com> wrote in message
news:118C7C96-9B41-4FDC-A1D9-A053642DA8E7@microsoft.com...
> We have a setup where SQL Server A servers as a Master database. SQL
Server B
> is installed in another country and replicates key master data from server
A.
> MSDE Instance C replicates with Server B to receive this master data as
well
> as merge data that is shared only between B and C. We recently needed to
> change some column widths. I used the sprocs to add and drop columns to
> recreate the columns with the new widths on server A. When we try to
> replicate this to server B we get an error "The schema script 'exec
> sp_repldropcolumn '[dbo].[<Table Name]', 'Column Name>', 1' could not be
> propagated to the subscriber." It seems that since server B's tables are
in
> publications, the changes cannot be applied from server A. I tried running
> the same SQL statements I ran on server A on server B to make the column
> changes but it tells me that "Schema replication failed because database
> <database name> on server <server> is not the original Publisher of table
> <table name>." (this is returned from the sp_repladdcolumn call).
>
> Any ideas on how to propogate the schema cahnges?
>
> Tommy


Relevant Pages

  • SQL-DMO problems
    ... I'm trying to generate the sql script for a given database. ... declare @DatabaseCollection int ... -- intializes the server object ... exec sp_OAGetErrorInfo @Server, @src OUT, @desc OUT ...
    (microsoft.public.sqlserver.programming)
  • Re: How to change password for sa?
    ... This is a more friendly way to fix logins after a restore of database of ... The problem is that a database ... > EXEC sp_changedbowner 'TempOwner' ... > SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Failed to copy table objects - DTS Wizard
    ... thing - need to change ownership of the databases to login ... >when a database is restored or attached. ... >EXEC sp_changedbowner 'TemoOwner' ... >SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: String manipulation - taking one long csv string and putting into separate record fields
    ... From what I can work out, it looks as if the script is taking ... "%2147746132" from the computer VPN-01 when attempting to activate the ... computer VPN-01 when attempting to activate the server: ... EXEC xp_startmail ...
    (microsoft.public.sqlserver.programming)
  • Re: Script to delete backup files which are 7 days old
    ... you might want to know that the sp_smtp_sendmail and xp_smtp_sendmail have been used for this purpose by many many people on SQL Server 2000. ... DECLARE @DeleteFiles NVARCHAR ... SELECT 'exec xp_cmdshell ''DEL "' ...
    (microsoft.public.sqlserver.tools)