Targets

Sybase ASE

Replicate into an SAP ASE (Sybase) database, with the connection, permissions, objects and options a Sybase target uses.

A Sybase ASE target receives the initial load and the streamed changes through the agent's database connection. The wizard lists it as Sybase. SQL Flow applies changes to ASE in source order, one change at a time.

Requirements

RequirementDetails
SourcesEvery source and capture mode.
ConnectionHost, Port (default 5000), Database, Username and a password or secret reference. All target tables live in the database named in Database.
EncryptionWith Encryption at Require (default), the ASE server must accept SSL on the port you enter, and the agent validates its certificate and host name against the agent host's trust store or the file in Trusted certificate file on agent. Prefer connects without encryption unless a trusted certificate file is set. See Sybase ASE: Encrypted data.
Target ownerTables with no mapped owner go to dbo.
KeysEach target table needs a primary key or a unique index on the source key columns.

Permissions

SQL Flow doesn't check the target login's permissions up front; a missing permission surfaces as the ASE error from the statement that needed it. The login needs:

  • A user in the target database.
  • select, insert, update and delete on each target table.
  • create table, if SQL Flow creates the target tables, and permission to create an index on an existing table that lacks a key.
  • Ownership of the target tables, to apply source schema changes (added and dropped columns). See Schema changes by target.

For example, as the database owner:

use <database>
go
sp_adduser <login>
go
grant create table to <login>
go
grant select, insert, update, delete on <owner>.<table> to <login>
go

Replace <database>, <login> and <owner>.<table> with your values.

SQL Flow creates a table with no mapped owner as dbo.<table>, and ASE lets only the database owner create objects owned by dbo. If the login isn't the database owner, either connect with a login aliased to dbo in the target database (sp_addalias <login>, dbo), or map the target owner to the login's own user name in Table and column names.

What SQL Flow creates on the target

ObjectWhenWhere
Target tables, with the source key as the primary keyOnly after you confirm Prepare target schema in the wizardThe mapped owner, or dbo, in the connection's database
A unique index named ux_<table>_<columns>When an existing table has no unique index on the source key columnsOn that table

SQL Flow also keeps the pipeline's committed position on the target, so another agent can take over and resume from what the target holds. See High availability for agents.

When SQL Flow creates a table, it chooses the ASE type from the source value type:

Source valueASE column
Textvarchar(1024); varchar(255) in a key
Binaryimage; varbinary(255) in a key
Booleantinyint (ASE bit can't be null)
16-bit, 32-bit and 64-bit integerssmallint, int, bigint
Unsigned 64-bit integerdecimal(20)
Decimaldecimal(38, 18)
Double, floatfloat, real
GUIDvarchar(36)
Date and time, with or without offsetdatetime (the offset isn't kept)
Time spantime

Create the target tables yourself when your data needs other types or lengths, for example text longer than 1,024 characters. See Data type mapping.

Options

These appear on the wizard's Target step after you choose Sybase. There is no Collapse row versions box, because Sybase ASE targets always apply changes in order.

OptionDefaultEffect
Atomic transaction limits: Maximum records per transaction1,000,000 (maximum 10,000,000)Apply stops if one source transaction exceeds the limit, keeping the transaction intact for recovery.
Atomic transaction limits: Maximum transaction size (MiB)512The same, by size.

Limitations

  • Ordered apply only: every change is applied in source order, one at a time.
  • Generated types: in tables SQL Flow creates, text is varchar(1024) and key text is varchar(255), decimals keep 18 digits after the point and 20 before it, and date-time offsets are dropped.
  • One database per connection: a mapped table name qualified with another database is refused with Target provisioning does not support a catalog-qualified mapped table.

See also

If this was useful,
our newsletter will be too.

Get monthly insights on data engineering, AI, and building critical infrastructure - direct from the Spectral Core team and CEO Damir Bulic.