Show TOC

iqunload UtilityLocate this document in the navigation structure

iqunload is a command line utility for SAP IQ 12.7 database migration. iqunload re-creates the legacy catalog on the new database catalog in the current installation.

Syntax iqunload does not change SAP IQ data and temp dbspaces. The utility preserves all legacy database options and applies them to the new database. SAP IQ ignores any legacy options that no longer apply to the current version of the software.
Note If you are reloading a 12.7 database, remove any square brackets or back quotes in identifiers; otherwise, the reload fails.
Syntax
Syntax
iqunload<options> ]  <directory> [ @<data >]
<data>:[ <environment variable> | <file> ]
Parameters
Syntax

iqunload takes one or more parameters.

-ap <size>
(optional) Sets the page size for the new catalog store.
-au

required for migration mode. Migrates the database.

Specify an -au argument to start iqunload in migration mode. or -n argument, but not both.

-c "<keyword> = <value>, ..."

(required) Supply database connection parameters. You must specify a DBF parameter to specify the name of the database file for migration. The file path is either absolute or relative to the server startup directory.

-dc

(optional) Recalculate computed columns in the database.

-ms_filename

optional for simplex migration; required for multiplex migration. Use -ms_filename to specify a file name for the new empty IQ_SYSTEM_MAIN store created during the migration.

If not specified, the default new main store is a file system file called new_main_store.iq

-ms_reserve

(optional) Specifies the size of the new IQ_SYSTEM_MAIN reserve, in MB. If unspecified, defaults to zero.

-ms_size

(optional) specifies the size of the new IQ_SYSTEM_MAIN store, in MB, based on the database size. The minimum, assuming a default page size, is 200MB. If you specifiy an –ms_size value smaller than the computed value, SAP IQ uses the computed value; otherwise the specified value is used.

-n

required for schema unload only. Unloads the schema definition only. The -n parameter requires 12.7 ESD #5 or later. Specify -au or -n argument but not both.

-new_startline

(optional) specify startup switches for the new server that is the migration target. For a complete list of server startup switches, see the Utility Guide.

-o <file name>

(optional) logs output messages to <file name>.

-q

(optional) suppresses messages and windows.

-r <file name>

(optional) specifies the file name.

-t <list>

(optional) outputs listed tables only. Can specify OwnerName.TableName or TableName alone.

-v

(optional) returns verbose messages.

-y

(optional) replaces existing reload schema SQL script with new output without confirmation.

Examples
Syntax
Example 1
migrates a simplex database to a current server.
iqunload –au –c
“UID=DBA;PWD=SQL;DBF=/mydevice/test_dir/test2.db”
Example 2
unloads a legacy database schema and renames the generated SQL script to test2_reload.sql:
iqunload –n -c “UID=DBA;PWD=SQL;DBF=D:\\test_dir\\test2\\test2.db;
 
Example 3
migrates database test3.db. The START connection parameter specifies switches for starting the database being reloaded. The -new_startline parameter specifies switches for starting the utility_db to create the new catalog store.
iqunload –au –c
"UID=DBA;PWD=SQL;DBF=test3.db;START=–ch 128M –iqmc 50" –new_startline "–ch 256M –iqtc 400"
Do not include -iqnotemp <XYZ> in the new start line or migration fails. As part of the migration process, temp files are added to IQ_SYSTEM_TEMP. If you start the server with the -iqnotemp option, iqunload cannot add these temp files
Example 4
migrates the legacy database, asiqdemo.db, using a raw device for the IQ_SYSTEM_MAIN store:
iqunload –au –c
"UID=DBA;PWD=SQL;DBF=asiqdemo.db" –ms_filename "/dev/rdsk/c4t0d0s3"
Usage
Syntax

iqunload has two working modes: schema unload and migration.

Schema Unload Mode

iqunload requires an -n argument to start in schema unload mode. Schema unload mode unloads a 12.7 ESD #5 database schema, and generates a script (reload.sql) that can re-create the schema for a database in a current version of the software. A -c argument is required for connection parameters:

iqunload -n -c "UID=DBA;PWD=SQL;ENG=my_engine;DBN=my_dbname"

Schema unload mode re-creates the schema, but does not migrate data. To migrate data, extract the legacy data and load the new database.

Migration Mode

iqunload requires an -au argument to start in migration mode. iqunload migration mode interfaces with the 12.7 support engine (iqunlspt) and the current database server (iqsrv16):
  • Start the legacy database and generate the schema
  • Start the current SAP IQ server
  • Create a new database and apply the legacy schema
General Usage
  • Insufficient cache memory causes migration errors. iqunload uses default values for various cache sizes (catalog cache, main buffer cache, temp cache). If the legacy database requires higher cache values, use the –ch and -cl options as part of the START connection parameter to increase the cache size.

  • During database migration, the server creates a message file (*.iqmsg.R) as it reloads the generated schema. This file is normally deleted as part of a cleanup operation for successful migrations. If the migration fails during the reload stage, cleanup does not occur, and *.iqmsg.R remains in the unload directory. *.iqmsg.R may contain information that can help solve your migration problems.

  • iqunload writes some temporary files to the $IQTMP16 directory. If you set the $IQTMP16 environment variable, set it to a valid directory name.

  • Users with wide tables (large numbers of column/null values) should not decrease the catalog store page size for database migration.

  • If the legacy database contains invalid views, SAP IQ completes the migration but issues warnings. A warning may occur, for example, if the tables involved in a view are dropped.

  • If the legacy database is encrypted, use the DBKEY connection parameter to provide the encryption key. The migrated database uses the same encryption key.

Permissions
Syntax

DBA