none
What is the winndows version from SSMS I want to find.

Answers

  • SELECT @@VERSION

    will show you the full version of SQL Server and the underlying OS. You can manipulate the string to just show the OS if necessary.

    Friday, January 18, 2013 10:56 AM

All replies

  • SELECT @@VERSION

    will show you the full version of SQL Server and the underlying OS. You can manipulate the string to just show the OS if necessary.

    Friday, January 18, 2013 10:56 AM
  • other option would be to write a CLR function

    http://stackoverflow.com/questions/881844/operating-system-information-from-a-microsoft-sql-server-instance

    using System;
    using System.Data;
    using System.Data.SqlClient;
    using System.Data.SqlTypes;
    using Microsoft.SqlServer.Server;
    
    public partial class UserDefinedFunctions
    {
        [Microsoft.SqlServer.Server.SqlFunction]
        public static SqlString Function1()
        {
            return new SqlString(System.Environment.OSVersion.ToString());
        }
    };

    Regards
    Satheesh

    Friday, January 18, 2013 12:22 PM
  • Hi,

    What is the windows version from SSMS I want to find.


    Answer: Using following statement will give you results including OS details

    SELECT @@VERSION



    Please help and appreciate others by using these features: "Propose As Answer", "Vote As Helpful" and "Mark As Answer"

    Waqas

    MS(SPM), MS(E&F), MCP, MCT, MCTS, MCITP, MCSE, MCPD, MCSD, MCDBA , Author
    Twitter: @waqas8777
    Linked In: http://www.linkedin.com/in/waqasm1

    • Proposed as answer by Waqas M Thursday, January 24, 2013 12:24 PM
    Sunday, January 20, 2013 4:03 PM
  • Hi there,

    When i was looking for an answer to this question every body advise me select @@version.

    this is not a strait forward answer. i am sure you are looking for the below. well this information should come from the OS.

    you have to enable command shell then execute the query you will get what you wanted.


    sp_configure 'show advanced options',1
    go
    reconfigure
    go
    sp_configure 'xp_cmdshell',1
    go
    reconfigure
    go
    
    exec master..xp_cmdshell 'sqlps -c (Get-WmiObject -class Win32_OperatingSystem).caption'

    thanks

    kumar


    • Edited by Kumar muppa Monday, January 21, 2013 10:05 PM
    Sunday, January 20, 2013 10:02 PM
  • SELECT * FROM sys.dm_os_windows_info


    Thanks, Sethu Srinivasan [MSFT] SQL Server http://blogs.msdn.com/sqlagent -------------------------------------------------------------------------------- This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    Monday, January 21, 2013 6:36 PM
    Moderator