473,503 Members | 6,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update 'db cfg' to all servers via script

nek
Greetings,

Platform is W2K, DB2 V8.1 FP2.

We have a large number of servers in different cities and I would like
to occasionally update 'db cfg' parameters whenever needs arise.

Instead of connecting to each server (via remote desktop connection)
to do this, is it possible to write script containing 'db2 update db
cfg for dbname..' and other info such as 'connecting to IP addresses
of all servers' etc.. so that change can be applied to all nominated
servers in ONE hit?

Appreciate any suggestions.
Nov 12 '05 #1
4 3389
Ian
nek wrote:
Greetings,

Platform is W2K, DB2 V8.1 FP2.

We have a large number of servers in different cities and I would like
to occasionally update 'db cfg' parameters whenever needs arise.

Instead of connecting to each server (via remote desktop connection)
to do this, is it possible to write script containing 'db2 update db
cfg for dbname..' and other info such as 'connecting to IP addresses
of all servers' etc.. so that change can be applied to all nominated
servers in ONE hit?


I'll skip the question on why you'd want to change a DB config parameter
on all of your instances databases.

Anyway, provided that all of your instances and databases are cataloged
on one system, you should be able to write the following commands in a
script:
attach to <an_instance> [user <id> using <pw>]
update db cfg for <db> using ...
[repeat for other databases in this instance]
detach

