469,362 Members | 2,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

Generating the Insert Scripts for Table in DB2

Hi,

Is there any way to generate the Insert scripts for a table in DB2?
Is there any db2 command for the same?

I had know about a few Oracle Clients which had such utility(like PL/
SQL developer/ TOAD).

I was just wondering if there is any utility for the same in DB2.

Thanks

Rahul Babbar
Jan 21 '08 #1
6 10735
On 21 Sty, 10:48, Rahul Babbar <rahul.babb...@gmail.comwrote:
Hi,

Is there any way to generate the Insert scripts for a table in DB2?
Is there any db2 command for the same?

I had know about a few Oracle Clients which had such utility(like PL/
SQL developer/ TOAD).

I was just wondering if there is any utility for the same in DB2.

Thanks

Rahul Babbar
Hi,

If you use windows system you have db2cmd console, for nix family
system you have to add instance information for your user by:
.. /home/inst_owner/sqllib
The you have db2 command for running scripts or using interactive
mode.

What is more you can use DB2 Control Center (db2cc) with command
editor or free IBM Data Studio.

Best,
Marcin Molak

Jan 21 '08 #2
On Jan 21, 3:04 pm, "Marcin 'frodo2000' Molak" <frodo2...@gmail.com>
wrote:
On 21 Sty, 10:48, Rahul Babbar <rahul.babb...@gmail.comwrote:
Hi,
Is there any way to generate the Insert scripts for a table in DB2?
Is there any db2 command for the same?
I had know about a few Oracle Clients which had such utility(like PL/
SQL developer/ TOAD).
I was just wondering if there is any utility for the same in DB2.
Thanks
Rahul Babbar

Hi,

If you use windows system you have db2cmd console, for nix family
system you have to add instance information for your user by:
. /home/inst_owner/sqllib
The you have db2 command for running scripts or using interactive
mode.

What is more you can use DB2 Control Center (db2cc) with command
editor or free IBM Data Studio.

Best,
Marcin Molak
Hi,

I wanted to generate the insert scripts for the data already present
in the table and not run the scripts.

Is there some way?

Thanks

Rahul
Jan 21 '08 #3
Rahul Babbar wrote:
On Jan 21, 3:04 pm, "Marcin 'frodo2000' Molak" <frodo2...@gmail.com>
wrote:
>On 21 Sty, 10:48, Rahul Babbar <rahul.babb...@gmail.comwrote:
>>Hi,
Is there any way to generate the Insert scripts for a table in DB2?
Is there any db2 command for the same?
I had know about a few Oracle Clients which had such utility(like PL/
SQL developer/ TOAD).
I was just wondering if there is any utility for the same in DB2.
Thanks
Rahul Babbar
Hi,

If you use windows system you have db2cmd console, for nix family
system you have to add instance information for your user by:
. /home/inst_owner/sqllib
The you have db2 command for running scripts or using interactive
mode.

What is more you can use DB2 Control Center (db2cc) with command
editor or free IBM Data Studio.

Best,
Marcin Molak

Hi,

I wanted to generate the insert scripts for the data already present
in the table and not run the scripts.

Is there some way?
What's wrong with EXPORT/IMPORT (or LOAD)?
Running INSERT-Scripts seems liek a terribly inefficient way to go about
this....

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jan 21 '08 #4
"Serge Rielau" <sr*****@ca.ibm.comwrote in message
news:5v*************@mid.individual.net...
What's wrong with EXPORT/IMPORT (or LOAD)?
Running INSERT-Scripts seems liek a terribly inefficient way to go about
this....

Cheers
Serge
Most third party tools have this. I used it all the time when I had
DBArtisan at my last job, mostly for small reference tables, and for a shell
of an insert for a new row that had to be scripted for insert into multiple
environments.
Jan 21 '08 #5
On Jan 21, 9:12*pm, "Mark A" <nob...@nowhere.comwrote:
"Serge Rielau" <srie...@ca.ibm.comwrote in message

news:5v*************@mid.individual.net...
What's wrong with EXPORT/IMPORT (or LOAD)?
Running INSERT-Scripts seems liek a terribly inefficient way to go about
this....
Cheers
Serge

Most third party tools have this. I used it all the time when I had
DBArtisan at my last job, mostly for small reference tables, and for a shell
of an insert for a new row that had to be scripted for insert into multiple
environments.
Hi,

Can you name a few of those tools?

Thanks

Rahul
Jan 22 '08 #6
>"Rahul Babbar" <ra***********@gmail.comwrote in message
Can you name a few of those tools?
DBArtisan by Embarcadero
I think that Toad for DB2 will do it (but not sure).

It would not be hard to write a stored procedure to do it yourself.
Jan 22 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Chris Jones | last post: by
7 posts views Thread by mutemode | last post: by
3 posts views Thread by Patrick.O.Ige | last post: by
2 posts views Thread by lenygold via DBMonster.com | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.