Running iqlsunload

Syntax

iqlsunloadoptions ]  directory [ @data ]

data:[ environment variable | file

Parameters

directory is a required parameter that contains a path relative to the database on the database server, not relative to the path where iqlsunload is executed. This specification is required to generate extract_data.sql. The directory must exist. The unload procedure on the server side does not create it. The iqlsunload utility unloads the actual data files to this target directory when you use Interactive SQL to run extract_data.sql. For example, extract_data.stql references the directory as follows:

CREATE VARIABLE @extract_directory varchar(2048);
SET @extract_directory =
'/testIQ15/database/IQ127_beta2_mpx_test/demo_r1/';
SET TEMPORARY OPTION temp_extract_directory =
'/testIQ15/database/IQ127_beta2_mpx_test/demo_r1/';

The iqlsunload application takes one or more optional parameters. Use the appropriate parameters for desired behavior; you cannot perform both functions in the same command.

Table 6-2: iqlsunload command line switches

Parameter

Description

-al

Unload IQ local store schema and data.

-ckeyword=value;...”

Supply database connection parameters.

-h

Print out the syntax (help) for the utility.

-o <file>

Log output messages, including errors, to file.

-q

Suppress messages and windows.

-r <directory>

Specify the directory where SQL scripts are generated. The default reload command file is reload.sql in the current directory. The directory is relative to the current directory of the client application, not the server.

-t <list>

Output listed tables only. Can specify OwnerName.TableName or TableName alone. (Cannot be specified with ­­-al).

-v

Output verbose messages.

-y

Replace existing reload schema SQL script without confirmation.

Usage

The iqlsunload utility requires a minimum server version of Sybase IQ 12.7 ESD #5.

The database must be running before you can run iqlsunload.

The specified directory is a path relative to the database on the database server, not relative to the path where iqlsunload is executed.

iqlsunload connects to the database using connection parameters -c in a way which is consistent with other tools like dbping and dbisql as described in the Utility Guide.

Run iqlsunload from within the $IQDIR15/lsunload directory so that it picks up updated libraries before resolving any IQ 12.7 libraries.

Objects unloaded Unloading the local store does not unload database objects that are not part of the local store.

The -al parameter unloads these persistent objects:

Sybase IQ 15.2 no longer allows users with empty user names.

Users with empty user names cannot be dropped with the 12.6 or 12.7 server and cannot be migrated. The schema reload operation warns that an empty user name has been encountered and that the user will not be re-created. The reload operation ignores such users and any associated objects.

When unloading tables:

The iqlsunload utility ignores any system tables or nonexistent tables specified.

Examples

Example Unload local stores from a database called mpxtest2, extracting any table data to the directory /mydevice/test_dir/unload_dir:

iqlsunload -o iqunload_624.out -al
-c “UID=DBA;PWD=SQL;ENG=myserver_mpxtest02”
/mydevice/test_dir/unload_dir

This command creates these scripts in the current directory:

Permissions

You must have DBA authority to run this utility.