Selecting a database using an SQL query?

I am writing a tool to collect client configuration information. One of the questions I want to answer is which OS is the customer database.

I have not found a general way to find an OS with SQL, and I cannot create stored procedures in a client database.

If there is a way, it is probably vendor specific.

Suggestions? Thanks in advance.

+5
source share
4 answers

Yes, it will be a specific supplier. For Oracle, you can get it through 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

4- , 9i Solaris (, , TNS Solaris, , - Solaris).

+5

Oracle

SELECT DBMS_UTILITY.PORT_STRING FROM dual;

( Tom)

+3

how about: select platform_name from database v $;

+2
source

sybase ASE and Sybase IQ are the same as sqlserver: select @@ version e.g.

Sybase IQ/12.7.0/090824/P/ESD 7/Sun_Sparc/OS 5.9/64bit/2009-08-24 16:17:12

Adaptive Server Enterprise/12.5.3/EBF 12455 ESD#2/P/Sun_svr4/OS 5.8/ase1253/1904/64-bit/FBO/Wed Mar 23 03:04:04 2005
+1
source

All Articles