Running iqlsunload

iqlsunload is a command line utility. Refer to this section for information about syntax, parameters, usage, examples, and permissions.

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 on the server side will 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. (Cannot be specified with -t)

-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

Run quietly. Suppress messages and windows.

-r <directory>

Specify the directory where SQL scripts are generated. The default reload command file is reload.sqlin 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 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.

The iqlsunload tool 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 Sybase IQ Utility Guide.

You must run the iqlsunload tool 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 the following persistent objects:

Sybase IQ 15.1 no longer allows users with empty user names. Users of this type could formerly be created using statements like:

GRANT CONNECT TO ““ IDENTIFIED BY 'sql'

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 was encountered and the user will not be recreated. The reload operation ignores such users and any associated objects.

When unloading tables, note that:

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

The preceding command creates three scripts in the current directory:

Permissions

You must have DBA authority to run this utility.