Generating the Insert Scripts for Table in DB2
Question posted by: Rahul Babbar
(Guest)
on
January 21st, 2008 09:55 AM
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
6
Answers Posted
On 21 Sty, 10:48, Rahul Babbar <rahul.babb...@gmail.comwrote:
Quote:
Originally Posted by
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
On Jan 21, 3:04 pm, "Marcin 'frodo2000' Molak" <frodo2...@gmail.com>
wrote:
Quote:
Originally Posted by
On 21 Sty, 10:48, Rahul Babbar <rahul.babb...@gmail.comwrote:
>
>
Quote:
Originally Posted by
Is there any way to generate the Insert scripts for a table in DB2?
Is there any db2 command for the same?
>
Quote:
Originally Posted by
I had know about a few Oracle Clients which had such utility(like PL/
SQL developer/ TOAD).
>
Quote:
Originally Posted by
I was just wondering if there is any utility for the same in DB2.
>
Quote:
Originally Posted by
Thanks
>
Quote:
Originally Posted by
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
Rahul Babbar wrote:
Quote:
Originally Posted by
On Jan 21, 3:04 pm, "Marcin 'frodo2000' Molak" <frodo2...@gmail.com>
wrote:
Quote:
Originally Posted by
>On 21 Sty, 10:48, Rahul Babbar <rahul.babb...@gmail.comwrote:
>>
Quote:
Originally Posted by
>>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
"Serge Rielau" <srielau@ca.ibm.comwrote in message
news:5vjk4kF1mks53U1@mid.individual.net...
Quote:
Originally Posted by
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.
On Jan 21, 9:12*pm, "Mark A" <nob...@nowhere.comwrote:
Quote:
Originally Posted by
"Serge Rielau" <srie...@ca.ibm.comwrote in message
>
news:5vjk4kF1mks53U1@mid.individual.net...
>
Quote:
Originally Posted by
What's wrong with EXPORT/IMPORT (or LOAD)?
Running INSERT-Scripts seems liek a terribly inefficient way to go about
this....
>
Quote:
Originally Posted by
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
>"Rahul Babbar" <rahul.babbar1@gmail.comwrote in message
Quote:
Originally Posted by
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.
|
|
|
What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 197,050 network members.
Top Community Contributors
|