Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sa_migrate system procedure Next Page

sa_migrate_create_fks system procedure

Creates foreign keys for each table listed in the dbo.migrate_remote_fks_list table.


sa_migrate_create_fks( i_table_owner )


This procedure creates foreign keys for each table that is listed in the dbo.migrate_remote_fks_list table. The user specified by the i_table_owner argument owns the foreign keys in the target database.

If the tables in the target SQL Anywhere database do not all have the same owner, you must execute this procedure for each user who owns tables for which you need to migrate foreign keys.


This system procedure is used in conjunction with several other migration system procedures, which must be executed in sequence as listed below:

  1. sa_migrate_create_remote_table_list

  2. sa_migrate_create_tables

  3. sa_migrate_data

  4. sa_migrate_create_remote_fks_list

  5. sa_migrate_create_fks

  6. sa_migrate_drop_proxy_tables

As an alternative, you can migrate all tables in one step using the sa_migrate system procedure.



Side effects


See also

The following statement creates foreign keys based on the dbo.migrate_remote_fks_list table. The foreign keys belong to the user local_a on the local SQL Anywhere database.

CALL sa_migrate_create_fks( 'local_a' );