By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,485 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,485 IT Pros & Developers. It's quick & easy.

Update 'db cfg' to all servers via script

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.