Previous Topic: Forward Engineering with Stored ProceduresNext Topic: Migrate a Stored Procedure


DBMS Migration

Although you can use macros to write a stored procedure that is not dependent on the physical data constructs, the SQL code that you use must be supported by your selected target server. Different servers support different SQL statements and syntax, so a template that you create for Informix looks different from one that you create for Sybase. When you migrate stored procedures from one target server to another, make sure that you change the stored procedure SQL code to accommodate server-specific SQL constructs.

You must change server-specific SQL code to migrate a stored procedure from server to server, but you do not have to update the physical table names, attribute names, and data type information related to the stored procedure if you refer to them with macros. CA ERwin Data Modeler converts table, attribute, and relationship information represented by the macros for your selected target server.

Note: You can isolate some syntax changes or server-specific naming standards by using macro variables and assigning their value at the top of the stored procedure. You can then change the value once and have the change appear throughout the procedure. Use the %Decl macro to declare a variable, %=<variable> macro to assign its value, and %: to expand the variable during generation.

More information:

Stored Procedures