|
|
532815 |
|
Sybase Replication Server |
|
repserver |
|
|
Closed |
|
Solaris |
|
15.0.1 ESD#3 |
|
|
|
|
|
|
|
|
|
28 Jun 2008 |
Fixed |
|
|
|
01 Jul 2008 |
Fixed |
|
|
|
03 Jan 2009 |
Not a Bug |
|
|
|
|
|
A route cannot be created from a primary
RS using RS 15.0 or higher to a
replicate RS using RS 12.6 or earlier.
This can occur when the primary RS is
upgraded from RS 12.6 or earlier to RS
15.0 or later and the site version for
the primary RS is set to 1500. |
|
Workaround Description |
|
Create routes BEFORE setting site_version to 1500, then upgrade them.
Upgrade all RSs to 15.x.
11/13/2008 (and also updated on 12.8.2008)
The problem was seen in 15.0.1 ESD #3. There are three scripts that have been published. RS 15.0.1 ESD #4 will contain the fixed rsupgr_ase.sql and rsupgr_asa.sql scripts. However, if the customer has already migrated, they will need to patch their RSSD. As of this writing, we don't know what the distribution of that patch will be. Here is the patch in case anyone needs it (this is if you have already migrated and now are trying to create the route):
12/8/2008 - Confirmation from RS Eng that this script can be used on RS 15.1 also. RS 15.1 ESD #1 has the fixed scripts. The following is the script if you need to patch your RS and you are not at a RS that has the fixed scripts:
begin
if not exists (select * from rs_columns
where objid = 0x0000000000000058 and colname = 'minvers')
begin
insert into rs_columns values(0, 0x0000000000000058, 'minvers',11, 8, col_length('rs_funcstrings','minvers'), 0, 0, 0, 0, 0, 11, 'minvers', 0x0000000000000008, 0x0000000000000008, 8, col_length('rs_funcstrings','minvers'))
end
end
go
if exists (select name
from sysobjects
where name = 'rs_materialize' and type = 'P')
begin
drop procedure rs_materialize
end
go
create proc rs_materialize @subscription_name varchar(30), @version int
as
declare @mySiteID int
declare @msg varchar(255)
select @mySiteID = id
from rs_sites
where name=(select charvalue
from rs_config
where optionname='oserver')
if (@version < 1010)
begin
/* 20010, "Creating a route from a pre-10.1 PRS is not supported" */
exec rs_get_msg 20010, @msg output
print @msg
return -1
end
if (@subscription_name like "rs_objects%")
begin
/*
** Change history for rs_objects:
** 11.0 added 'deliver_as_name' column
** Ulysses added 'phys_objowner', 'repl_objowner' and
** 'has_baserepdef columns' columns,
** changed 'attributes' to type int
** Nellie added column 'minvers'
*/
if (@version < 1100)
begin
select prsid,objname,objid,dbid,objtype,
attributes=convert(tinyint,attributes & 255),
ownertype,crdate,parentid,ownerid,rowtype,
phys_tablename
from rs_objects
where rowtype=1 and prsid=@mySiteID
and (ownertype != 'U'
or objtype != 'R'
or minvers < 1150)
end
/* 1150 == Ulysses threshold */
else if (@version < 1150)
begin
select prsid,objname,objid,dbid,objtype,
attributes=convert(tinyint,attributes & 255),
ownertype,crdate,parentid,ownerid,rowtype,
phys_tablename,
deliver_as_name
from rs_objects
where rowtype=1 and prsid=@mySiteID
and (ownertype != 'U'
or objtype != 'R'
or minvers < 1150)
end
else if (@version < 1200) /* Ulysses */
begin
select prsid,objname,objid,dbid,objtype,
attributes,
ownertype,crdate,parentid,ownerid,rowtype,
phys_tablename,
deliver_as_name,
phys_objowner,repl_objowner,has_baserepdef
from rs_objects
where rowtype=1 and prsid=@mySiteID
and (ownertype != 'U'
or objtype != 'R'
or minvers < 1200)
end
else
/* Nellie and later (incl. maint releases) */
begin
select prsid,objname,objid,dbid,objtype,
attributes,
ownertype,crdate,parentid,ownerid,rowtype,
phys_tablename,
deliver_as_name,
phys_objowner,repl_objowner,has_baserepdef,
minvers
from rs_objects
where rowtype=1 and prsid=@mySiteID
end
end
else if (@subscription_name like "rs_columns%")
begin
/*
** Change history for rs_columns:
** Since this table is linked to rs_objects, we need a join
** with a "where" clause to match the rules coded above.
**
** Ulysses added 'basecolnum' and 'repl_colname'
*/
/* 1150 == Ulysses threshold */
if (@version < 1150)
begin
select c.prsid,c.objid,colname,colnum,coltype,length,searchable,
primary_col,fragmentation,c.rowtype,status
from rs_columns c, rs_objects o
where c.rowtype=1 and c.prsid=@mySiteID and
c.objid=o.objid
and (o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1150)
end
else if (@version < 1200) /* Ulysses */
begin
select c.prsid,c.objid,colname,colnum,coltype,length,searchable,
primary_col,fragmentation,c.rowtype,status,
basecolnum, repl_colname
from rs_columns c, rs_objects o
where c.rowtype=1 and c.prsid=@mySiteID and
c.objid=o.objid
and (o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1200)
end
else
/* Nellie and later (incl. maint releases) */
begin
select prsid,objid,colname,colnum,coltype,length,searchable,
primary_col, fragmentation,rowtype,status,
basecolnum,repl_colname,declared_dtid,publ_dtid,publ_base_coltype,publ_length
from rs_columns
where rowtype=1 and prsid=@mySiteID
end
end
else if (@subscription_name like "rs_classes%")
begin
/*
** Change history for rs_classes
** Ulysses added 'attributes' and 'parent_classid' columns
*/
if (@version < 1150)
begin
select classname,classid,classtype,prsid
from rs_classes
where parent_classid=0 and prsid=@mySiteID
end
else
/* Ulysses and later (incl. maint releases) */
begin
select classname,classid,classtype,prsid,
attributes,parent_classid
from rs_classes
where prsid=@mySiteID
end
end
else if (@subscription_name like "rs_functions%")
begin
/*
** Change history for rs_functions:
** Ulysses filter out user functions of projections not marked
** for use by pre-Ulysses sites.
*/
if (@version < 1150)
begin
select prsid,funcname,funcid,objid,conflicting,userdefined,
rowtype
from rs_functions
where rowtype=1 and prsid=@mySiteID and
objid not in (select objid from rs_objects
where ownertype = 'U'
and objtype = 'R'
and minvers >= 1150)
end
else if (@version < 1200)
begin
select prsid,funcname,funcid,objid,conflicting,userdefined,
rowtype
from rs_functions
where rowtype=1 and prsid=@mySiteID and
objid not in (select objid from rs_objects
where ownertype = 'U'
and objtype = 'R'
and minvers >= 1200)
end
else
begin
select prsid,funcname,funcid,objid,conflicting,userdefined,
rowtype
from rs_functions
where rowtype=1 and prsid=@mySiteID
end
end
else if (@subscription_name like "rs_funcstrings%")
begin
/*
** Change history for rs_funcstrings:
** No changes (since 10.1). However, this table is linked with
** rs_classes and rs_functions, above.
*/
if (@version < 1150)
begin
select f.prsid,f.classid,funcid,name,fstringid,f.attributes,
parameters,param_hash,expiredate,rowtype
from rs_funcstrings f, rs_classes c
where rowtype=1 and f.prsid=@mySiteID and
f.classid=c.classid and parent_classid=0
and f.funcid in
(select funcid from rs_functions
where objid = 0)
union
select fs.prsid,classid,fs.funcid,name,fstringid,fs.attributes,
parameters,param_hash,expiredate,fs.rowtype
from rs_funcstrings fs, rs_functions f, rs_objects o
where fs.rowtype=1 and fs.prsid=@mySiteID and
fs.funcid=f.funcid and f.objid=o.objid
and (o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1150)
end
else if (@version < 1200)
/* Ulysses */
begin
select f.prsid,f.classid,funcid,name,fstringid,f.attributes,
parameters,param_hash,expiredate,rowtype
from rs_funcstrings f, rs_classes c
where rowtype=1 and f.prsid=@mySiteID and
f.classid=c.classid and parent_classid=0
and f.funcid in
(select funcid from rs_functions
where objid = 0)
union
select fs.prsid,classid,fs.funcid,name,fstringid,fs.attributes,
parameters,param_hash,expiredate,fs.rowtype
from rs_funcstrings fs, rs_functions f, rs_objects o
where fs.rowtype=1 and fs.prsid=@mySiteID and
fs.funcid=f.funcid and f.objid=o.objid
and (o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1200)
end
else
/* Nellie and later (incl. maint releases) */
begin
select prsid,classid,funcid,name,fstringid,attributes,
parameters,param_hash,expiredate,rowtype
from rs_funcstrings
where rowtype=1 and prsid=@mySiteID
end
end
else if (@subscription_name like "rs_routes%")
begin
/*
** Change history for rs_routes:
** No changes (since 10.1)
*/
select dest_rsid,through_rsid,source_rsid,status,suspended,src_version
from rs_routes
where source_rsid=@mySiteID
end
else if (@subscription_name like "rs_databases%")
begin
/*
** Change history for rs_databases:
** 11.0 added 'ltype', 'ptype', 'ldbid', 'enable_seq' columns
*/
if (@version < 1100)
begin
select dsname,dbname,dbid,dist_status,src_status,attributes,
errorclassid,funcclassid,prsid,rowtype,sorto_status
from rs_databases
where rowtype=1 and prsid=@mySiteID
end
else
begin
select dsname,dbname,dbid,dist_status,src_status,attributes,
errorclassid,funcclassid,prsid,rowtype,sorto_status,ltype,
ptype,ldbid,enable_seq
from rs_databases
where rowtype=1 and prsid=@mySiteID
end
end
else if (@subscription_name like "rs_systext7%")
begin
/*
** Change history for rs_systext:
** No changes (since 10.1). However, this table is linked with
** rs_funcstrings, above.
*/
if (@version < 1150)
begin
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings f, rs_classes c
where texttype='O' and s.prsid=@mySiteID and
s.parentid=fstringid and
f.classid=c.classid and parent_classid=0
and f.funcid in
(select funcid from rs_functions
where objid = 0)
union
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings fs,
rs_functions f, rs_objects o
where texttype='O' and s.prsid=@mySiteID and
s.parentid=fstringid and
fs.funcid=f.funcid and f.objid=o.objid
and (o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1150)
end
else if (@version < 1200)
begin
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings f, rs_classes c
where texttype='O' and s.prsid=@mySiteID and
s.parentid=fstringid and
f.classid=c.classid and parent_classid=0
and f.funcid in
(select funcid from rs_functions
where objid = 0)
union
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings fs,
rs_functions f, rs_objects o
where texttype='O' and s.prsid=@mySiteID and
s.parentid=fstringid and
fs.funcid=f.funcid and f.objid=o.objid
and (o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1200)
end
else
/* Ulysses and later (incl. maint releases) */
begin
select prsid,parentid,texttype,sequence,textval
from rs_systext
where texttype='O' and prsid=@mySiteID
end
end
else if (@subscription_name like "rs_systext8%")
begin
/*
** Change history for rs_systext:
** No changes (since 10.1). However, this table is linked with
** rs_funcstrings, above.
*/
if (@version < 1150)
begin
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings f, rs_classes c
where texttype='S' and s.prsid=@mySiteID and
s.parentid=fstringid and
f.classid=c.classid and parent_classid=0
union
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings fs,
rs_functions f, rs_objects o
where texttype='O' and s.prsid=@mySiteID and
s.parentid=fstringid and
fs.funcid=f.funcid and f.objid=o.objid and
(o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1150)
end
else if (@version < 1200)
/* Ulysses */
begin
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings f, rs_classes c
where texttype='S' and s.prsid=@mySiteID and
s.parentid=fstringid and
f.classid=c.classid and parent_classid=0
union
select s.prsid,s.parentid,texttype,sequence,textval
from rs_systext s, rs_funcstrings fs,
rs_functions f, rs_objects o
where texttype='O' and s.prsid=@mySiteID and
s.parentid=fstringid and
fs.funcid=f.funcid and f.objid=o.objid and
(o.ownertype != 'U'
or o.objtype != 'R'
or o.minvers < 1200)
end
else
/* Nellie and later (incl. maint releases) */
begin
select prsid,parentid,texttype,sequence,textval
from rs_systext
where texttype='S' and prsid=@mySiteID
end
end
else if (@subscription_name like "rs_erroractions%")
begin
/*
** Change history for rs_erroractions:
** No changes (since 10.1)
*/
select ds_errorid,errorclassid,action,prsid
from rs_erroractions
where prsid=@mySiteID
end
else if (@subscription_name like "rs_dbreps%")
begin
/*
** Change history for rs_dbreps:
** No changes in column list (since 12.6)
*/
select dbrepid, dbrepname, prsid, dbid, ownerid, requestdate,
status, minvers
from rs_dbreps
where prsid=@mySiteID
end
else if (@subscription_name like "rs_dbsubsets%")
begin
/*
** Change history for rs_dbsubsets:
** No changes in column list (since 12.6)
*/
select dbrepid, type, owner, name, prsid
from rs_dbsubsets
where prsid=@mySiteID
end
else
return 1
go
grant execute on rs_materialize to rs_systabgroup
go |
|
|
|