any fast way to unload DB2 user table without TOOLS (db2 replatform)

Tsui Yuk Kai

any fast way to unload DB2 user table without TOOLS (db2 replatform)
My Boss ask me to unload all user table from DB2 (with load statment and
data) and then replatfrom to open sybase IQ.
Anyone have idea to do it fastest?

many thanks

tommy

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

harby ariza

Re: any fast way to unload DB2 user table without TOOLS (db2 replatform)
(in response to Tsui Yuk Kai)

_______________________________________________________________________________________

Note: This e-mail is subject to the disclaimer contained at the bottom of this message.
_______________________________________________________________________________________




Tommy,

Maybe you can do something like this:

db2 -x "select 'db2 #export to
/staging2/'||substr(creator,1,8)||'.'||rtrim(name)|| '.del of del select
* from '||substr(creator,1,8)||'.'||substr(name,1,20)||' #' from
sysibm.systables where type = 'T' and creator in
('CRODSDBA','WHICSDBA')"

Then after you can change the # for " and if you know the syntax to
load the data in sybase you can use the same query with few changes.


Or if you know korn shell have a look a the code below:

DB2EXPORT()
{
for tb in `db2 -x "select
rtrim(substr(creator,1,8)),rtrim(substr(name,1,20)) from
sysibm.systables where creator in ('CRODSDBA','WHICSDBA') and type = 'T'
order by creator,name" | awk '{print $1"."$2 }'`
do
db2 -va "export to $EXTRACT_DIR/"$tb"_END$MONTH$YEAR.del of del
select * from $tb" >> EXTRACT_DIR2/log/export_END$MONTH$YEAR$$.log
done
}


I hope it helps. I wonder once you find out what is the syntax for
loading data in Sybase can you send it please. Thanks.

Regards,
Harbry Ariza
Database Administrator



________________________________

From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Tommy Tsui
Sent: Monday, 11 December 2006 2:14 PM
To: [login to unmask email]
Subject: [DB2-L] any fast way to unload DB2 user table without TOOLS
(db2 replatform)



My Boss ask me to unload all user table from DB2 (with load statment and
data) and then replatfrom to open sybase IQ.
Anyone have idea to do it fastest?

many thanks

tommy
------------------------------------------------------------------------
--------- Welcome to the IDUG DB2-L list. To unsubscribe, go to the
archives and home page at http://www.idugdb2-l.org/archives/db2-l.html.
From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences
at http://conferences.idug.org/index.cfm


_______________________________________________________________________________________

The information transmitted in this message and its attachments (if any) is intended
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any action in reliance
upon this information, by persons or entities other than the intended recipient is
prohibited.

If you have received this in error, please contact the sender and delete this e-mail
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or distribute
the information contained in this e-mail and any attached files, with the permission
of the sender.

This message has been scanned for viruses with Symantec Scan Engine and cleared by
MailMarshal.
_______________________________________________________________________________________

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Tsui Yuk Kai

Re: any fast way to unload DB2 user table without TOOLS (db2 replatform)
(in response to harby ariza)
Sorry I am using HOST DB2 V7...I have to unload all data and structure
through the DB2 utility.

On 12/11/06, Tommy Tsui <[login to unmask email]> wrote:
>
>
> My Boss ask me to unload all user table from DB2 (with load statment and
> data) and then replatfrom to open sybase IQ.
> Anyone have idea to do it fastest?
>
> many thanks
>
> tommy
>

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm