all groups > sql server replication > march 2007 >
You're in the

sql server replication

group:

Merge replication - schema change. Am I in trouble?



Merge replication - schema change. Am I in trouble? Rafael Lenartowicz
3/29/2007 12:35:16 PM
sql server replication: after update from 2000SP4 to 2005SP2 I noticed two stored procedures having
issue due to changed functionality of the @@IDENTITY vs. SCOPE_INDETITY(). I
changed them on the publisher/distributor and regenrated the snapshot before
marking subscriptions for reinitialization. Next sync supposed to apply
these changes to the subscribers, right ? I had the publication comp level
set to 90RTM, ddl changes enabled, etc. - nothing worked unless publication
was dropped and recreated. With high number of subscribers and rather active
publisher I didn't want to reconfigure my replication setup...
and after digging around I found the way to change these 2 sp's directly on
the subscribers:

disable TRIGGER [MSmerge_tr_alterschemaonly] ON DATABASE
go

ALTER PROCEDURE ....
go

enable TRIGGER [MSmerge_tr_alterschemaonly] ON DATABASE
go


Does anyone see a potential future problem with this "solution" ?
tia,
rafael

Re: Merge replication - schema change. Am I in trouble? Hilary Cotter
3/29/2007 12:55:17 PM
Which stored procedures did you modify and what changes did you make to
them?

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: Merge replication - schema change. Am I in trouble? Rafael Lenartowicz
3/29/2007 1:43:35 PM
these were user stored procedures inside of the replicated database.
I replaced statement "SELECT @HEADER_ID = @@IDENTITY"
with "SELECT @HEADER_ID = SCOPE_IDENTITY( )" .
Now the subscribers have the same stored procedures as the publisher,
but I wonder if sneaky SQL Server has some kind of checksum or something,
that might give me trouble in subsequent synchronizations...
thanks
rafael


[quoted text, click to view]

Re: Merge replication - schema change. Am I in trouble? Hilary Cotter
3/29/2007 2:07:15 PM
No, it doesn't for user stored procedures. I take it you are aware you can
distribution a change to all unc deployed subscribers via sp_addscriptexec?

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: Merge replication - schema change. Am I in trouble? Rafael Lenartowicz
3/29/2007 2:35:41 PM
great, thanks.
I was aware, but I wanted to do the "fix" right away, used Windows batch
with SQLCMD.
thanks for your responses, as always very knowledgable and quick ;-)

[quoted text, click to view]

AddThis Social Bookmark Button