Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

can Replication Server send "set rowcount" to replicate site?

5 posts in General Discussion Last posting was on 2011-09-20 13:51:25.0Z
Eisen Posted on 2011-09-19 08:38:32.0Z
Sender: 3a41.4e76fe12.1804289383@sybase.com
From: Eisen
Newsgroups: sybase.public.rep-server
Subject: can Replication Server send "set rowcount" to replicate site?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4e76ff88.3abc.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 19 Sep 2011 01:38:32 -0700
X-Trace: forums-1-dub 1316421512 10.22.241.41 (19 Sep 2011 01:38:32 -0700)
X-Original-Trace: 19 Sep 2011 01:38:32 -0700, 10.22.241.41
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.rep-server:9057
Article PK: 870224

Dear all
As we know, usually in table replication, we can specify
the affected rowcount by primary key in transaction. But in
the MSA or Warm-Standby situation, I found something maybe
cause problem.-- eg.
I build up a RS service with MSA to replicate entire
database from A.a to B.a
now on A.a we can
1. create table testtb (id int,b varchar(20))
2. insert testtb values(1,'haha')
insert testtb values(1,'haha')
insert testtb values(2,'hoho')
3. set rowcount 1
delete testtb where id=1
When we doing this, the RS shutdown immediately, and the
error log shows when RS transfer the DML from A.a to B.a --
in queue's transaction, we can see the rowcount should be 1,
but on the replicate the transaction would produce rowcount
to be 2. This issue caused the RS DSI fail. Would be there
any configuration to let RS also send the rowcount limit to
the replicate? Thanks in advance to any help.

Best Regards
Eisen


Manish Negandhi [TeamSybase] Posted on 2011-09-19 10:16:57.0Z
From: "Manish Negandhi [TeamSybase]" <nospam_negandhi.manish@gmail.com>
Newsgroups: sybase.public.rep-server
References: <4e76ff88.3abc.1681692777@sybase.com>
Subject: Re: can Replication Server send "set rowcount" to replicate site?
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3664
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3664
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e771699$1@forums-1-dub>
Date: 19 Sep 2011 03:16:57 -0700
X-Trace: forums-1-dub 1316427417 10.22.241.152 (19 Sep 2011 03:16:57 -0700)
X-Original-Trace: 19 Sep 2011 03:16:57 -0700, vip152.sybase.com
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.rep-server:9058
Article PK: 870226


<Eisen> wrote in message news:4e76ff88.3abc.1681692777@sybase.com...
> Dear all
> As we know, usually in table replication, we can specify
> the affected rowcount by primary key in transaction. But in
> the MSA or Warm-Standby situation, I found something maybe
> cause problem.-- eg.
> I build up a RS service with MSA to replicate entire
> database from A.a to B.a
> now on A.a we can
> 1. create table testtb (id int,b varchar(20))
> 2. insert testtb values(1,'haha')
> insert testtb values(1,'haha')
> insert testtb values(2,'hoho')
> 3. set rowcount 1
> delete testtb where id=1
> When we doing this, the RS shutdown immediately, and the
> error log shows when RS transfer the DML from A.a to B.a --
> in queue's transaction, we can see the rowcount should be 1,
> but on the replicate the transaction would produce rowcount
> to be 2. This issue caused the RS DSI fail. Would be there
> any configuration to let RS also send the rowcount limit to
> the replicate? Thanks in advance to any help.
>
> Best Regards
> Eisen

Can you please post source and target ASE and Repserver version as well as
exact error message from repserver log ?

-Manish Negandhi
[TeamSybase]


Leonid Gvirtz Posted on 2011-09-19 12:28:33.0Z
From: Leonid Gvirtz <lgvirtz@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.rep-server
Subject: Re: can Replication Server send "set rowcount" to replicate site?
References: <4e76ff88.3abc.1681692777@sybase.com>
In-Reply-To: <4e76ff88.3abc.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e773571$1@forums-1-dub>
Date: 19 Sep 2011 05:28:33 -0700
X-Trace: forums-1-dub 1316435313 10.22.241.152 (19 Sep 2011 05:28:33 -0700)
X-Original-Trace: 19 Sep 2011 05:28:33 -0700, vip152.sybase.com
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.rep-server:9059
Article PK: 870228

Hi

As far as I know, ASE doesn't write any record about "set rowcount" statements into transaction log. Therefore,
Replication Agent has no chance to discover the presence of "set rowcount" and cannot pass it to the Replication Server.

If you don't create a replication definition for a table in MSA environment, RS assumes that the primary key of the
table contains all columns of the table except of text/image/other special cases. So, one should care that records in
the table are indeed unique in terms of RS primary key, either using a unique index or not. Error message 5185 (I
suppose that you receive this message) and related check mechanism is relatively new for RS, I don't remember it exists
in RS 12.6. So, in earlier RS versions, violation of RS primary key were caused your table going out-of-sync silently.
Newer versions of RS do this check for us and it is good.

As far as I can see, the only way to "replicate" set rowcount is to put it inside a stored procedure and replicate the
stored procedure using a procedure replication definition. In other words, you can replicate the execution of a stored
procedure (exec statement) instead of statements inside the stored procedure.

Hope it helps
Leonid Gvirtz
http://www.gvirtz-consulting.com

On 9/19/2011 11:38 AM, Eisen wrote:
> Dear all
> As we know, usually in table replication, we can specify
> the affected rowcount by primary key in transaction. But in
> the MSA or Warm-Standby situation, I found something maybe
> cause problem.-- eg.
> I build up a RS service with MSA to replicate entire
> database from A.a to B.a
> now on A.a we can
> 1. create table testtb (id int,b varchar(20))
> 2. insert testtb values(1,'haha')
> insert testtb values(1,'haha')
> insert testtb values(2,'hoho')
> 3. set rowcount 1
> delete testtb where id=1
> When we doing this, the RS shutdown immediately, and the
> error log shows when RS transfer the DML from A.a to B.a --
> in queue's transaction, we can see the rowcount should be 1,
> but on the replicate the transaction would produce rowcount
> to be 2. This issue caused the RS DSI fail. Would be there
> any configuration to let RS also send the rowcount limit to
> the replicate? Thanks in advance to any help.
>
> Best Regards
> Eisen