sa_migrate_create_tables system procedure

Creates a proxy table and base table for each table listed in the dbo.migrate_remote_table_list table.

Syntax
sa_migrate_create_tables( i_table_owner )
Arguments
  • i_table_owner   Use this VARCHAR(128) parameter to specify the user on the target SQL Anywhere database who owns the migrated tables. This user is created using the GRANT CONNECT statement. A value is required for this parameter. See GRANT statement.

Remarks

This procedure creates a base table and proxy table for each table listed in the dbo.migrate_remote_table_list table (created using the sa_migrate_create_remote_table_list procedure). These proxy tables and base tables are owned by the user specified by the i_table_owner argument. This procedure also creates the same primary key indexes and other indexes for the new table that the remote table has in the remote database.

If you do not want all the migrated tables to have the same owner on the target SQL Anywhere database, you must execute the sa_migrate_create_remote_table_list procedure and the sa_migrate_create_tables procedure for each user who will own migrated tables.

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

This system procedure is used in conjunction with several other migration system procedures. The note in the Remarks section of the sa_migrate_create_fks system procedure contains the list of migrate procedures, and the order in which you must execute them. See sa_migrate_create_fks system procedure.

Permissions

None

Side effects

None

See also
Example

The following statement creates base tables and proxy tables on the target SQL Anywhere database. These tables belong to the user local_a.

CALL sa_migrate_create_tables( 'local_a' );