473,608 Members | 1,811 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 3399
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*****@mobile audio.com> wrote in message news:<3f******* ***@corp.newsgr oups.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*****@hotmai l.com> a écrit dans le message de
news:1a******** *************** ***@posting.goo gle.com...
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)@sympati co.ca> wrote in message news:<tW******* **************@ news20.bellglob al.com>...
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*****@hotmai l.com> a écrit dans le message de
news:1a******** *************** ***@posting.goo gle.com...
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
1440
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 phenomenon. Any kind of help will be appretiated. thanks,
2
1459
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 responses. I would like to do the same to a file containing plain text that exists on ALL W2K servers which are of identical h/w configuration.
0
1168
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 tried it and it does set client application name. I would like to use db2 governor to control some application. And I found that db2 governor doesn't use client application name. applname in db2 governor cfg is still the Application name, not the...
11
5837
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 for sample using dbheap 800"); stmt2.close(); I get the following exception:
9
2337
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 code release SQL08021 with level identifier 03020106 Informational tokens are DB2 v8.1.1.80, special_13100, U800400_13100,
3
8920
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 but I need to write a utility that can transfer a row of data from the Production to the Development servers. I wrote the code below, which doesn't error...but it doesn't work...no data is updated. This is very odd because I can see that both of...
0
1551
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 .... Java Development Kit Installation Path DAS (JDK_PATH) = AUTOMATIC(/home/dasusr/das/java/jdk)
0
9830
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 Automatic Updates facility built into the OS or whether accessing the MS Update site directly. Reason : The problem is often associated with DLL files not being correctly set up for some reason. Most of the suggested fixes involve registering a...
0
8069
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
8503
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
8488
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
6826
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...
1
6017
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
3972
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
4036
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1339
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.