473,899 Members | 3,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11465
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...@gmai l.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...@gmai l.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.indiv idual.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.indiv idual.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2034
by: Chris Jones | last post by:
I would like to find a utility that can scan through an existing Sql Server 2000 database and create scripts to re-insert/re-populate the data into another DB with the same table structures. Like a back-up utility. Can anyone recommend one (or tell me which ones to avoid)? I would like one that takes dependencies between tables into consideration. Thanks
4
4009
by: Mark | last post by:
BEGINNER QUESTION I have a table which has a compound primary key consisting of two columns. One of these columns is a foreign key which is generated in another table by an identity. I want to be able to generate the other primary key column value automatically when an insert occurs but assume that I cannot use an identity because it would have to be unique for this table.
12
2519
by: Martin_Hurst | last post by:
Has some one come up with a similar type script that could be used in a Postgresql database? The script below was created for a SQLServer database. Thx, -Martin ++++++++++++++++++++++++++++++++++++++ http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci913717,00.html In the early stages of application design DBA or a developer creates a data
7
2034
by: timasmith | last post by:
Hi, I have this app which is relatively database independent. I would like to serve the smallest scale (MS Access) up to the largest database server (Oracle). I recoginize that I will need to write database specific code for Oracle i.e. generate the next number from a sequence. For the rest I pondered this idea...
7
2066
by: mutemode | last post by:
Help again please, I need to insert rows into a table from another table. The tables are identical column wise except the table im inserting from does not have a primary key value. On insert I need to generate a primary key that is consecutive based on the table im inserting into. Also the table im inserting into does not have a identity column. Much appreciated.
3
1359
by: Patrick.O.Ige | last post by:
Hi guys, Is there any free stuff to generate DAL code out there? Thanks in advance
1
1614
geon
by: geon | last post by:
Hi! I have a table I'm using as a stack to pop rows from. (The data in the stack is precomputed for efficiency and reliability.) There are a lot of duplicate rows in this table (hundreds or thousands of identical rows), but they are all inserted with a regular insert statement. I have optimized it by using the multiple row insert syntax: INSERT INTO TableName (Col1, Col2) VALUES ("Some value", "Another value"), ("Some value",...
2
3756
by: lenygold via DBMonster.com | last post by:
Hi Everebody: I have a table: CREATE TABLE CROSS_REFERENCE (ROW# INTEGER NOT NULL ,KEY_WORD CHAR(16) NOT NULL ,QUERY_DESCR VARCHAR(330) NOT NULL ,PRIMARY KEY (ROW#,KEY_WORD)); It is a cross reference table to my CATALOG Table based on key words.
1
2654
by: EJO | last post by:
with sql 2000 enterprise Trying to build a stored procedure that will take the rows of a parent table, insert them into another table as well as the rows from a child table to insert into another table and be able to maintain the relationships between the parent/child rows of the new records. Something like old_id new_id
0
9997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10863
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10971
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5887
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4720
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4300
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.