Contents Index sa_migrate_create_remote_fks_list system procedure sa_migrate_create_tables system procedure

ASA SQL Reference
  System Procedures and Functions
    System and catalog stored procedures

sa_migrate_create_remote_table_list system procedure


Function 

Populates the dbo.migrate_remote_table_list table.

Syntax 

sa_migrate_create_remote_table_list (
server_name,
table_name, ]
owner_name, ]
database_name ] )

Permissions 

None

Side effects 

None

See also 

sa_migrate system procedure

sa_migrate_create_tables system procedure

sa_migrate_data system procedure

sa_migrate_create_remote_fks_list system procedure

sa_migrate_create_fks system procedure

sa_migrate_drop_proxy_tables system procedure

Migrating databases to Adaptive Server Anywhere

Description 

The sa_migrate_create_remote_table_list stored procedure is used with the other migration stored procedures. These procedures must be executed in the following order:

  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

This procedure populates the dbo.migrate_remote_table_list table with a list of tables that can be migrated from the remote database. You can delete rows from this table for remote tables that you do not want to migrate.

If you do not want all the migrated tables to have the same owner on the target Adaptive Server Anywhere database, you must execute this procedure for each user whose tables you want to migrate.

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

Caution    Do not specify NULL for both the table_name and owner_name parameters.

Supplying NULL for both the table_name and owner_name parameters migrates all the tables in the database, including system tables. As well, tables that have the same name, but different owners in the remote database all belong to one owner in the target database. It is recommended that you migrate tables associated with one owner at a time.

Parameters 

server_name    The name of the remote server that is being used to connect to the remote database. The remote server is created with the CREATE SERVER statement. A value is required for this parameter.

For more information, see CREATE SERVER statement.

table_name    The name(s) of the tables that you want to migrate, or NULL to migrate all the tables. The default is NULL. Do not specify NULL for both the table_name and owner_name parameters.

owner_name    The user who owns the tables on the remote database that you want to migrate, or NULL to migrate all the tables. The default is NULL. Do not specify NULL for both the table_name and owner_name parameters

database_name    The name of the remote database from which you want to migrate tables or NULL. This parameter is NULL by default. When migrating tables from Adaptive Server Enterprise and Microsoft SQL Server databases, you must specify the database name.

Examples 

The following statement creates a list of tables that belong to all the users on the remote database.

CALL sa_migrate_create_remote_table_list( 'local_a', NULL, NULL, NULL )

The following statement creates a list of tables that belong to the user remote_a on the remote database.

CALL sa_migrate_create_remote_table_list( 'local_a', NULL, 'remote_a', NULL )

The following statement creates a list of tables that are in the database named mydb.

CALL sa_migrate_create_remote_table_list( 'local_a', NULL, NULL, 'mydb' )

Contents Index sa_migrate_create_remote_fks_list system procedure sa_migrate_create_tables system procedure