Mapping Sybase ASE and SQL Server Data Types (SybaseToSQL)
Sybase Adaptive Server Enterprise (ASE) database types differ from SQL Server or Azure SQL Database types. When you convert ASE database objects to SQL Server or SQL Azure objects, you must specify how to map data types from ASE to SQL Server or SQL Azure. You can accept the default data type mappings, or you can customize the mappings as shown in the following sections.
Default Mappings
SSMA has a default set of data type mappings. For the list of default mappings, see Project Settings (Type Mapping) (SybaseToSQL).
Type Mapping Inheritance
You can customize type mappings at the project level, object category level (such as all stored procedures), or object level. Settings are inherited from the higher level unless overridden at a lower level. For example, if you map smallmoney to money at the projects level, all objects in the project will use this mapping unless you customize the mapping at the object category level or object level.
When you view the Type Mapping tab in SSMA, the background is color-coded to show which type mappings are inherited. The background of a type mapping is yellow for any inherited type mapping, and white for any mapping specified at the current level.
Customizing Data Type Mappings
The following procedure shows how to map data types at the project, database, or object level.
To map data types
To customize data type mapping for the whole project, open the Project Settings dialog box:
On the Tools menu, select Project Settings.
In the left pane, select Type Mapping.
The type mapping chart and buttons appear in the right pane.
Or, to customize data type mapping at the database, table, view, or stored procedure level, select the database, object category, or object in Sybase Metadata Explorer:
In Sybase Metadata Explorer, select the folder or object that you want to customize.
In the right pane, click the Type Mapping tab.
To add a new mapping, do the following:
Click Add.
Under Source type, select the ASE data type to map.
If the type requires a length, specify the minimum data length for the mapping in the From box, and specify the maximum data length for the mapping in the To box.
This lets you customize the data mapping for smaller and larger values of the same data type.
Under Target type, select the target SQL Server or SQL Azure data type.
Some types require a target data type length. If it is required, enter the new data length in the Replace with box.
Click OK.
To edit a data type mapping, do the following:
Click Edit.
Under Source type, select the ASE data type to map.
If the type requires a length, specify the minimum data length for the mapping in the From box, and specify the maximum data length for the mapping in the To box.
This lets you customize the data mapping for smaller and larger values of the same data type.
Under Target type, select the target SQL Server or SQL Azure data type.
Some types require a target data type length. If it is required, enter the new data length in the Replace with box, and then click OK.
To remove a custom data type mapping, do the following:
Select the row in the type mapping list that contains the data type mapping you want to remove.
Click Remove.
You cannot remove inherited mappings. However, inherited mappings are overridden by custom mappings on a specific object or object category.
Next Steps
The next step in the migration process is to either Create an assessment report or Convert Sybase ASE database objects to SQL Server or SQL Azure syntax. If you create an assessment report, Sybase ASE objects are automatically converted during the assessment.
See Also
Migrating Sybase ASE Databases to SQL Server - Azure SQL Database (SybaseToSQL)