|
|
729274 |
|
Sybase Replication Server |
|
repserver |
|
|
|
|
|
|
|
New Feature Request populate the rssd's rs_translation table for custom/derived function string classes
workaround ... the workaround to the issue of using a derived class(db2_derived_class) with parent class of rs_db2_function_class instead of the default provided class of rs_db2_function_class is to query the rs_translation table this way ...
select classid from rs_classes where classname = 'db2_derived_class'
select classid from rs_classes where classname = 'rs_db2_function_class'
select * from rs_translation where classid = ( select classid from rs_classes where classname = 'rs_db2_function_class')
...... then create an insert for each row returned from the 3rd select above using all the same data except changing the classid column value to the value that comes back from the 1st select above ... shutdown and restart repserver ... |
|
Workaround Description |
|
1) select classid from rs_classes where classname = '<custom_function_string_class_name>'
2) select classid from rs_classes where classname = 'rs_db2_function_class'
4) Create an insert for each needed found in the $SYBASE/$SYBASE_REP/scripts/rs_ase_to_db2.sql script
grep rs_translation $SYBASE/$SYBASE_REP/scripts/rs_ase_to_db2.sql | grep insert | grep 0x0000000001000004
5) select * from rs_translation where classid = ( select classid from rs_classes where classname = 'rs_db2_function_class')
6) Create an insert for each row returned from the 3rd[step 3) above] select above using all the same data except changing the classid column value to the value that comes back from the 1st[step 1) above] select above
7) Shutdown and restart Replication Server.
the workaround to the issue of using a derived class(db2_derived_class) with parent class of rs_db2_function_class instead of the default provided class of rs_db2_function_class is to query the rs_translation table this way ...
select classid from rs_classes where classname = 'db2_derived_class'
select classid from rs_classes where classname = 'rs_db2_function_class'
select * from rs_translation where classid = ( select classid from rs_classes where classname = 'rs_db2_function_class')
...... then create an insert for each row returned from the 3rd select above using all the same data except changing the classid column value to the value that comes back from the 1st select above ... shutdown and restart repserver ...
*************************************************************************************
isql -Srsid28 -Usa -Psybase7 -w2048
drop function string class cfscl_db2_db4f_mweaver
go
create function string class cfscl_db2_db4f_mweaver set parent to rs_db2_function_class
go
quit
*************************************************************************************
*****************************************************************************
c:\>isql -Srsid28 -Usa -Psybase7 -w2048
1> drop function string class cfscl_db2_db4f_mweaver
2> go
Function string class 'cfscl_db2_db4f_mweaver' is dropped.
1> create function string class cfscl_db2_db4f_mweaver set parent to rs_db2_function_class
2> go
Function string class 'cfscl_db2_db4f_mweaver' is created.
1> quit
c:\>
*****************************************************************************
*************************************************************************************
isql -Srsid28 -Usa -Psybase7 -w2048
connect to rssd
go
select classid from rs_classes where classname = 'rs_db2_function_class'
go
select * from rs_translation where classid = ( select classid from rs_classes where classname = 'rs_db2_function_class')
go
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000c, 0x0000000000010100, 26, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000d, 0x0000000000010100, 26, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000001, 0x0000000000010103, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000013, 0x0000000000010106, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000b, 0x0000000000000006, 1, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000f, 0x0000000000000010, 34, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000e, 0x0000000000000010, 34, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000011, 0x0000000000010104, 34, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000010, 0x0000000000010105, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000001b, 0x0000000000010101, 10, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000001c, 0x0000000000010102, 8, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000005, 0x0000000000010106, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000001d, 0x0000000000010107, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000023, 0x0000000000010100, 26, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000024, 0x0000000000010100, 26, 0, 0)
go
select * from rs_translation where classid = ( select classid from rs_classes where classname = 'rs_db2_function_class')
go
quit
*************************************************************************************
*****************************************************************************
c:\>isql -Srsid28 -Usa -Psybase7 -w2048
1> connect to rssd
2> go
Gateway connection to 'rsid28_erssd.rsid28_erssd' is created.
1> select classid from rs_classes where classname = 'rs_db2_function_class'
2> go
classid
------------------
0x0000000001000004
(1 row affected)
1> select * from rs_translation where classid = ( select classid from rs_classes where classname = 'rs_db2_function_class')
2> go
prsid classid type source_dtid target_dtid target_length target_status rowtype
----------- ------------------ ---- ------------------ ------------------ ------------- ------------- -------
(0 rows affected)
1> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000c, 0x0000000000010100, 26, 0, 0)
2> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000d, 0x0000000000010100, 26, 0, 0)
3> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000001, 0x0000000000010103, 0, 0, 0)
4> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000013, 0x0000000000010106, 0, 0, 0)
5> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000b, 0x0000000000000006, 1, 0, 0)
6> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000f, 0x0000000000000010, 34, 0, 0)
7> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000000e, 0x0000000000000010, 34, 0, 0)
8> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000011, 0x0000000000010104, 34, 0, 0)
9> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000010, 0x0000000000010105, 0, 0, 0)
10> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000001b, 0x0000000000010101, 10, 0, 0)
11> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000001c, 0x0000000000010102, 8, 0, 0)
12> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000005, 0x0000000000010106, 0, 0, 0)
13> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x000000000000001d, 0x0000000000010107, 0, 0, 0)
14> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000023, 0x0000000000010100, 26, 0, 0)
15> insert into rs_translation values (0, (select classid from rs_classes where classname = 'rs_db2_function_class'), 'D', 0x0000000000000024, 0x0000000000010100, 26, 0, 0)
16> go
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
1> select * from rs_translation where classid = ( select classid from rs_classes where classname = 'rs_db2_function_class')
2> go
prsid classid type source_dtid target_dtid target_length target_status rowtype
----------- ------------------ ---- ------------------ ------------------ ------------- ------------- -------
0 0x0000000001000004 D 0x0000000000000001 0x0000000000010103 0 0 0
0 0x0000000001000004 D 0x0000000000000005 0x0000000000010106 0 0 0
0 0x0000000001000004 D 0x000000000000000b 0x0000000000000006 1 0 0
0 0x0000000001000004 D 0x000000000000000c 0x0000000000010100 26 0 0
0 0x0000000001000004 D 0x000000000000000d 0x0000000000010100 26 0 0
0 0x0000000001000004 D 0x000000000000000e 0x0000000000000010 34 0 0
0 0x0000000001000004 D 0x000000000000000f 0x0000000000000010 34 0 0
0 0x0000000001000004 D 0x0000000000000010 0x0000000000010105 0 0 0
0 0x0000000001000004 D 0x0000000000000011 0x0000000000010104 34 0 0
0 0x0000000001000004 D 0x0000000000000013 0x0000000000010106 0 0 0
0 0x0000000001000004 D 0x000000000000001b 0x0000000000010101 10 0 0
0 0x0000000001000004 D 0x000000000000001c 0x0000000000010102 8 0 0
0 0x0000000001000004 D 0x000000000000001d 0x0000000000010107 0 0 0
0 0x0000000001000004 D 0x0000000000000023 0x0000000000010100 26 0 0
0 0x0000000001000004 D 0x0000000000000024 0x0000000000010100 26 0 0
(15 rows affected)
1> quit
c:\>
*****************************************************************************
*************************************************************************************
isql -Srsid28 -Usa -Psybase7 -w2048
connect to rssd
go
select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'
go
select * from rs_translation where classid = ( select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver')
go
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000c, 0x0000000000010100, 26, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000d, 0x0000000000010100, 26, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000001, 0x0000000000010103, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000013, 0x0000000000010106, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000b, 0x0000000000000006, 1, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000f, 0x0000000000000010, 34, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000e, 0x0000000000000010, 34, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000011, 0x0000000000010104, 34, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000010, 0x0000000000010105, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000001b, 0x0000000000010101, 10, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000001c, 0x0000000000010102, 8, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000005, 0x0000000000010106, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000001d, 0x0000000000010107, 0, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000023, 0x0000000000010100, 26, 0, 0)
insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000024, 0x0000000000010100, 26, 0, 0)
go
select * from rs_translation where classid = ( select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver')
go
select * from rs_translation where classid in (select classid from rs_classes where classname in ( 'rs_db2_function_class', 'cfscl_db2_db4f_mweaver')) order by classid
go
quit
*************************************************************************************
*****************************************************************************
c:\>isql -Srsid28 -Usa -Psybase7 -w2048
1> connect to rssd
2> go
Gateway connection to 'rsid28_erssd.rsid28_erssd' is created.
1> select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'
2> go
classid
------------------
0x0100006501000066
(1 row affected)
1> select * from rs_translation where classid = ( select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver')
2> go
prsid classid type source_dtid target_dtid target_length target_status rowtype
----------- ------------------ ---- ------------------ ------------------ ------------- ------------- -------
(0 rows affected)
1> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000c, 0x0000000000010100, 26, 0, 0)
2> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000d, 0x0000000000010100, 26, 0, 0)
3> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000001, 0x0000000000010103, 0, 0, 0)
4> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000013, 0x0000000000010106, 0, 0, 0)
5> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000b, 0x0000000000000006, 1, 0, 0)
6> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000f, 0x0000000000000010, 34, 0, 0)
7> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000000e, 0x0000000000000010, 34, 0, 0)
8> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000011, 0x0000000000010104, 34, 0, 0)
9> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000010, 0x0000000000010105, 0, 0, 0)
10> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000001b, 0x0000000000010101, 10, 0, 0)
11> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000001c, 0x0000000000010102, 8, 0, 0)
12> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000005, 0x0000000000010106, 0, 0, 0)
13> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x000000000000001d, 0x0000000000010107, 0, 0, 0)
14> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000023, 0x0000000000010100, 26, 0, 0)
15> insert into rs_translation values (0, (select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver'), 'D', 0x0000000000000024, 0x0000000000010100, 26, 0, 0)
16> go
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
1> select * from rs_translation where classid = ( select classid from rs_classes where classname = 'cfscl_db2_db4f_mweaver')
2> go
prsid classid type source_dtid target_dtid target_length target_status rowtype
----------- ------------------ ---- ------------------ ------------------ ------------- ------------- -------
0 0x0100006501000066 D 0x000000000000000c 0x0000000000010100 26 0 0
0 0x0100006501000066 D 0x000000000000000d 0x0000000000010100 26 0 0
0 0x0100006501000066 D 0x0000000000000001 0x0000000000010103 0 0 0
0 0x0100006501000066 D 0x0000000000000013 0x0000000000010106 0 0 0
0 0x0100006501000066 D 0x000000000000000b 0x0000000000000006 1 0 0
0 0x0100006501000066 D 0x000000000000000f 0x0000000000000010 34 0 0
0 0x0100006501000066 D 0x000000000000000e 0x0000000000000010 34 0 0
0 0x0100006501000066 D 0x0000000000000011 0x0000000000010104 34 0 0
0 0x0100006501000066 D 0x0000000000000010 0x0000000000010105 0 0 0
0 0x0100006501000066 D 0x000000000000001b 0x0000000000010101 10 0 0
0 0x0100006501000066 D 0x000000000000001c 0x0000000000010102 8 0 0
0 0x0100006501000066 D 0x0000000000000005 0x0000000000010106 0 0 0
0 0x0100006501000066 D 0x000000000000001d 0x0000000000010107 0 0 0
0 0x0100006501000066 D 0x0000000000000023 0x0000000000010100 26 0 0
0 0x0100006501000066 D 0x0000000000000024 0x0000000000010100 26 0 0
(15 rows affected)
1> select * from rs_translation where classid in (select classid from rs_classes where classname in ( 'rs_db2_function_class', 'cfscl_db2_db4f_mweaver')) order by classid
2> go
prsid classid type source_dtid target_dtid target_length target_status rowtype
----------- ------------------ ---- ------------------ ------------------ ------------- ------------- -------
0 0x0000000001000004 D 0x0000000000000001 0x0000000000010103 0 0 0
0 0x0000000001000004 D 0x0000000000000005 0x0000000000010106 0 0 0
0 0x0000000001000004 D 0x000000000000000b 0x0000000000000006 1 0 0
0 0x0000000001000004 D 0x000000000000000c 0x0000000000010100 26 0 0
0 0x0000000001000004 D 0x000000000000000d 0x0000000000010100 26 0 0
0 0x0000000001000004 D 0x000000000000000e 0x0000000000000010 34 0 0
0 0x0000000001000004 D 0x000000000000000f 0x0000000000000010 34 0 0
0 0x0000000001000004 D 0x0000000000000010 0x0000000000010105 0 0 0
0 0x0000000001000004 D 0x0000000000000011 0x0000000000010104 34 0 0
0 0x0000000001000004 D 0x0000000000000013 0x0000000000010106 0 0 0
0 0x0000000001000004 D 0x000000000000001b 0x0000000000010101 10 0 0
0 0x0000000001000004 D 0x000000000000001c 0x0000000000010102 8 0 0
0 0x0000000001000004 D 0x000000000000001d 0x0000000000010107 0 0 0
0 0x0000000001000004 D 0x0000000000000023 0x0000000000010100 26 0 0
0 0x0000000001000004 D 0x0000000000000024 0x0000000000010100 26 0 0
0 0x0100006501000066 D 0x0000000000000001 0x0000000000010103 0 0 0
0 0x0100006501000066 D 0x0000000000000005 0x0000000000010106 0 0 0
0 0x0100006501000066 D 0x000000000000000b 0x0000000000000006 1 0 0
0 0x0100006501000066 D 0x000000000000000c 0x0000000000010100 26 0 0
0 0x0100006501000066 D 0x000000000000000d 0x0000000000010100 26 0 0
0 0x0100006501000066 D 0x000000000000000e 0x0000000000000010 34 0 0
0 0x0100006501000066 D 0x000000000000000f 0x0000000000000010 34 0 0
0 0x0100006501000066 D 0x0000000000000010 0x0000000000010105 0 0 0
0 0x0100006501000066 D 0x0000000000000011 0x0000000000010104 34 0 0
0 0x0100006501000066 D 0x0000000000000013 0x0000000000010106 0 0 0
0 0x0100006501000066 D 0x000000000000001b 0x0000000000010101 10 0 0
0 0x0100006501000066 D 0x000000000000001c 0x0000000000010102 8 0 0
0 0x0100006501000066 D 0x000000000000001d 0x0000000000010107 0 0 0
0 0x0100006501000066 D 0x0000000000000023 0x0000000000010100 26 0 0
0 0x0100006501000066 D 0x0000000000000024 0x0000000000010100 26 0 0
(30 rows affected)
1>
***************************************************************************** |
|
|
|