Analysis: Oracle Database Information on Windows

(imported topic written by Lee Wei)

Out of sheer interest and curiousity, I created this Analysis to retrieve information about installed Oracle databases on Windows boxes.

Note the following:

  • I will probably include a few other statements to check for Installed Oracle Clients. Right now, it is only checking for Servers.
  • Another property of interest might be the TNSListeners running on each box.
  • The attached export is from BES 6.0. If you need to create this in a 5.1 environment, you will have to open the file and past the Managed Properties in manually. In 6.0, it is a simple import.

Let me know if there are any other attributes of interest.

(imported comment written by SystemAdmin)

Maybe I am missing it but where is the attachment with the Analysis?

(imported comment written by Lee Wei)

Hmm, the link is sometimes there, and sometimes not.

Not sure if it has to do with whether you are logged in…

(imported comment written by SystemAdmin)

Thanks Lee Wei, the attachment appeared after I logged in.

I think I was logged in before but not positive. If anyone else has similar problems and can’t see the attachment after logging in please post.

(imported comment written by frankc91)

This analysis is excellent. Is it possible to also add a property to this analysis to report on Oracle client version? If you run “SQLPLUS -v” it will report the actual version, but I was looking to see if this can be done natively within a BES property using registry or something else.

(imported comment written by SystemAdmin)

IS it possible to add the location and IP propeties to this as we have Oracle running at multiple locations?

(imported comment written by SystemAdmin)

I amde an attempt to add the propeties to your xml file myself. I used notepad as the editor I hope this is OK. Is there a way to test this before I import this into BF? Attached is my attempt at this. Try not to LOL to hard.

(imported comment written by Patrice_Borne91)

I am new to BigFix, but I have a lot of experience with Oracle.

The only reliable way to know what version of Oracle is running on the server is by asking Oracle directly. I don’t know yet how to do this with the BigFix client, but here is how you can do it (on windows but you can use the same approach on Unix) with a script.

First, you need a text file that contains the following query:

select * from v$version;

exit

Let’s call it version.sql

Then, the command to run it (assuming that the BigFix client has access to sqlplus and all the libraries needed) is:

sqlplus -s /@ @version.sql

Then, on my installation, I get the following result:

BANNER

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

PL/SQL Release 10.2.0.1.0 - Production

CORE 10.2.0.1.0 Production

TNS for 32-bit Windows: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

Checking values in the registry or in the path to the oracle executable is not reliable.

Now, if someone could build a sample fixlet to implement this, that would be neat.

(imported comment written by sthull)

Hi Patrice,

It would not be difficult to do this in a BES Task, but we wouldn’t want to create a task that requires the oracle id and password because then it would be visible in plain text in one of our files on the client. Is there a way we can do this query using NT Authentication? If the SYSTEM account has access, that would work, or we could even use the credentials of the current user if needed.

Regards,

Steve

(imported comment written by rola91)

Well, come here to learen more about oracle.