SQL - Use SERVERPROPERTY to get SQL Instance Information

  • Comments posted to this topic are about the item SQL - Use SERVERPROPERTY to get SQL Instance Information

  • This is really cool, thanks.

  • I'm sure this will sound like a really simple request by many, but is there an easy T-SQL method to pivot the results into two columns?

    Chris

  • You can use something like this.....

    SELECT 'BuildClrVersion' ColumnName, SERVERPROPERTY('BuildClrVersion') ColumnValue

    UNION ALL

    SELECT 'Collation', SERVERPROPERTY('Collation')

    UNION ALL

    SELECT 'CollationID', SERVERPROPERTY('CollationID')

    UNION ALL

    SELECT 'ComparisonStyle', SERVERPROPERTY('ComparisonStyle')

    UNION ALL

    SELECT 'ComputerNamePhysicalNetBIOS', SERVERPROPERTY('ComputerNamePhysicalNetBIOS')

    UNION ALL

    SELECT 'Edition', SERVERPROPERTY('Edition')

    UNION ALL

    SELECT 'EditionID', SERVERPROPERTY('EditionID')

    .

    .

    .

    .

    .

    .

    .

  • Thanks!

    Chris

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply