473,795 Members | 2,922 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running the same script across multiple DB2 databases, instances and servers

We have a requirement to run a query on all of the DB2 databses on a
regular basis.

Obviously, doing this manually is going to be a waste of several
people's time.

The ideal solution would be to run a process from a workstation.

If this was a Sybase database, we could use ISQL in command mode, using
a command string like
isql -S target_server -U query-login -P query-passwrod -I script.sql -O
server_YYYYMMDD .out

We'd then have another process that would collate the output files and
perform the analysis needed.

Is there a similar facility for DB2?

I'd like to canvass everyone for suggestions or how they do similar
operations.

Nov 12 '05 #1
1 1800
In article <11************ **********@g49g 2000cwa.googleg roups.com>,
byrocat (bd******@sympa tico.ca) says...
We have a requirement to run a query on all of the DB2 databses on a
regular basis.

Obviously, doing this manually is going to be a waste of several
people's time.

The ideal solution would be to run a process from a workstation.

If this was a Sybase database, we could use ISQL in command mode, using
a command string like
isql -S target_server -U query-login -P query-passwrod -I script.sql -O
server_YYYYMMDD .out

We'd then have another process that would collate the output files and
perform the analysis needed.

Is there a similar facility for DB2?

I'd like to canvass everyone for suggestions or how they do similar
operations.


Hi,

You can use a cripting language to get this doen or just use plain
BAT files. I use a REXX script to get this kind of things done. You
can download several REXX interpreters for free. I prefer ooRexx
which you can download from
http://sourceforge.net/project/showf...roup_id=119701

You can also use a .bat file with commands like this:

db2 connect to %1 user %2 using %3
db2 -tf script.sql > %1_YYMMDD.out
db2 connect reset

and run it with 'runsql dbname user password' froma DB2 Command
window.

You need to catalog the database and node before running these
commands but that's a one-time job.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2539
by: Patrick | last post by:
Hi, The company's database has multiple schema. If I want to modify a stored procedure, which is saved as a script (something like abc.sql), I opened that script in Query Analyser, made the changes, tested in Development Schema and saved it. After that, if I want to make those changes to other schemas, of course I can select different schemas and run the script. If there are many many schema, there is a likelihood that we miss one...
11
5322
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings should configured to work, how memory is shared or not, etc. I can not seem to find any good links to this information. Thanks, Mike
3
1820
by: Patrick Fisher | last post by:
What are the implications of running a MS-Access BE and an SQL-Server BE on the same Terminal Server? Assuming that the TS can handle the load are there any other issues? Thanks Patrick
1
6311
by: RichardF | last post by:
Is it possible to run a single query that pulls data from multiple tables in multiple databases, perhaps also from multiple SQL Servers? Any input would be appreciated. Thanks! RichardF
11
21008
by: Clark Stevens | last post by:
I just finished a WinForms app in VB.NET. I want to allow the user to be able to run multiple instances of the program like you can with Notepad and Wordpad. The way it is now, once I run the executable I can not run another instance as long as the first instance is running. How can I change this behavior? Thanks.
3
2604
by: Michel | last post by:
Hi, I wrote an app in .Net and I whant only 1 instance of this app open for the user; the user open my app, do some works and try to open another instance of my app, I whant to show a message to user to inform him that only one instance is permit and then close the second instance after that. I am able to do this when the user run the application on his PC whit this : Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName) ...
2
4877
by: Dave Hughes | last post by:
Just noticed something rather annoying after upgrading my test box (a Linux server running DB2 UDB v8 for LUW) to fixpak 11 (for reference it was previously on fixpak 7). In the past I've relied heavily on the ability to start multiple long-running SQL scripts in the background and have them all run in parallel. Unfortunately, it seems that somewhere between fixpak 7 and fixpak 11 something has been fixed / broken which prevents more...
4
3149
by: Mike | last post by:
Class A public objX I want to create 2 or more instances of Class A and have the same value for objX in all instances. Instance1 of Class A Instance2 of Class A Instance3 of Class A
6
5892
by: Ted | last post by:
I am construvcting a number of databases, some of which contain sensitive data and most of which do not. I am attempting to handle the security issues involved in protecting sensitive data in part by putting it in its own database. If the sensitive data is in a database called d_SensitiveData, and in that database there is a table called 't_A' (I know, not very informative, but this is only a trivially simple example :-), and I have a...
0
9672
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
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
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...
0
10001
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...
0
9043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5437
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
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
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.