on 09-08-2008 9:33 PM
How can I delete all the rows from the target table without filling up the db2 logs? I tried checking the box on the target table that says to delete all rows, but our db2 logs end up getting blown out.
Is there another way to empty the table/delete all rows without logging?
Thanks.
Is it possible to delete data from Data Services?
There is an option to "Delete data from table before loading" from DS, but I have to run a Job.
I just want to delete the data from the table target.
How to do that in DS without having to use SQL or scripts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the SQL Command "TRUNCATE". This is a DDL statement that doesn't bother with the actual data (a DML command).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The easiest way I've found is the 'Import from /dev/null..' statement. It performs what is basically is a truncate on the target table.
Unix:
IMPORT FROM /dev/null OF DEL REPLACE INTO schema.table_name
Windows:
IMPORT FROM NUL OF DEL REPLACE INTO schema.table_name
I think it's best to issue it in a script with the sql() function before launching the Data Flow.
Hope this helps.
Regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.