Running iqunload -n

Sybase recommends that you run this procedure to avoid the SQL syntax problems that cause failures.

  1. Copy the following scripts from $IQDIR15/unload to $ASDIR/scripts:
    • unloadold.sql

    • unload.sql

    • optdeflt.sql

    • opttemp.sql

  2. Use your 12.x server to start the database you want to migrate.
  3. Use the iqunload utility to run a schema unload.
    For example:
     iqunload –n –c "UID=DBA;PWD=SQL;ENG=my_eng;DBN=my_dbname".
    The schema unload produces a reload.sql script that contains the schema for the database being migrated in the directory from which you ran the unload.
    The generated reload.sql file contains a sample CREATE DATABASE statement, for example:
    -- CREATE DATABASE command: CREATE DATABASE
    '/iq-15/unload/127/db/iq127db.db' LOG ON
    '/iq-15/unload/127/db/iq127db.log' CASE IGNORE
    ACCENT IGNORE PAGE SIZE 4096 COLLATION 'ISO_BINENG'
    BLANK PADDING ON JCONNECT OFF CHECKSUM OFF IQ PATH
    'iq127db.iq' IQ SIZE 50 TEMPORARY PATH
    'iq127db.iqtmp' TEMPORARY SIZE 25 MESSAGE PATH
    'iq127db.iqmsg' IQ PAGE SIZE 131072 BLOCK SIZE 8192

    Running the reload.sql script does not execute the sample statement, but you can use this generated statement as a template when you create your database with Sybase IQ 15.

  4. Start the utility database using the Sybase IQ 15 Server, and create a new, empty, Sybase IQ 15 database.
  5. Use Interactive SQL to run the reload.sql script that contains the unloaded schema against the new Sybase IQ 15 database. This loads the schema of the old database into an Sybase IQ 15 database. If there are any SQL syntax errors, you receive warnings when running the SQL script. Ignore the errors to get a complete list of problems. Modify the database to be migrated to eliminate the errors found.
  6. Perform this process iteratively, if necessary, until you can cleanly reload the schema unloaded from the database to be migrated, against the empty 15 database.