I'm writing a tool to gather customer configuration information. One of the questions I want to answer, what OS is the customer database running on.
I haven't found a generic way to find the OS with SQL and I can't create stored procedures on the customer's database.
If there is a way, it's probably vendor specific.
Suggestions? Thanks in advance.
Yes, it will be vendor specific. For Oracle you can obtain it via this query:
SQL> select banner from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for Solaris: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
The 4th row of output shows that my 9i database is running on Solaris (well, it shows that it is running "TNS for Solaris", which implies that the OS is Solaris anyway).
For Oracle, you could use
SELECT DBMS_UTILITY.PORT_STRING FROM dual;
(From Ask Tom)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With