Microsoft SQL Server Datatype Compatibility

Replication Agent processes Microsoft SQL Server transactions and passes transaction information to the primary Replication Server. The primary Replication Server uses the datatype formats specified in the replication definition to receive the data from Replication Agent.

Microsoft SQL Server to SAP Replication Server Default Datatype Mapping

Microsoft SQL Server Datatype

Microsoft SQL Server Length/Range

SAP Replication Server Datatype

SAP Replication Server Length/Range

Notes

bigint

-263 to 263 - 1

rs_msss_bigint

-263 to 263 - 1

binary

Fixed-length up to 8000 bytes

binary

32K

bit

Integer with value of 0 or 1

bit

Integer with value of 0 or 1

char

Fixed-length up to 8000 characters

char

32K

date

01/01/0001 to 12/31/9999

date

01/01/0001 to 12/31/9999

 

datetime

Date and time from 01/01/1753 to 12/31/9999

rs_msss_datetime

Date and time from 01/01/1753 to 12/31/9999

datetime2

Date and time from 01/01/1753 to 12/31/9999

rs_msss_datetime2

Date and time from 01/01/1753 to 12/31/9999

 

datetimeoffset

01/01/0001 to 12/31/9999

rs_msss_datetimeoffset

01/01/0001 to 12/31/9999

 

decimal

Decimal type with precision between 1 and 38 and scale from 1 to 38

decimal

Numeric from -1038 to 1038 - 1

float

Floating point number -1.79E + 308 through -2.23E - 308, 0 and 2.23E + 308 through 1.79E + 308.

float

Floating precision from -1.79E + 308 to 1.79E + 308

Results are machine dependent.

image

Variable-length binary data up to 231 - 1 bytes

image

2GB

int

-231 to 231 - 1

rs_msss_bigint

-231 to 231 - 1

money

Monetary from -263 to 263 - 1

money

Monetary from -263 to 263 - 1

nchar

Fixed-length Unicode up to 4000 characters

unichar or char

32K

Actual maximum length is @@ncharsize * number of characters.

ntext

Variable-length Unicode up to 230 - 1 characters

unitext or image

2GB

For Replication Server 15.0 and later versions, ntext maps to unitext. For earlier versions of Replication Server, ntext maps to image.

nvarchar

Variable-length Unicode up to 4000 characters

univarchar or varchar

32K

Actual maximum length is @@ncharsize * number of characters.

nvarchar(max)

Variable-length Unicode up to 230 - 1 characters

rs_msss_nvarchar_max

2GB

The nvarchar(max) datatype cannot be replicated to data servers other than Microsoft SQL Server.

For Replication Server 15.0 and later versions, nvarchar(max) maps to unitext. For earlier versions of Replication Server, nvarchar(max) maps to image.

numeric

Synonym for decimal datatype

numeric

Synonym for decimal datatype

real

Floating point number from -3.40E + 38 to 3.40E + 38

real

Floating precision from -3.40E + 38 to 3.40E + 38

Results are machine dependent.

smalldatetime

Date and time from 01/01/1900 to 06/06/2079

rs_msss_datetime

Date and time from 01/01/1900 to 06/06/2079

smallint

Integer with value from -215 to 215 - 1

smallint

Integer with value from -215 to 215 - 1

smallmoney

Monetary from -214,748.3648 to 214,748.3647

smallmoney

Monetary from -214,748.3648 to 214,748.3647

 

text

Variable-length up to 231 - 1 characters

text

2GB

time

00:00:00.0000000 to 23:59:59.9999999

rs_msss_time

00:00:00.0000000 to 23:59:59.9999999

timestamp

Database-wide unique number

timestamp or varbinary(8)

Database-wide unique number

For replication to Replication Server 15.0 and earlier versions, the SAP datatype should be varbinary(8). For replication to Replication Server 15.1 or later, the SAP datatype should be timestamp.

tinyint

Integer with value from 0 to 255

tinyint

Integer with value from 0 to 255

uniqueidentifier

Globally unique identifier

char(36)

Globally unique identifier

No SAP equivalent. Map to char(38).

varbinary

Variable-length up to 8000 bytes

varbinary

32K

varbinary(max)

Variable-length up to 231 - 1 bytes

rs_msss_varbinary_max

2GB

The varbinary(max) datatype cannot be replicated to data servers other than Microsoft SQL Server.

varchar

Variable-length up to 8000 characters

varchar

32K

varchar(max)

Variable-length up to 231 - 1 characters

rs_msss_varchar_max

2GB

The varchar(max) datatype cannot be replicated to data servers other than Microsoft SQL Server.