Hi,
I use SQL to build the export-statements:
Select 'EXPORT TO /Export/' ||
-- Filename is TABSCHEMA_TABNAME.IXF
rtrim(TABSCHEMA) || '_' || TABNAME || '.ixf OF IXF ' ||
case when TABSCHEMA || TABNAME in
(Select TABSCHEMA || TABNAME from SYSCAT.COLUMNS
WHERE TYPENAME in ('BLOB', 'XMLCLOB', 'CLOB'))
-- LOBs to subdirectory /Export/BINARY/
then ' LOBS TO /Export/BINARY/ LOBFILE ' ||
-- LOB-Filename is TABSCHEMA_TABNAME
rtrim(TABSCHEMA) || '_' || TABNAME ||
' MODIFIED BY lobsinfile '
ELSE '' end ||
'MESSAGES Export_DB.log SELECT * FROM ' ||
rtrim(TABSCHEMA) || '.' || TABNAME || ';' as export
from SYSCAT.TABLES
-- don't forget to change the schema here
WHERE TABSCHEMA ='DB2INST1' and TYPE= 'T'
Just have fun with SQL ;)
Mit freundlichen Grüßen / Kind Regards
Wolfgang Domnick
Vitanet GmbH
W.[Email address protected]
www.vitanet.de
-----Ursprüngliche Nachricht-----
Von: ajay [mailto:db2udbdba-ezmlmshield-x93810436.[Email address protected]
Gesendet: Freitag, 25. Februar 2005 08:27
An: LazyDBA Discussion
Betreff: Exporting all the tables in a Schema
Hi all,
I am trying to solve a small problem here. I want to export all
the tables in a schema to flat files. Is there any way to do it??
Regards,
Ajay Joy
Tata Consultancy Services Limited
Mailto: ajay.[Email address protected]
Website: http://www.tcs.com
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page