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.

alter rep def to enlarge varchar col

2 posts in Replication Agent Last posting was on 2005-01-04 14:31:57.0Z
Emmanuel Cerisier Posted on 2005-01-03 12:30:48.0Z
From: Emmanuel Cerisier <com.nexgenfs@ecerisier>
User-Agent: Mozilla Thunderbird 0.9 (X11/20041103)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.rep-agent
Subject: alter rep def to enlarge varchar col
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: host.194.72.68.195.rev.coltfrance.com
Message-ID: <41d93af4$1@forums-2-dub>
X-Original-Trace: 3 Jan 2005 04:30:44 -0800, host.194.72.68.195.rev.coltfrance.com
Lines: 51
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 3 Jan 2005 04:30:45 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 3 Jan 2005 04:30:48 -0800
X-Trace: forums-1-dub 1104755448 10.22.108.75 (3 Jan 2005 04:30:48 -0800)
X-Original-Trace: 3 Jan 2005 04:30:48 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.rep-agent:738
Article PK: 862374

Hello all and happy new year,

My first replication issue of 2005 (if only it could be the only one :):

I have a table T1 fully replicated using repdefs to two replicate sites.
We needed to change a col C1's datatype from varchar(30) to varchar(60)

What I did:

- quiesce the rep system

- apply the alter table on the primary & replicates tables

- issue in the PRS:

PRS> alter replication definition T1_REPDEF alter columns with C1
varchar(30) map to varchar(60)
PRS> go
Replication definition 'T1_REPDEF' is altered.

(no more logs than this one in ASE.log nor PRS.log)

C1 is not a PK, so according to my understanding of the docs, I
shouldn't need to touch any subscriptions...


Then when I wanted to check the rep def go replicated OK, I went to the
primary and replicate RSSDs and issued a rs_helprep T1_REPDEF: First
concern, the helprep was still showing initial length value for my column...

Anyway, I decided to give it a try and issued a few inserts. Here's the
error I got from the repserver:

03:00000:00116:2005/01/03 11:21:02.17 server RepAgent(8): Received the
following error message from the Replication Server: Msg 32058. The
value given for 'T1_REPDEF.C1' cannot be translated from datatype 'char'
to the required datatype 'varchar'. Value length is '32'; Maximum target
length is '31'; The value is '|NC-FUNDING POOL|NC-UNIC UNWIND|'..


The very strange thing is that the connection is still up: no DSI down
nor REP Agent, eventhough out of 4 inserts, only 2 got replicated
because they were compatible with the old column datatype, but the 2
others seemed to have been dropped by the PRS...!

Any info or similar experience feedback would be greatly appreciated.
I've opened a case with the support but they have yet to call me back.

Thx,
Emmanuel.


Emmanuel Cerisier Posted on 2005-01-04 14:31:57.0Z
From: Emmanuel Cerisier <com.nexgenfs@ecerisier>
User-Agent: Mozilla Thunderbird 0.9 (X11/20041103)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.rep-agent
Subject: Re: alter rep def to enlarge varchar col
References: <41d93af4$1@forums-2-dub>
In-Reply-To: <41d93af4$1@forums-2-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: host.194.72.68.195.rev.coltfrance.com
X-Original-NNTP-Posting-Host: host.194.72.68.195.rev.coltfrance.com
Message-ID: <41daa8dd$1@forums-1-dub>
Date: 4 Jan 2005 06:31:57 -0800
X-Trace: forums-1-dub 1104849117 195.68.72.194 (4 Jan 2005 06:31:57 -0800)
X-Original-Trace: 4 Jan 2005 06:31:57 -0800, host.194.72.68.195.rev.coltfrance.com
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.rep-agent:739
Article PK: 862377


Emmanuel Cerisier wrote:
> Hello all and happy new year,
>
> My first replication issue of 2005 (if only it could be the only one :):

[...]

After discussion with the Tech support, it apprears that I've been
running the wrong command for the alter rep def:

> PRS> alter replication definition T1_REPDEF alter columns with C1 varchar(30) map to varchar(60)
> PRS> go
> Replication definition 'T1_REPDEF' is altered.

This command will actually try to publish the repdef with a C1 valued as
varchar(60), eventhough the repdef itself still defines it as 30.

That would be why I didn't see any changes in the rs_helprep

The correct command to use would be:
alter replication definition T1_REPDEF alter columns with C1 varchar(60)


I haven't tried yet this command, I prefered dropping the whole repdef
an recreate one. Actually this is what the tech guys advised me to do
whenever having to update a repdef ( wonder why the alter command exists
for, then...)

But I'm still puzzled as to why the Repserver didn't map the insertion
errors that followed (error 32058) to a STOP_REPLICATION to bring down
the DSI...

thx,
Emmanuel.