[repeat all steps for other instances/databases
You can see the progress of this by running 'db2 -v yourscript'

Good luck,

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #2
nek
Hi Ian,

Your suggestion prompts me to think what I've been doing.

I've been connecting to various databases remotely in the past. Just
never come to bundle them in a script with user/pwd.

You're right, once I catalogue all nodes/databases, I was able to
include connections to all servers in the scripts and update 'db cfg'
parms as needed.

Thanks for this.

PS.
The reason why I need to change 'db cfg' parms is that all servers
have identical h/w configuration. They run virtually the same s/w such
as DB2 UDB V8.1 and other reporting s/w.

They're functionally identical but operate independently. It is likely
when it comes to configure, tune SQL etc., they all require the same
change.
Ian <ia*****@mobileaudio.com> wrote in message news:<3f**********@corp.newsgroups.com>...
nek wrote:
Greetings,

Platform is W2K, DB2 V8.1 FP2.

We have a large number of servers in different cities and I would like
to occasionally update 'db cfg' parameters whenever needs arise.

Instead of connecting to each server (via remote desktop connection)
to do this, is it possible to write script containing 'db2 update db
cfg for dbname..' and other info such as 'connecting to IP addresses
of all servers' etc.. so that change can be applied to all nominated
servers in ONE hit?


I'll skip the question on why you'd want to change a DB config parameter
on all of your instances databases.

Anyway, provided that all of your instances and databases are cataloged
on one system, you should be able to write the following commands in a
script:
attach to <an_instance> [user <id> using <pw>]
update db cfg for <db> using ...
[repeat for other databases in this instance]
detach

[repeat all steps for other instances/databases
You can see the progress of this by running 'db2 -v yourscript'

Good luck,

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 12 '05 #3
One thing you could also check since you're on windows is the wmi / .mof
files.
http://publib.boulder.ibm.com/infoce...help/index.jsp
search : .mof
and/or
search : wmi

There are related samples (scripts) like
updatedbcfg.vbs and
listsvr.vbs

There is a procedure to compile the db2 related .mof files.
You need to do this step before going any further.

If you think it's a good idea to pursue this avenue and all your needs
are covered by the supported objects/methods, i suggest you also
get the MS WMI SDK. It contains a WMI Object Browser.

You can navigate supported objects and use the gui instead
of db2set for example.

Wether you do it using wmi stuff or db2 command files, you
need a list of catalogged systems nodes/databases.

PM
"nek" <ne*****@hotmail.com> a écrit dans le message de
news:1a**************************@posting.google.c om...
Greetings,

Platform is W2K, DB2 V8.1 FP2.

We have a large number of servers in different cities and I would like
to occasionally update 'db cfg' parameters whenever needs arise.

Instead of connecting to each server (via remote desktop connection)
to do this, is it possible to write script containing 'db2 update db
cfg for dbname..' and other info such as 'connecting to IP addresses
of all servers' etc.. so that change can be applied to all nominated
servers in ONE hit?

Appreciate any suggestions.

Nov 12 '05 #4
nek
This alternative saves me from re-inventing the wheel. I'll certainly
explore it further.

Thanks PM!

"PM \(pm3iinc-nospam\)" <PM(pm3iinc-nospam)@sympatico.ca> wrote in message news:<tW*********************@news20.bellglobal.co m>...
One thing you could also check since you're on windows is the wmi / .mof
files.
http://publib.boulder.ibm.com/infoce...help/index.jsp
search : .mof
and/or
search : wmi

There are related samples (scripts) like
updatedbcfg.vbs and
listsvr.vbs

There is a procedure to compile the db2 related .mof files.
You need to do this step before going any further.

If you think it's a good idea to pursue this avenue and all your needs
are covered by the supported objects/methods, i suggest you also
get the MS WMI SDK. It contains a WMI Object Browser.

You can navigate supported objects and use the gui instead
of db2set for example.

Wether you do it using wmi stuff or db2 command files, you
need a list of catalogged systems nodes/databases.

PM
"nek" <ne*****@hotmail.com> a écrit dans le message de
news:1a**************************@posting.google.c om...
Greetings,

Platform is W2K, DB2 V8.1 FP2.

We have a large number of servers in different cities and I would like
to occasionally update 'db cfg' parameters whenever needs arise.

Instead of connecting to each server (via remote desktop connection)
to do this, is it possible to write script containing 'db2 update db
cfg for dbname..' and other info such as 'connecting to IP addresses
of all servers' etc.. so that change can be applied to all nominated
servers in ONE hit?

Appreciate any suggestions.

Nov 12 '05 #5

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

Similar topics

2
1437
by: Santosh | last post by:
Hi, I have a script running which fails when it tries to execute an Update query, but when i try to run the query from the SQLQueryAnalyzer it runs fine. Can somebody try and explain this...
2
1455
by: nek | last post by:
Seasons greetings, Platform is W2K SP4, DB2 V8.1 FP2. A few days ago I posted the question to globally 'update db cfg' for all servers which could be done via a script thanks to Ian and PM's...
0
1159
by: chanc | last post by:
The article "Monitoring WebSphere Applications on DB2 Servers" by Rahul Kitchlu and Jason Shayer says about 2 ways for setting client information, which including client application name. I have...
11
5820
by: Issam | last post by:
Hello all, I am trying to change a db2 configuration parameter from within my jdbc code. When I use the following: Statement stmt2 = con.createStatement(); stmt2.executeUpdate( "update db cfg...
9
2334
by: mike_li | last post by:
We are considering to update from V8.1 Fixpak 8 to Fixpak 9. Operating System Information: OSName: AIX NodeName: mdxxx01, mdxxx02, mdxxx03, mdxxx04 Version: 5 Release: 2 64 bits and DB2...
3
8901
by: RSH | last post by:
Hi, I have a situation in where i have two instances of SQL server, the first is our Production Environment, the second is our Development environment. Both servers contain the same databases...
0
1544
by: ruediger.papke | last post by:
Hi, I have an installation DB2 V9.1 on suse linux. because of an java error when trying to create the systools catalog i'm going to change the JDK-PATH with no success db2 get admin cfg .......
0
9818
NeoPa
by: NeoPa | last post by:
Introduction : I have come across a problem, on a number of occasions, where PCs under my control fail to load new updates successfully. This is true whether they are attempting to apply via the...
0
7291
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,...
0
7357
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...
0
7468
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...
0
5598
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,...
1
5023
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...
0
3180
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...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
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 ...
1
748
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.