
How to create file during import / export
Hi,
Quote:
> Q1. Is there a better way to move some data from Table A to Table B
> (note that Table B has an additional column i.e. the date the record
> is inserted) and that there's multiple of such tables that I need to
> perform this task.
You can also use INSERT ... SELECT clause to move data between tables within
one database (or between different databases if they are configured as
federated databases).
For example, INSERT INTO tab1 SELECT col1, col2, ..., current date FROM tab2
In this case no additional data file required and performance can be
increased.
Quote:
> Q2. How can I create an error log file should there be error when
> exporting/importing
The export/import utilities allow writing log messages into a file, see the
option "messages" for details.
For logging SQL statements you can also set options in DB2 CLP to write
output in a file.
Best regards, Dmitry
--
http://www.ispirer.com/products/ - Data migration software for IBM DB2,
Oracle and MS SQL Server.
Quote:
> Hi
> I'm currently using UDB DB2 version 7.2 running on WIN2K
> I need to do a scheduled housekeeping i.e to move some data from Table
> A to Table B where Table B schema is the same as Table A except Table
> B has an additional column i.e. the Date the record is inserted into
> Table B.
> The following is what I plan to do by using the DB2 Script center
> where I can schedule the job.
> Step 1. Export the required data using the export command, on error
> create experr.log
> Step 2. If there’s no error in export, import the required data,
> on error create imperr.log
> Step 3. If there’s no error in import, then delete the records,
> on error create delete.log
> Ok, here's where I need ur expertise
> Q1. Is there a better way to move some data from Table A to Table B
> (note that Table B has an additional column i.e. the date the record
> is inserted) and that there's multiple of such tables that I need to
> perform this task.
> Q2. How can I create an error log file should there be error when
> exporting/importing
> That's it for the moment.. I thanked all in advance..
> regards
> lina