<!-- Generated from the rendered page by scripts/write-llm-mirrors.mjs. Do not edit by hand. -->
Canonical: https://molo17.com/solutions/replicate-to-sap-sql-anywhere/
Markdown mirror: https://molo17.com/solutions/replicate-to-sap-sql-anywhere/index.md
Title: Replicate to SAP SQL Anywhere in real time | MOLO17
Description: Real-time replication to SAP SQL Anywhere 17 from Oracle, SQL Server, PostgreSQL, and MySQL, with MERGE upserts and OPENSTRING bulk loads. Start a trial.

[Solutions](/solutions/)  Replicate to SAP SQL Anywhere

 SOLUTION · REPLICATE TO SAP SQL ANYWHERE

# Real-time data replication to SAP SQL Anywhere from your operational databases

**Changes from your systems of record land in SQL Anywhere continuously, as keyed upserts and deletes, with a bulk path that loads a whole batch in one statement.**

Gluesync by MOLO17 captures changes from Oracle, SQL Server, PostgreSQL, MySQL, IBM i, SAP ASE, and other [heterogeneous sources](/integrations/?target=SAP+%28Sybase%29+SQL+Anywhere#integration-finder) with a dedicated agent per database, then writes them into SAP SQL Anywhere 17 through the SAP JDBC driver. Updates are `MERGE` statements by key, deletes match the key, and an optional bulk path loads each batch with `OPENSTRING` in the transaction of the write. The same agent also reads from SQL Anywhere as a [CDC source](/solutions/sap-sql-anywhere-cdc/). Core Hub, the Gluesync control plane, runs every pipeline from one web UI and REST API.

[Start a Gluesync trial](/get-gluesync/) [Talk to us](/contacts/)

WHO THIS IS FOR

## Teams that need SQL Anywhere to hold current data, not last night's extract

-   ISVs and product teams whose applications run on SQL Anywhere and need reference, customer, or order data from a central system of record kept current in each database
-   DBAs who want writes that respect keys and triggers, with duplicate keys handled by a per-entity setting instead of a load job that stops at the first error
-   Platform leads who want one Core Hub for Oracle, SQL Server, PostgreSQL, MySQL, IBM i, and SAP ASE instead of one loader per source, backed by [best-in-class enterprise support, rated 4.9/5 by customers](/support/#customer-ratings)
-   Engineers replacing MobiLink scripts, nightly `LOAD TABLE` jobs, or custom ODBC loaders that fill SQL Anywhere, who want snapshots and monitoring built in

THE PROBLEM

## SQL Anywhere data loaded on a schedule is already behind

SQL Anywhere databases often sit next to the applications that use them, far from the systems of record that own the data. Scheduled extracts and file loads leave those applications working from yesterday's copy, every source needs its own loader, and a failed run means a manual reload. Teams looking for real-time replication into SQL Anywhere usually weigh MobiLink scripts, an ETL tool on a timer, or code their own team keeps running.

Gluesync addresses that with **per-agent CDC into SQL Anywhere**. A source agent reads each database's native change log, journal, or change stream; Core Hub routes the changes; the SQL Anywhere agent applies them to your tables as they arrive. Whether the data comes from Oracle, IBM i, or another SQL Anywhere database, the pipeline model, the snapshot, and the operations stay the same.

HOW IT WORKS

## How Gluesync writes to SAP SQL Anywhere

### Keyed writes through the SAP JDBC driver

The agent connects through the SAP JDBC driver (`sajdbc4`) with a connection pool, and writes changes in batches, in the order of the stream.

-   **Inserts** are `INSERT` statements.
-   **Updates and upserts** are `MERGE` statements that update the row with the same key and insert it when it is not there.
-   **Deletes** match the key of the row, including keys with `NULL` values.
-   **Duplicate keys by policy:** a row refused for a duplicate key is handled by the entity's insert conflict strategy in Core Hub.
-   **Retries built in:** statements that fail because a connection dropped or a row was locked are retried. [SQL Anywhere target setup guide ↗](https://docs.molo17.com/gluesync/latest/agents/sqlanywhere-target.html)

### A bulk path with OPENSTRING, no staging table

For the highest throughput, turn on bulk operations per entity, for the snapshot, for CDC, or both. The rows of a batch travel to the server as one text parameter and a single statement reads them with `OPENSTRING`.

-   **New rows:** a snapshot batch, or a batch of new rows, is one `INSERT … SELECT` from `OPENSTRING`.
-   **Changes:** other batches are one `MERGE` from `OPENSTRING`, and deleted keys are removed with `MERGE … WHEN MATCHED THEN DELETE`. Updates stay updates, so triggers on the target table behave as they do with plain batches.
-   **One transaction:** the statements run in the transaction of the write and commit together, with no staging table.
-   **Never a lost row:** a batch the bulk path cannot carry is rolled back and written again with the plain batch statements.

### Tables and types that look like SQL Anywhere's own

When a target table does not exist, Gluesync creates it from the source definition. A table you create yourself is written as it is, with the types it has.

-   **Text:** `NVARCHAR(n)` by default, which counts characters on a UTF-8 database, and `LONG NVARCHAR` for long values; `CHAR`, `VARCHAR`, `XML`, and `UNIQUEIDENTIFIER` are available per column.
-   **Numbers:** `NUMERIC(p, s)` with the source precision and scale, the integer types, `MONEY`, `REAL`, `FLOAT`, and `DOUBLE`.
-   **Dates and times:** `DATE`, `TIME`, `TIMESTAMP`, and `TIMESTAMP WITH TIME ZONE`, with microseconds kept.
-   **Binary and spatial:** `LONG BINARY` by default, and `ST_GEOMETRY` written from EWKB with its SRID.
-   **Pre- and post-commands:** SQL commands per entity run before and after the snapshot and CDC tasks, as on the other SQL targets.

### What your DBA sets up

The agent needs a user that can write the target tables, and the SQL Anywhere client on the Core Hub host. Full statements are in the [SQL Anywhere target setup guide ↗](https://docs.molo17.com/gluesync/latest/agents/sqlanywhere-target.html).

1.  Create a database user for Gluesync that owns the target schema, or grant it the `ANY TABLE` system privileges to create, alter, and truncate tables and to read and write them.
2.  Install the SAP SQL Anywhere 17 client on the Core Hub host, or mount it into the Core Hub container at `/opt/sqlanywhere17`. Core Hub runs on Linux x86\_64, or as `linux/amd64`, for this agent.
3.  Open the database port to Core Hub, `2638` by default, and enter the host, database name, and credentials in Core Hub. Turn on TLS for the connection when the network calls for it.
4.  Choose per entity whether the snapshot and CDC use the bulk path.

### Architecture around Core Hub

Source agents sit close to each database, and Core Hub orchestrates them through its web UI and REST APIs. A pipeline groups a source agent with the SQL Anywhere agent and the tables it replicates, and pipeline state lives in Core Hub. Query Studio works on SQL Anywhere too, so you can query the target from the same web UI. Core Hub and agents deploy with Docker, Docker Compose, or Kubernetes. See [CDC streaming](/solutions/cdc-streaming/) for the wider pattern.

[Explore the general CDC streaming architecture →](/solutions/cdc-streaming/)

WRITE OPTIONS

## The SAP SQL Anywhere target agent

SAP SQL Anywhere has one Gluesync agent, for source and target. Every Gluesync source agent can feed it, and each entity follows the same snapshot-then-CDC path, with plain batches or the bulk path.

| Agent | Write technique | Versions | Best for |
| --- | --- | --- | --- |
| [SAP SQL Anywhere agent ↗](https://docs.molo17.com/gluesync/latest/agents/sqlanywhere-intro.html) | SAP JDBC driver (`sajdbc4`) with a connection pool; `INSERT`, `MERGE` by key, and key-matched deletes, or a bulk path that loads each batch with `OPENSTRING` in the transaction of the write | SAP SQL Anywhere 17; tested on 17.0.11 with the SQL Anywhere 17 client | SQL Anywhere 17 databases fed from Oracle, SQL Server, PostgreSQL, MySQL, IBM i, SAP ASE, or another SQL Anywhere database, where tables should stay current by key. Pick it whenever SQL Anywhere is the destination. |

SOURCES AND TOPOLOGIES

## Feed SQL Anywhere from the systems of record you already run

Any Gluesync source agent can feed SQL Anywhere. Open the [integrations finder with SQL Anywhere pre-selected](/integrations/?target=SAP+%28Sybase%29+SQL+Anywhere#integration-finder) to see every source you can pair with it.

One Core Hub runs Oracle to SQL Anywhere, SQL Server to SQL Anywhere, and PostgreSQL to SQL Anywhere side by side, with the same snapshot, monitoring, and duplicate-key settings for each. Gluesync keeps pace with your change volume at any scale, and [MOLO17 Professional Services](/solutions/professional-services/) can help plan the tables and the write path with your team.

-   Oracle to SQL Anywhere from the redo logs: see [Oracle CDC](/solutions/oracle-cdc/)
-   SQL Server to SQL Anywhere through Change Data Capture or Change Tracking: see [SQL Server CDC](/solutions/sql-server-cdc/)
-   PostgreSQL and MySQL to SQL Anywhere from the WAL and the binlog: see [PostgreSQL CDC](/solutions/postgresql-cdc/) and [MySQL CDC](/solutions/mysql-cdc/)
-   SAP ASE (Sybase) to SQL Anywhere from the ASE transaction log: see [SAP ASE CDC](/solutions/sap-ase-cdc/)
-   SQL Anywhere to SQL Anywhere, one way or both ways, from the transaction log: see [SAP SQL Anywhere CDC](/solutions/sap-sql-anywhere-cdc/)

FAIR, HIGH-LEVEL COMPARISON

## Where Gluesync fits among SQL Anywhere ingestion approaches

| Approach | What buyers usually get | Where Gluesync fits |
| --- | --- | --- |
| MobiLink and SQL Remote | SAP's own synchronization between a consolidated database and SQL Anywhere remotes, with synchronization scripts you write and maintain | Log-based capture from Oracle, SQL Server, PostgreSQL, MySQL, IBM i, and SAP ASE, applied to SQL Anywhere by key with no scripts to maintain; see [database offload](/solutions/database-offload/) |
| Scheduled LOAD TABLE and file imports | Fast bulk loads of files on a timer; extracting each source, tracking deletes, and merging into current tables is work you build | Continuous delivery with an `OPENSTRING` bulk path that merges each batch in one statement; read [batch ETL vs real-time data replication](/blog/batch-etl-vs-real-time-data-replication/) |
| ETL tools and replication services | Broad connector catalogs; SQL Anywhere as a target is rare, and write modes vary by product | A dedicated SQL Anywhere agent with keyed writes, duplicate-key policies, and MOLO17 enterprise support; see [migrating to Gluesync](/migrate-to-gluesync/) |
| DIY scripts | Full control; your team owns extract queries, change detection, merge logic, retries, and failures | Log-based capture, snapshot seeding, and Core Hub monitoring without pipeline code to maintain; see [CDC streaming](/solutions/cdc-streaming/) |

RELATED CONTENT

## SQL Anywhere replication research and implementation detail

-   [SAP SQL Anywhere CDC from the transaction log](/solutions/sap-sql-anywhere-cdc/)
-   [Replicate to SAP ASE (Sybase)](/solutions/replicate-to-sap-ase/)
-   [Batch ETL vs real-time data replication: how to choose](/blog/batch-etl-vs-real-time-data-replication/)
-   [Log-based CDC explained](/blog/real-time-replication-log-based-cdc/)
-   [SAP SQL Anywhere agent overview ↗](https://docs.molo17.com/gluesync/latest/agents/sqlanywhere-intro.html)
-   [SQL Anywhere target setup guide ↗](https://docs.molo17.com/gluesync/latest/agents/sqlanywhere-target.html)
-   [Write strategies: batch mode and bulk mode ↗](https://docs.molo17.com/gluesync/latest/core-hub/write-strategies.html)
-   [Insert conflict strategy ↗](https://docs.molo17.com/gluesync/latest/core-hub/insert-conflict-strategy.html)

FAQ

## SAP SQL Anywhere replication questions

What does replicating to SQL Anywhere with Gluesync involve?

A source agent captures committed changes from your database through its native change mechanism, Core Hub routes them, and the SQL Anywhere agent applies them to SQL Anywhere tables continuously after a snapshot seeds each table.

How does Gluesync write data into SQL Anywhere?

Through the SAP JDBC driver with a connection pool. Inserts are INSERT statements, updates and upserts are MERGE statements by key, and deletes match the key. An optional bulk path loads each batch with OPENSTRING in the transaction of the write.

Which SQL Anywhere versions are supported?

SAP SQL Anywhere 17. MOLO17 tests the agent against SQL Anywhere 17.0.11 with the SQL Anywhere 17 client.

What do we install for the agent?

The SAP SQL Anywhere 17 client, which provides the SAP JDBC driver. Install it on the Core Hub host or mount it into the Core Hub container at /opt/sqlanywhere17. Core Hub runs on Linux x86\_64 for this agent.

Does the bulk path use a staging table?

No. The rows of a batch travel as one text parameter that a single INSERT or MERGE statement reads with OPENSTRING, in the transaction of the write. Updates stay updates, so triggers on the target table behave as usual.

What privileges does the database user need?

Privileges to create, alter, and truncate the target tables and to read and write them. The simplest way is to let the user own the target schema; otherwise grant the ANY TABLE system privileges.

Can SQL Anywhere also be a source?

Yes. The same agent captures changes from the SQL Anywhere transaction log, with no triggers or shadow tables. The SAP SQL Anywhere CDC page has the details.

Which sources can replicate to SQL Anywhere?

Any Gluesync source agent, including Oracle, SQL Server, PostgreSQL, MySQL, IBM Db2 for i, Db2 for LUW, SAP HANA, SAP ASE, and SQL Anywhere itself. The integrations finder on our website lists every pairing.

REPLICATE TO A TARGET

## Other targets Gluesync delivers to

-    [Replicate to Aerospike](/solutions/replicate-to-aerospike/)
-    [Replicate to DynamoDB](/solutions/replicate-to-dynamodb/)
-    [Replicate to Redshift](/solutions/replicate-to-redshift/)
-    [Replicate to Amazon S3 & S3-compatible](/solutions/replicate-to-amazon-s3/)
-    [Replicate to Cassandra](/solutions/replicate-to-cassandra/)
-    [Replicate to CouchDB](/solutions/replicate-to-couchdb/)
-    [Replicate to Kafka](/solutions/replicate-to-kafka/)
-    [Replicate to Cosmos DB](/solutions/replicate-to-cosmos-db/)
-    [Replicate to Azure Data Lake](/solutions/replicate-to-azure-data-lake/)
-    [Replicate to ClickHouse](/solutions/replicate-to-clickhouse/)
-    [Replicate to CockroachDB](/solutions/replicate-to-cockroachdb/)
-    [Replicate to Couchbase](/solutions/replicate-to-couchbase/)
-    [Replicate to Databricks](/solutions/replicate-to-databricks/)
-    [Replicate to Elasticsearch and OpenSearch](/solutions/replicate-to-elasticsearch/)
-    [Replicate to file stores](/solutions/replicate-to-file-stores/)
-    [Replicate to BigQuery](/solutions/replicate-to-bigquery/)
-    [Replicate to Google Cloud Storage](/solutions/replicate-to-google-cloud-storage/)
-    [Replicate to Google Pub/Sub](/solutions/replicate-to-google-pubsub/)
-    [Replicate to Greenplum](/solutions/replicate-to-greenplum/)
-    [Replicate to GridGain](/solutions/replicate-to-gridgain/)
-    [Replicate to Db2](/solutions/replicate-to-db2/)
-    [Replicate to Informix](/solutions/replicate-to-informix/)
-    [Replicate to MariaDB](/solutions/replicate-to-mariadb/)
-    [Replicate to Microsoft Fabric](/solutions/replicate-to-microsoft-fabric/)
-    [Replicate to SQL Server](/solutions/replicate-to-sql-server/)
-    [Replicate to MongoDB](/solutions/replicate-to-mongodb/)
-    [Replicate to MySQL](/solutions/replicate-to-mysql/)
-    [Replicate to Oracle](/solutions/replicate-to-oracle/)
-    [Replicate to PostgreSQL](/solutions/replicate-to-postgresql/)
-    [Replicate to RavenDB](/solutions/replicate-to-ravendb/)
-    [Replicate to Redis](/solutions/replicate-to-redis/)
-    [Replicate to Redis Streams](/solutions/replicate-to-redis-streams/)
-    [Replicate to SAP ASE](/solutions/replicate-to-sap-ase/)
-    [Replicate to SAP HANA](/solutions/replicate-to-sap-hana/)
-    [Replicate to ScyllaDB](/solutions/replicate-to-scylladb/)
-    [Replicate to SingleStore](/solutions/replicate-to-singlestore/)
-    [Replicate to Snowflake](/solutions/replicate-to-snowflake/)
-    [Replicate to Solace PubSub+](/solutions/replicate-to-solace/)
-    [Replicate to Supabase](/solutions/replicate-to-supabase/)
-    [Replicate to Vertica](/solutions/replicate-to-vertica/)
-    [Replicate to WarehousePG](/solutions/replicate-to-warehousepg/)
-    [Replicate to YugabyteDB](/solutions/replicate-to-yugabytedb/)

## Evaluate Gluesync with your SQL Anywhere databases

Start a trial against your SQL Anywhere database, or talk to MOLO17 about your sources, the tables you need kept current, and the write path each one should use.

[Start a Gluesync trial](/get-gluesync/) [Talk to MOLO17](/contacts/)
