Moving data by using distributed SQL
If you want to move data with different binary pages and page sizes across platforms and you have expertise in using distributed SQL, you can use INSERT and SELECT SQL statements to transfer the data.
Prerequisites: A network connection must exist between database server instances.
To move data using INSERT and SELECT statements with fully qualified table names:
- Capture the complete database schema from the source database server.
- Alter the extent sizing and, if necessary, the lock modes on tables from page to row.
- Create and verify the schema on the target database server.
- Disable logging on both source and target servers where necessary.
- Create and run the following scripts:
- Create and run separate scripts for:
- Disabling select triggers on the source server
- Disabling indexes, triggers and constraints for each table on the target database server.
- Create and run one script per table for the fully-qualified INSERT
and SELECT statements. For example:
INSERT INTO dbname@target:owner.table SELECT * FROM dbname@source:owner.table
You can run the scripts in parallel. In addition, for larger tables, you can create multiple scripts that can partition the table to run in parallel.
- Create and run separate scripts for enabling indexes, triggers and constraints for each table
- Create and run separate scripts for:
- Run UPDATE STATISTICS on system catalog tables and stored procedures and functions on the target database server.
- Adjust starting values for all tables that have serial columns on the target database server.
- Turn on transaction logging on the source and target database servers.
- Return the source and target database servers to multi-user mode.
- Validate the data that was transferred to the target database server.
For information about INSERT and SELECT statements, refer to the IBM® Informix Guide to SQL: Syntax. For information on distributed transactions, refer to the IBM Informix Administrator's Guide and the IBM Informix Administrator's Reference.