Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Schema changes screw up transactional replication

 
   Database Help (Home) -> Replication RSS
Next:  SQL 2005: Transact. Repl. > Executing sp on su..  
Author Message
kristoffer.vidmo

External


Since: Jan 16, 2008
Posts: 1



(Msg. 1) Posted: Wed Jan 16, 2008 2:48 am
Post subject: Schema changes screw up transactional replication
Archived from groups: microsoft>public>sqlserver>replication (more info?)

Hi

We have two servers with SQL Server 2005, version 9.0.3042 on both.

There is a transactional replication between them but when we make
schema changes
on the publisher something goes wrong. We get this error message

Subquery returned more than 1 value. This is not permitted when the
subquery follows =, !=, <, <= , >, >= or when the subquery is used as
an expression.

It also gives the query that is causing this

select * from MSsubscription_articlecolumns where artid= 4 and
agent_id=(select id from MSsubscription_agents where update_mode > 0
and UPPER(publisher)=UPPER(N'PublisherServerName') and publisher_db=
N'PublishedDatabase' and publication= N'PublicationName')

When we run the subquery on the subscriber

select * from MSsubscription_agents where update_mode > 0 and
UPPER(publisher)=UPPER(N'PublisherServerName') and publisher_db=
N'PublishedDatabase' and publication= N'PublicationName'

we get two rows in table MSsubscription_agents where the one with the
highest id seems to cause the error.
When we delete that row the replication starts to work again.

Does someone know why this is happening and how we can prevent it?

Regards
/Kristoffer

 >> Stay informed about: Schema changes screw up transactional replication 
Back to top
Login to vote
Hilary Cotter

External


Since: Jan 16, 2008
Posts: 142



(Msg. 2) Posted: Wed Jan 16, 2008 5:32 am
Post subject: Re: Schema changes screw up transactional replication [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It looks like you are getting this error as there appears to be two
subscriptions on the same subscriber database. Are both of these
subscriptions valid or is one a rogue entry?

On Jan 16, 5:48 am, kristoffer.vi... DeleteThis @gmail.com wrote:
> Hi
>
> We have two servers with SQL Server 2005, version 9.0.3042 on both.
>
> There is a transactional replication between them but when we make
> schema changes
> on the publisher something goes wrong. We get this error message
>
> Subquery returned more than 1 value. This is not permitted when the
> subquery follows =, !=, <, <= , >, >= or when the subquery is used as
> an expression.
>
> It also gives the query that is causing this
>
> select * from MSsubscription_articlecolumns where artid= 4 and
> agent_id=(select id from MSsubscription_agents where update_mode > 0
> and UPPER(publisher)=UPPER(N'PublisherServerName') and publisher_db=
> N'PublishedDatabase' and publication= N'PublicationName')
>
> When we run the subquery on the subscriber
>
> select * from MSsubscription_agents where update_mode > 0 and
> UPPER(publisher)=UPPER(N'PublisherServerName') and publisher_db=
> N'PublishedDatabase' and publication= N'PublicationName'
>
> we get two rows in table MSsubscription_agents where the one with the
> highest id seems to cause the error.
> When we delete that row the replication starts to work again.
>
> Does someone know why this is happening and how we can prevent it?
>
> Regards
> /Kristoffer

 >> Stay informed about: Schema changes screw up transactional replication 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Combining Transactional Replication and Merge Replication - I would like to know if this scenario is possible: I have main database (Server A) that I replicate to another server using transactional replication (Server B), know I would like to publish this database on Server B as a merge publication and then...

Can you have transactional replication of blobs? - I am having an issue using transactional replication on a SQL 2005 SP2 system when trying to replicate an Image data type. The data won't write to the Prod system, let alone replicate. However, when I remove the table from the publication everything..

Bidirectional Transactional replication - Hi All Do any one know where to get good Knowledge resources for writing and implementing stored procedures for bidirectional transactional replication. I f any body has one implemented recently can you spare the steps involved and the best practises....

UDFs & Transactional Replication - I created a UDF... create FUNCTION dbo.WhatLocationIsThis() RETURNS numeric AS begin declare @return as numeric SELECT @return = Location FROM storemain..tblLocationTable return @return end GO When I run 'select dbo.WhatLocationIsThis()' it..

trigger problems and transactional replication - I have a major issue going on with transactional replication and triggers. There are 2 tables: Product and Asset. When a product price is updated, then it fires a trigger that updates the price * units AND a few other date fields for every instance of...
   Database Help (Home) -> Replication All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]