This discussion is archived
7 Replies Latest reply: Oct 8, 2012 10:36 AM by Karan Kukreja RSS

How to find OS version through Sql

user-Keen Explorer
Currently Being Moderated
Is there any table which contain operating system name and it's version for SR( Oracle Metalink) purpose.

thanks.
  • 1. Re: How to find OS version through Sql
    860213 Pro
    Currently Being Moderated
    Below command will give you good output for most of the OS:-

    select dbms_utility.port_string from dual;

    Thanks,
    JD
  • 2. Re: How to find OS version through Sql
    user-Keen Explorer
    Currently Being Moderated
    JD

    This command is returning the value as Operating system but the version of OS is not available,

    Pls Advice
  • 3. Re: How to find OS version through Sql
    860213 Pro
    Currently Being Moderated
    This command is returning the value as Operating system but the version of OS is not available,
    I don't think you can more then output from oracle database, Wait for response from other people.

    Also i was just wondering what could be requirement to know the version from database only?

    Thanks,
    JD
  • 4. Re: How to find OS version through Sql
    672074 Newbie
    Currently Being Moderated
    To get the OS Version you can execute below commands,

    Hi,
    You can get the OS version by below commands :

    SELECT PRODUCT, VERSION FROM SYS.PRODUCT_COMPONENT_VERSION;

    PORT_STRING
    --------------------------------------------------------------------------------
    IBMPC/WIN_NT-8.1.0



    SQL> SELECT PRODUCT, VERSION FROM SYS.PRODUCT_COMPONENT_VERSION;

    PRODUCT                                                                          VERSION
    -------------------------------------------------------------------------------- -------------
    NLSRTL                                                                           11.2.0.2.0
    Oracle Database 11g Enterprise Edition                                           11.2.0.2.0
    PL/SQL                                                                           11.2.0.2.0
    TNS for 32-bit Windows:                                                          11.2.0.2.0

    SQL> SELECT RTRIM(SUBSTR(REPLACE(BANNER,'TNS FOR ',''),1,INSTR(REPLACE(BANNER,'TNS FOR ',''),':')-1)) OS
    FROM V$VERSION
    WHERE  BANNER LIKE 'TNS FOR %' ;

    OS
    --------------------------------------------------------------------------------
    +32-bit Windows+
  • 5. Re: How to find OS version through Sql
    Mark D Powell Guru
    Currently Being Moderated
    But the information does not seem accurate enough. Looking at the output of product_component_version for AIX all I see is that the OS is AIX. The version information is not included and there is a huge difference between XP, Windows 2003, and Windows 2008.

    On a UNIX platform uname can be used to see the OS version but where you can see this via pure sql is something I do not know.


    HTH -- Mark D Powell --
  • 6. Re: How to find OS version through Sql
    jgarry Guru
    Currently Being Moderated
    If you are doing it for metalink, why not use the tools they supply, like rda? The tools acknowledge not everything should be done in sql, so use perl.

    Search metalink for:
    working effectively with support rda

    Note particularly Working with Support - MOSSOS [ID 1265130.1] and Working Effectively With Support Best Practices [ID 166650.1]
  • 7. Re: How to find OS version through Sql
    Karan Kukreja Journeyer
    Currently Being Moderated
    Hi User,

    If you looking this information to update in the SR, kindly use the uname command to check the OS .. Also if its SEV1 , you should simply ask your sysadmin to tell you your OS version and go ahead to raise the SR.


    formore details issue the command :
    man uname 
    HTH
    kk

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points