20
Sep

I was asked recently to setup Heterogeneous SAP replication from SAP ASE to SQL Server and then the task was extended to also replicate to an Azure Database.

This can be complicated to setup and get working so I documented the procedure and updated our PDF downloadable instructions available from, http://www.dbxperts.co.uk/downloads/

A common issue with the setup is encountered when we go to create the connection from replication server to the replicate database.  Connections DOWN when running ‘admin who’ in repserver. If these are down when you run CREATE CONNECTION, then it could be an issue with the script that is silently run when you create a connection using a ‘profile’.  There is a way you can step through each command the above ‘profile’ script executes.  Re-run the CREATE CONNECTION command but add the ‘display_only’ option on the last line. It returns the list of commands it will execute at the replicate, including creating the rs_info and rs_lastcommit tables.  You can take the SQL it spits out and run it manually from a ISQL session into the SQL Server database, then resume the connection.

create connection to EDCA_AZ_TESTDB.AZURE_DB
using profile rs_ase_to_msss;standard
set username username@servername
set password "<password>”
display_only
go

The script output commands look something like, although you will have to tidy the output up a little.

create table rs_info (rskey varchar (20), rsval varchar (20))
go
insert into rs_info values ('charset_name', 'iso_1')
insert into rs_info values ('sortorder_name', 'bin_iso_1')
go
drop table rs_lastcommit
go
create table rs_lastcommit (origin int, origin_qid binary(36), secondary_qid binary(36), origin_time datetime, dest_commit_time datetime)
go
create unique clustered index rs_lastcommit_idx on rs_lastcommit(origin)
go
<snip>

See our full documentation on our download page for instructions on how to set up Heterogeneous replication.

Leave a Reply

Your email address will not be published. Required fields are marked *