473,748 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 - check if product installed on Solaris/AIX/HPUX

pwu
Hi,

I am doing an automated scan of a large number of UNIX machines which
can be Solaris, AIX or HPUX.

I want to find out for a machine via a script if:
1) DB2 is installed?
2) If installed what version is installed

What file/process/user can I check to achieve this?

Thanks for any help.
Oct 10 '08 #1
4 12437
On Oct 10, 11:37*am, p...@qantas.com .au wrote:
Hi,

I am doing an automated scan of a large number of UNIX machines which
can be Solaris, AIX or HPUX.

I want to find out for a machine via a script if:
1) DB2 is installed?
2) If installed what version is installed

What file/process/user can I check to achieve this?

Thanks for any help.
you can write a script using db2ls and db2level ...command
Oct 10 '08 #2
DB2 v9 is default installed in /opt, older version may have a default
install in /usr. You might have a custom install directory.
you might check these directories for the occurence of the file db2level

find /opt /usr -name db2level -print
/opt/IBM/db2/V9.5/bin/db2level
/usr/opt/db2_08_01/bin/db2level
/usr/opt/db2_08_01/bin64/db2level
/usr/opt/db2_08_01/das/bin/db2level
/usr/opt/db2_08_01/das/bin64/db2level

this shows i have v9.5 and v8.1 db2 products installed on my AIX machine

<pw*@qantas.com .auwrote in message
news:bc******** *************** ***********@p10 g2000prf.google groups.com...
Hi,

I am doing an automated scan of a large number of UNIX machines which
can be Solaris, AIX or HPUX.

I want to find out for a machine via a script if:
1) DB2 is installed?
2) If installed what version is installed

What file/process/user can I check to achieve this?

Thanks for any help.
Oct 10 '08 #3
I can only speak for AIX - but it might work for HP-UX and Solaris
also...

In the directory /var/db2 (if it exists - if not DB2 should not be
installed)
you'll find a file named "global.reg "
It contains all informations about installed software and instances.
It is a binary file - so a bit hard to get informations from...

First of all: If it exists, this is an indicator that DB2 is installed
- or was installed.

You can use "strings" to look for pathnames in this file and parse
them and check if it contains a subdirectory "bin" and a program
"db2ilist" or "db2greg". The last one gives readable output for the /
var/db2/global.reg
This you can use to obtain the software installed (might be deleted)
and the instances with their software level.

The informations about instances should be actual, the ones about
installed software not - we delete manually "old" fixpack versions and
so they stay in this file. Check the directories if they are
populated.

Keep in mind, that you can have several versions of DB2 and fixpack
levels installed and active.
For each instance you'll find the level inside /var/db2/global.reg
On Oct 10, 8:37*am, p...@qantas.com .au wrote:
Hi,

I am doing an automated scan of a large number of UNIX machines which
can be Solaris, AIX or HPUX.

I want to find out for a machine via a script if:
1) DB2 is installed?
2) If installed what version is installed

What file/process/user can I check to achieve this?

Thanks for any help.
Oct 10 '08 #4
pw*@qantas.com. au wrote:
Hi,

I am doing an automated scan of a large number of UNIX machines which
can be Solaris, AIX or HPUX.

I want to find out for a machine via a script if:
1) DB2 is installed?
2) If installed what version is installed

What file/process/user can I check to achieve this?

Thanks for any help.
The way as defined by IBM:

/usr/local/bin/db2ls -c

This will give you an output that should be relatively easily parsed by
code. If db2ls is not found, then DB2 9 or later is not installed (or at
least, not installed properly).
Oct 10 '08 #5

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

Similar topics

2
4120
by: Stephen Boulet | last post by:
I'm looking to install python on hpux 10.2. Anyone know of a site hosting a depot file of a recent python? Thanks. Stephen
1
4485
by: Paul | last post by:
Hi: I am totally new in Sun Solaris. I am not sure someone would like to tell me how to rellocate Sun Solaris disk space where oracle installed? I installed Oracle 8i in Sun Solaris and set Oracle main table space called TABLES in unix disk space /dpp/live01. From the following, it's quite easy to see that the disk space of /dpp/live01 is 97%.Therefore how can i move some disk space of SWAP to /dpp/live01 without losing
1
4349
by: Praveen | last post by:
Hi All, I'm new to DB2, I have installed DB2 UDB V8 on Solaris machine. And i tried to create a stored proc.But, gives the following error.. -- LOG FILE P2093405.log FOR PROCEDURE DB2INST1.PROC1 -- DB2_SQLROUTINE_PREPOPTS= -- PREP/BIND MESSAGES FOR
10
14051
by: eyh5 | last post by:
Hi, My C code (running on Soalris Unix) has some "segmentation fault" that I wish to use purify to do it. I poked around the web, and found some information about adding some lines in a Makefile file to use purify. However, my code is a rather simple single-source C program, and I didn't write a Makefile for it. I'm wondering if anybody can tell me which commands are to be entered at the Unix prompt to use purify. And, I don't know if...
2
8125
by: Jak Sparrow | last post by:
What are some good ways to programmatically check for software already installed on a computer? For example, to check a version of Internet Explorer, a program can check the registry for the following value: Version, and see if the version is 6.0 or not. However, not all installed software can be checked as easily. For example, Windows Media Player 9 has the following registry path:
10
8035
by: Dieter Pelz | last post by:
Hallo, what is the best way to check the installation of mfc80 and vcrt sidebyside assemblies? Best Regards, Dieter Pelz
4
10563
by: Denny | last post by:
I currently use C compiler on HP-UX B.11.00 machine but I don't know how to check its version. I had used cc --version and cc -version command. Of course it didn't show a message which I wanted... How to check C compiler version?? Best regards. Denny...
0
1808
by: mg | last post by:
When make gets to the _ctypes section, I am getting the following in my output: building '_ctypes' extension creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes/libffi creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes/libffi/src
3
2331
by: amit2781 | last post by:
I am trying to build the my project on HPUX (HP-UX oscar B.11.11 U 9000/800 741028561 unlimited-user license) which access the Mysql library. But it is giving error as : Error : MySQL51/lib/hpux/libmysqld.a(client.o) - shared library must be position independent. Use +z or +Z to recompile. I am using this option in building: aCC -Wl,+s,-E,+vnocompatwarnings -z -g0 -b -Wl,-Bsymbolic. I also tried using the +Z, +z, also added...
0
9548
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
9374
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
9325
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
9249
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
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
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
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
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.