Moving a database between computers with the onunload and onload utilities

You can use the onunload and onload utilities to move a complete database from one computer to another.

Procedure

To move a database from one computer to another:

  1. Make sure that the page size, numeric representations, and byte alignment on structures and unions are the same on both computers.

    The page size is 2 KB on certain UNIX™ systems and 4 KB on Windows™. For information about page size, see your Informix® Administrator's Guide. The numeric representation and the byte alignment are characteristics of your operating system. For information about numeric representation and byte alignment, refer to the manuals for your operating systems.

  2. Decide where to store the unloaded data:
    • On disk. Create an empty file for onunload to hold the data. Make sure that you have write permission for the file.
    • On tape. Use the tape device and characteristics specified in the ONCONFIG configuration file by either the TAPEDEV or LTAPEDEV configuration parameter, or specify another tape device. Make sure that the tape device that you specify is available for onunload. However, if you set the TAPEDEV configuration parameter to STDIO, the onunload utility will not be able to unload data.
  3. Run the oncheck utility to make sure that your database is consistent.

    For information about oncheck, see your Informix Administrator's Reference.

  4. Run the onunload utility to unload the data from the database.

    For details on the syntax of the onunload command, see Syntax of the onunload command.

  5. If necessary, transfer the storage medium (tape or disk) to the new computer.
    If the two computers are on the same network, you can read or write the data remotely.
  6. Run the onload utility to load the data into the new database.

    For details on the syntax of the onload command, see Syntax of the onload command.

  7. Set the logging status for the new database.

    For information about logging status, see your Informix Administrator's Guide.

  8. If necessary, change the DBA privileges of the database.
  9. Create a level-0 backup of the new database.