MSSQL_Customizing_UDTs.sql
.Click the Run button to mark all UDTs in the code in the files. All code is now copied to new folders, the names of which contain the text 'UDTs_marked'.
26. Delete custom triggers from the ASE database
Click the Run button to delete all custom triggers from the Sybase database.
27. Delete custom procedures from the ASE database
Click the Run button to delete all custom procedures from the Sybase database.
28. Import custom triggers and procedures with UDT marker
All objects in the files will now be re-imported into the database:
29. Check the import for completeness
Run the Check_Import_ASE.sql
script shown on the Sybase database to check for procedures or triggers that could not be created. The list contains the objects that could not be imported. If the list is empty, the process was successful.
A common reason for failure to create a stored procedure is that the CODE BEFORE
and CODE AFTER
blocks could not be created because the proper CAST
format was not used in the procedure. If this is the case, create the procedure manually:
CODE BEFORE
and CODE AFTER
blocks manually.Note: In MS SQL, the CODE BEFORE
and CODE AFTER
blocks are no longer needed; in new customizations, these blocks will be left out.
30. Create and run migration script for custom tables
The SSMA tool does not support UDTs. The SSMA tool also fails to perform the type conversions 'char → nchar
' and 'varchar → nvarchar
' for columns. Because of this, the tables must be migrated with the help of a generated script before the SSMA tool is started. After this script has been run, the SSMA tool will read the MS SQL definition of these tables correctly.
Create_Customizing_Tables.sql
script. The script that is generated starts with a header in which all custom indexes on standard tables are created.The second header contains the scripts used for creating custom tables, including their primary key, indexes, defaults, rules and foreign keys. Defaults and rules on the MS SQL Server side have changed. Defaults are now 'column defaults'; rules are now 'check constraints'.
WARNING
' and 'UNKNOWN
'. Foreign keys in the customer database referring to another database are no longer created in MS SQL Server. MS SQL Server does not support cross database foreign keys. These foreign keys are marked with the word 'WARNING
'.If the script cannot generate a name or code for a rule or default, the item will show 'UNKNOWN
'. In this case, check the definition in the Sybase server and manually modify the script to ensure a corresponding rule or default is created in MS SQL Server.
Please refer to the Example_defaults_rules.sql
script for the naming conventions. The location of this script is %ProgramFiles(x86)%\Isah\Tools\Isah Migrationbox\Scripts\Example_defaults_rules.sql
.
31. Create migration script for identity columns
The SSMA tool cannot handle identity columns. For this reason, the identity columns will be reintroduced afterwards with the help of a generated script.
IdentityTables.sql
script. This script is generated and saved automatically, and is used later.WARNING
' and 'UNKNOWN
'. Foreign keys in the customer database referring to another database are no longer created in MS SQL Server. MS SQL Server does not support cross database foreign keys. These foreign keys are marked with the word 'WARNING
'.If the script cannot generate a name or code for a rule or default, the item will show 'UNKNOWN
'. In this case, check the definition in the Sybase server and manually modify the script to ensure a corresponding rule or default is created in MS SQL Server.
Example_defaults_rules.sql
script for the naming conventions. The location of this script is %ProgramFiles(x86)%\Isah\Tools\Isah Migrationbox\Scripts\Example_defaults_rules.sql
.