Unloading Legacy Schemas

To unload legacy schema, run iqunload in schema unload mode (iqunload -n ) on the same machine as the legacy schema.

  1. Copy these files from %IQDIR16%\unload to %ASDIR%\scripts:
    • unloadold.sql

    • unload.sql

    • optdeflt.sql

    • opttemp.sql

  2. Start the legacy server.
  3. Run iqunload in schema unload mode (iqunload -n ).

    Include the appropriate connection parameters and other startup options. Schema unload mode creates a SQL script (reload.sql) in the current directory that contains the legacy database schema. reload.sql does not contain any checkpoints.For very large schemas, edit reload.sql, to add a few checkpoints. If you do not include extra checkpoints, IQ generates additional metadata objects that requires extra (-iqmc) main cache memory.

    reload.sql also contains a CREATE DATABASE template command that is commented out.

  4. Create a new 16.0 database.
    Set the IQ SIZE and TEMPORARY SIZE clauses to create an IQ_SYSTEM_MAIN of 10GB and IQ_SYSTEM_TEMP of 5GB. For example:
    CREATE DATABASE 'test.db'
    IQ PATH 'test.iq'
    IQ SIZE 10240
    TEMPORARY PATH 'test.iqtmp'
    TEMPORARY SIZE 5120
  5. Start and connect to the new database.
  6. Run the reload.sql against the new database.

    Execution time roughly approximates the actual time to allow for database migration, excluding validation checks. Correct any errors. Perform this process iteratively until you can cleanly load the legacy schema.