Using an SAP ASE database as a source for Amazon DMS
You can migrate data from an SAP Adaptive Server Enterprise (ASE) database—formerly known as Sybase—using Amazon DMS. With an SAP ASE database as a source, you can migrate data to any of the other supported Amazon DMS target databases.
For information about versions of SAP ASE that Amazon DMS supports as a source, see Sources for Amazon DMS.
For additional details on working with SAP ASE databases and Amazon DMS, see the following sections.
Topics
- Prerequisites for using an SAP ASE database as a source for Amazon DMS
- Limitations on using SAP ASE as a source for Amazon DMS
- Permissions required for using SAP ASE as a source for Amazon DMS
- Removing the truncation point
- Endpoint settings when using SAP ASE as a source for Amazon DMS
- Source data types for SAP ASE
Prerequisites for using an SAP ASE database as a source for Amazon DMS
For an SAP ASE database to be a source for Amazon DMS, do the following:
-
Enable SAP ASE replication for tables by using the
sp_setreptable
command. For more information, see Sybase Infocenter Archive. -
Disable
RepAgent
on the SAP ASE database. For more information, see Stop and disable the RepAgent thread in the primary database. -
To replicate to SAP ASE version 15.7 on an Windows EC2 instance configured for non-Latin characters (for example, Chinese), install SAP ASE 15.7 SP121 on the target computer.
Note
For ongoing change data capture (CDC) replication, DMS runs dbcc
logtransfer
and dbcc log
to read data from the
transaction log.
Limitations on using SAP ASE as a source for Amazon DMS
The following limitations apply when using an SAP ASE database as a source for Amazon DMS:
-
You can run only one Amazon DMS task with ongoing replication or CDC for each SAP ASE database. You can run multiple full-load-only tasks in parallel.
-
You can't rename a table. For example, the following command fails.
sp_rename 'Sales.SalesRegion', 'SalesReg;
-
You can't rename a column. For example, the following command fails.
sp_rename 'Sales.Sales.Region', 'RegID', 'COLUMN';
-
Zero values located at the end of binary data type strings are truncated when replicated to the target database. For example,
0x0000000000000000000000000100000100000000
in the source table becomes0x00000000000000000000000001000001
in the target table. -
If the database default is set not to allow NULL values, Amazon DMS creates the target table with columns that don't allow NULL values. Consequently, if a full load or CDC replication task contains empty values, Amazon DMS throws an error. You can prevent these errors by allowing NULL values in the source database by using the following commands.
sp_dboption
database_name
, 'allow nulls by default', 'true' go usedatabase_name
CHECKPOINT go -
The
reorg rebuild
index command isn't supported. -
Amazon DMS does not support clusters or using MSA (Multi-Site Availability)/Warm Standby as a source.
-
When
AR_H_TIMESTAMP
transformation header expression is used in mapping rules, the milliseconds won't be captured for an added column. -
Running Merge operations during CDC will result in a non-recoverable error. To bring the target back in sync, run a full load.
-
Rollback trigger events are not supported for tables that use a data row locking scheme.
-
Amazon DMS can't resume a replication task after dropping a table within the task scope from a source SAP database. If the DMS replication task was stopped and performed any DML operation (INSERT,UPDATE,DELETE) followed by dropping the table, you must restart the replication task.
Permissions required for using SAP ASE as a source for Amazon DMS
To use an SAP ASE database as a source in an Amazon DMS task, you need to grant permissions. Grant the user account specified in the Amazon DMS database definitions the following permissions in the SAP ASE database:
-
sa_role
-
replication_role
-
sybase_ts_role
-
By default, where you need to have permission to run the
sp_setreptable
stored procedure, Amazon DMS enables the SAP ASE replication option. If you want to runsp_setreptable
on a table directly from the database endpoint and not through Amazon DMS itself, you can use theenableReplication
extra connection attribute. For more information, see Endpoint settings when using SAP ASE as a source for Amazon DMS.
Removing the truncation point
When a task starts, Amazon DMS establishes a $replication_truncation_point
entry in the syslogshold
system view, indicating that a replication
process is in progress. While Amazon DMS is working, it advances the replication
truncation point at regular intervals, according to the amount of data that has
already been copied to the target.
After the $replication_truncation_point
entry is established, keep
the Amazon DMS task running to prevent the database log from becoming excessively large.
If you want to stop the Amazon DMS task permanently, remove the replication truncation
point by issuing the following command:
dbcc settrunc('ltm','ignore')
After the truncation point is removed, you can't resume the Amazon DMS task. The log continues to be truncated automatically at the checkpoints (if automatic truncation is set).
Endpoint settings when using SAP ASE as a source for Amazon DMS
You can use endpoint settings to configure your SAP ASE source database similar to using
extra connection attributes. You specify the settings when you create the source
endpoint using the Amazon DMS console, or by using the create-endpoint
command in the
Amazon CLI--sybase-settings '{"
JSON syntax.EndpointSetting"
:
"value"
, ...
}'
The following table shows the endpoint settings that you can use with SAP ASE as a source.
Name | Description |
---|---|
Charset |
Set this attribute to the SAP ASE name that corresponds to the international character set. Default value: Example: Valid values:
For any further questions about supported character sets in a
SAP ASE database, see Adaptive Server Enterprise: Supported character
sets |
EnableReplication |
Set this attribute if you want to enable
Default value: Valid values: Example: |
EncryptPassword |
Set this attribute if you have enabled Default value: Valid values: Example: For more information on these parameter values, see Adaptive Server Enterprise: Using the
EncryptPassword Connection string property |
Provider |
Set this attribute if you want to use Transport Layer Security (TLS) 1.2 for versions of ASE 15.7 and higher. Note that Amazon requires TLS version 1.2 or later, and recommends version 1.3. Default value: Valid values: Example: |
Source data types for SAP ASE
For a list of the SAP ASE source data types that are supported when using Amazon DMS and the default mapping from Amazon DMS data types, see the following table. Amazon DMS doesn't support SAP ASE source tables with columns of the user-defined type (UDT) data type. Replicated columns with this data type are created as NULL.
For information on how to view the data type that is mapped in the target, see the Targets for data migration section for your target endpoint.
For additional information about Amazon DMS data types, see Data types for Amazon Database Migration Service.
SAP ASE data types |
Amazon DMS data types |
---|---|
BIGINT |
INT8 |
UNSIGNED BIGINT |
UINT8 |
INT |
INT4 |
UNSIGNED INT |
UINT4 |
SMALLINT |
INT2 |
UNSIGNED SMALLINT |
UINT2 |
TINYINT |
UINT1 |
DECIMAL |
NUMERIC |
NUMERIC |
NUMERIC |
FLOAT |
REAL8 |
DOUBLE |
REAL8 |
REAL |
REAL4 |
MONEY |
NUMERIC |
SMALLMONEY |
NUMERIC |
DATETIME |
DATETIME |
BIGDATETIME |
DATETIME(6) |
SMALLDATETIME |
DATETIME |
DATE |
DATE |
TIME |
TIME |
BIGTIME |
TIME |
CHAR |
STRING |
UNICHAR |
WSTRING |
NCHAR |
WSTRING |
VARCHAR |
STRING |
UNIVARCHAR |
WSTRING |
NVARCHAR |
WSTRING |
BINARY |
BYTES |
VARBINARY |
BYTES |
BIT |
BOOLEAN |
TEXT |
CLOB |
UNITEXT |
NCLOB |
IMAGE |
BLOB |