Skip to Content

In the past, iqunload utility could be executed only with migration mode (-au) or schema unload mode (-n).

However, table data unload functionality was added to iqunload utility by CR 773343.

——————————————————————————————————-

ESD05 773343

The IQUNLOAD tool has been enhanced to support unload

of a current iq database schema and data.

——————————————————————————————————-

[Affected IQ version]

15.x : after 15.4 ESD5

16.0 : after 16.0 SP10.x

IQ 16.0 SP08.x version does not have enhanced iqunload utility and there is no plan to support.

[Syntax]

Sybase IQ Unload Utility Version 15.4.1.3063

Usage: iqunload [options] <directory>

        @<data> expands <data> from environment variable <data> or file <data>

Options (use specified case, as shown):

        -ap <size>     set page size of rebuilt database

        -au            unload and reload schema

        -c “keyword=value;…”

                       supply database connection parameters

        -dc            redo computed columns

        -ms_filename   specify filename for new IQ_SYSTEM_MAIN store

        -ms_reserve    specify reserve for new IQ_SYSTEM_MAIN store

        -ms_size       specify size for new IQ_SYSTEM_MAIN store

        -n             no data – unload schema only

        -o <file>      log output messages to file

        -q             quiet: do not display messages or show windows

        -r <file>      specify name of generated reload SQL

                       script file (default “reload.sql”)

        -new_startline <command line>

                       specify command line parameters for reload engine

        -t <list>      only output the listed tables

        -tl <pattern_list>

                       only output tables matching the given pattern string

        -tld <pattern_list>

                       restrict the data extracted

        -ul <pattern_list>

                       only output users matching the given pattern string

        -null_string <string>

                       specify the null string string to use on extracted ascii character data

        -v             verbose messages

        -y             replace existing SQL script file without confirmation

        <directory> must be specified as a path meaningful to the database

        server unless an external unload is used.

‘-tl’, ‘-tld’, ‘-ul’ options were added for more flexible selecting target tables.

‘-null_string’ and <directory> were added for table data unloading.

<directory> should be used as absolute path name. otherwise, iqunload utility will search the <directory> name under “Run Directory” path.

Basically, enhanced iqunload utility can be executed without ‘-au’ or ‘-n’ options.

If you do not use both ‘-au’ and ‘-n’ options, iqunload utility runs with data unload functionality.

By default, iqunload utility writes a “reload.sql” and you can change the result script file’s name by using ‘-r’ option.

Unloaded table data files might be ascii format or binary format and proper “load table” commands are created for the table data file’s format.

[Sample usages]

(1) unload data for all tables

$ iqunload -c dsn=dba -o iqunload.log -v /…/data_dir

(2) unload data for a specific table

$ iqunload -c dsn=dba -o iqunload.log -v -t ‘usr1.usr1_tab2’ /…/data_dir

(3) unload data for tables whose name contain a specific pattern string

$ iqunload -c dsn=dba -o iqunload.log -v -tl ‘%usr%tab1’ /…/data_dir

(4) unload data for tables whose owner name contain a specific pattern string

$ iqunload -c dsn=dba -o iqunload.log -v -ul ‘usr%’ /…/data_dir

(5) limit unload data from the target tables

–create DDLs for all tables but “load table” commands and unload data were limited by ‘-tld’

$ iqunload -c dsn=dba -o iqunload.log -v -tld ‘usr%’ /…/data_dir

(6) unload data with mixed ‘-tl’ and ‘-tld’

–create DDLs for tables by ‘-tl’ but “load table” commands and unload data were limited by ‘-tld’

$ iqunload -c dsn=dba -o iqunload.log -v -tl ‘usr1%’ -tld ‘%tab1’ /…/data_dir

[see also]

http://help.sap.com/saphelp_iq1611_iqutil/helpdata/en/4c/ef9ae361eb4cecbfe0e3834c4d41f2/content.htm

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply