Pulling Oracle version

(imported topic written by olsonc5891)

I am VERY new to this. I am trying to find out the version of Oracle client installed on my machines. I’ve read some posts that were from 2007 but thinking there might be something easier now. I found some code that might work but I’m not sure how to implement it in bigfix. Is it a task? An analysis? I see all this code but I’m not sure where to apply it. Here is what I’ve found in the registry that points to the current version.

HKLM\SOFTWARE\ORACLE\OracleMTSRecoveryService\Setup\Current Version (Key is Version)

SO

I should be able to somehow use the following:

values “CurrentVersion” of keys “HKLM\SOFTWARE\ORACLE\OracleMTSRecoveryService\Setup”

Now, what do I do with it?

Please help the newbie. : )

(imported comment written by olsonc5891)

This won’t work. It doesn’t provide the right value. I can get this value by searching for a folder or text in a file. Any insight on that please?

C:\oracle\ora10\inventory\PatchSets21\oracle.patchset.db\10.2.0.3.0

Where 10.2.0.3.0 is the value required and also the folder name.

(imported comment written by jessewk)

I think you will find the answer you are looking for, including content you can import, in these two thread:

http://forum.bigfix.com/viewtopic.php?id=15

http://forum.bigfix.com/viewtopic.php?id=887

If you want to create a property based on the folder name, you can use something like this:

names whose (exists it as version) of folders of folder “C:\oracle\ora10\inventory\PatchSets21\oracle.patchset.db”

However, you’ll probably want to look up the folder location based on oracle registry keys rather than hardcoding the path.

(imported comment written by olsonc5891)

Thank you but I can’t find anywhere in the registry that indicates the same path to the folder name I require so am sticking to the folder location. I’m getting a bad synatx error trying to create the property. I don’t want to be spoon fed but I am not sure of the syntax. Is there documentation I can read that will give me some insight into the relevance?

names whose (exists it as “10.2.4.0”) of folders of folder “C:\oracle\ora10\inventory\PatchSets21\oracle.patchset.db”

Thank you,

Chris

(imported comment written by NoahSalzman)

If you want the name returned do

names whose (it is “10.2.4.0”) of …

If you want true/false returned do

exists names whose (it is “10.2.4.0”) of …

(imported comment written by jessewk)

Doesn’t this work?

names whose (exists it as version) of folders of folder “C:\oracle\ora10\inventory\PatchSets21\oracle.patchset.db”

The part “whose (exists it as version)” will make sure that only folder names that have a string that is a valid version format will be returned?

If you want to check for a specific version use Noah’s suggestions.

You can find relevance documentation at http://support.bigfix.com/fixlet

(imported comment written by olsonc5891)

Noah, Jess, Thank you both very much for your suggestions. This worked. Simple for you but very exciting for me. I have a lot of research and studying to do but you really helped me out on this one as we needed this information quickly.

Thanks again!

Chris

(imported comment written by olsonc5891)

Of course, now they want more.

I need to provide them an output of all the folders in that directory. For example, one server may have 10.2.0.3.0 and 10.2.0.4.0 both appearing as folders within C:\oracle\ora10\inventory\PatchSets21\oracle.patchset.db. So basically, I have to show the name of every folder in the directory C:\oracle\ora10\inventory\PatchSets21\oracle.patchset.db. On some servers, the directory is on the “D:” drive. (sigh)

I am going to do some digging on my own in the link you sent, but if you’ve got an easy answer, it would be appreciated.

Thanks,

CO

(imported comment written by olsonc5891)

I used the following.

names of folders of folder “C:\oracle\ora10\inventory\PatchSets21\oracle.patchset.db”

It shows up in the properties of the nodes I ran it on but the results just shows . I should be able to run a report on that property to get the listing but I’m guessing it won’t show in the results page.

Thanks,

CO

(imported comment written by MrFixit)

Here is what I’m using to get the path to where the client has an XML file I have used to pull specifics from.

Note it is possible to have multiple results for this depending on your install base. I also found that uninstalls leave things behind so that is why I look for “REMOVED”

Q: ((item 0 of it as string & “” & item 1 of it) of (((node values of it, “inventory\ContentsXML\comps.xml”) of attributes “LOC” of child nodes whose (node name of it = “HOME” AND node value of attribute “LOC” of it as lowercase contains “oracle” AND not exists attribute “REMOVED” of it) of xpaths “INVENTORY/HOME_LIST” of xml document of file ((value “inst_loc” of key “HKLM\Software\Oracle” of registry as string) & “\ContentsXML\inventory.xml” )))) as string as lowercase

A: d:\oracle\product\10.2.0\client_1\inventory\contentsxml\comps.xml

Oracle is a complicated product so I’m always interested finder better ways to audit it. One of the most difficult is that they frequently do not update versions of files when they are replaced as part of a patch.