<?xml version="1.0" encoding="utf-8"?><!-- generator="b2evolution/6.11.7-stable" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Torsten Schuessler - Latest Comments on SQL Server Information</title>
		<link>https://www.insidesql.org/blogs/tosc/?disp=comments</link>
		<atom:link rel="self" type="application/rss+xml" href="https://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3413" />
		<description></description>
		<language>en-EU</language>
		<docs>http://backend.userland.com/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=6.11.7-stable"/>
		<ttl>60</ttl>
		<item>
			<title>tosc in response to: SQL Server Information</title>
			<pubDate>Thu, 21 Mar 2013 10:21:46 +0000</pubDate>
			<dc:creator><a href="http://de.linkedin.com/in/dbatosc" title="Show the user profile" class="login user nowrap" rel="bubbletip_user_4"><span class="identity_link_username">tosc</span></a></dc:creator>
			<guid isPermaLink="false">c2208@https://www.insidesql.org/blogs/</guid>
			<description>Hello Henrik,

nice merging! THX!
If it is for you okay, I&#039;d like to customize the script?

cu
tosc</description>
			<content:encoded><![CDATA[Hello Henrik,

nice merging! THX!
If it is for you okay, I'd like to customize the script?

cu
tosc]]></content:encoded>
			<link>https://www.insidesql.org/blogs/tosc/2013/02/20/sql-server-information#c2208</link>
		</item>
		<item>
			<title> Henrik in response to: SQL Server Information</title>
			<pubDate>Thu, 21 Mar 2013 09:58:03 +0000</pubDate>
			<dc:creator><span class="user anonymous" rel="bubbletip_comment_2207">Henrik</span></dc:creator>
			<guid isPermaLink="false">c2207@https://www.insidesql.org/blogs/</guid>
			<description>Hello Thorsten,

great script and nice idea to use Serverproperty instead @@version.

I merge my script and yours to a more completer one:

--&gt; SQL Server Information &amp;lt;-- 
SET nocount ON;
go 
USE [master];
go
SELECT 
   CONVERT(CHAR(100), Serverproperty(&#039;MachineName&#039;)) AS &#039;MACHINE NAME&#039;, 
   CONVERT(CHAR(50), Serverproperty(&#039;ServerName&#039;)) AS &#039;SQL SERVER NAME&#039;, 

   (CASE WHEN CONVERT(CHAR(50), Serverproperty(&#039;InstanceName&#039;)) IS NULL 
   THEN &#039;Default Instance&#039; 
   ELSE CONVERT(CHAR(50), Serverproperty(&#039;InstanceName&#039;)) 
   END) AS &#039;INSTANCE NAME&#039;, 
   @@LANGUAGE as [Language],
   &lt;em&gt;right(substring(@@version,charindex(&#039; - &#039;,@@version)+17,PATINDEX(&#039;%Copyright%&#039;,@@version)-27-(charindex(&#039; - &#039;,@@version)+17)),3) as [32,64],&lt;/em&gt;

   CONVERT(CHAR(30), Serverproperty(&#039;EDITION&#039;)) AS EDITION, 
   substring(@@version,22,(charindex(&#039; - &#039;,@@version)-22)) as [Version],
   CONVERT(CHAR(30), Serverproperty(&#039;ProductVersion&#039;)) AS &#039;BUILD&#039;, 
   CONVERT(CHAR(30), Serverproperty(&#039;ProductLevel&#039;)) AS &#039;PRODUCT LEVEL&#039;, 
		

   (CASE WHEN CONVERT(CHAR(30), Serverproperty(&#039;ISClustered&#039;)) = 1 
   THEN &#039;Clustered&#039; 
   WHEN CONVERT(CHAR(30), Serverproperty(&#039;ISClustered&#039;)) = 0 
   THEN &#039;NOT Clustered&#039; 
   ELSE &#039;INVALID INPUT/ERROR&#039; 
   END) AS &#039;FAILOVER CLUSTERED&#039;, 

   (CASE WHEN CONVERT(CHAR(30), Serverproperty(&#039;ISIntegratedSecurityOnly&#039;)) = 1 
   THEN &#039;Integrated Security &#039; 
   WHEN CONVERT(CHAR(30), Serverproperty(&#039;ISIntegratedSecurityOnly&#039;)) = 0 
   THEN &#039;SQL Server Security &#039; 
   ELSE &#039;INVALID INPUT/ERROR&#039; 
   END) AS &#039;SECURITY&#039;, 
   
   (CASE WHEN CONVERT(CHAR(30), Serverproperty(&#039;ISSingleUser&#039;)) = 1 
   THEN &#039;Single User&#039; 
   WHEN CONVERT(CHAR(30), Serverproperty(&#039;ISSingleUser&#039;)) = 0 
   THEN &#039;Multi User&#039; 
   ELSE &#039;INVALID INPUT/ERROR&#039; 
   END) AS &#039;USER MODE&#039;, 

   CONVERT(CHAR(30), Serverproperty(&#039;COLLATION&#039;)) AS COLLATION, 
   Getdate() AS RunTime,  
   
   &lt;em&gt;substring(@@version,charindex (&#039; ON &#039;, @@VERSION)+4,(charindex (&#039; (Build&#039;, @@VERSION))- (charindex (&#039; ON &#039;, @@VERSION)-1)-5)  as [OS Version],
		substring(@@version,charindex (&#039;Build &#039;, @@VERSION) + 6,4)  as [OS Build],
		case when  charindex (&#039;Service Pack&#039;, @@VERSION) = 0
		then &#039;&#039;
		else
			substring(@@version,charindex (&#039;Service Pack&#039;, @@VERSION) +13,1 )
		end as [OS Service Pack],   &lt;/em&gt;


   @@SPID AS &#039;ID&#039;, 
   SYSTEM_USER AS &#039;Login Name?&#039;, 
   USER AS &#039;User Name&#039;;
   go 
-- END SQL Server Information --</description>
			<content:encoded><![CDATA[Hello Thorsten,

great script and nice idea to use Serverproperty instead @@version.

I merge my script and yours to a more completer one:

--> SQL Server Information &lt;-- 
SET nocount ON;
go 
USE [master];
go
SELECT 
   CONVERT(CHAR(100), Serverproperty('MachineName')) AS 'MACHINE NAME', 
   CONVERT(CHAR(50), Serverproperty('ServerName')) AS 'SQL SERVER NAME', 

   (CASE WHEN CONVERT(CHAR(50), Serverproperty('InstanceName')) IS NULL 
   THEN 'Default Instance' 
   ELSE CONVERT(CHAR(50), Serverproperty('InstanceName')) 
   END) AS 'INSTANCE NAME', 
   @@LANGUAGE as [Language],
   <em>right(substring(@@version,charindex(' - ',@@version)+17,PATINDEX('%Copyright%',@@version)-27-(charindex(' - ',@@version)+17)),3) as [32,64],</em>

   CONVERT(CHAR(30), Serverproperty('EDITION')) AS EDITION, 
   substring(@@version,22,(charindex(' - ',@@version)-22)) as [Version],
   CONVERT(CHAR(30), Serverproperty('ProductVersion')) AS 'BUILD', 
   CONVERT(CHAR(30), Serverproperty('ProductLevel')) AS 'PRODUCT LEVEL', 
		

   (CASE WHEN CONVERT(CHAR(30), Serverproperty('ISClustered')) = 1 
   THEN 'Clustered' 
   WHEN CONVERT(CHAR(30), Serverproperty('ISClustered')) = 0 
   THEN 'NOT Clustered' 
   ELSE 'INVALID INPUT/ERROR' 
   END) AS 'FAILOVER CLUSTERED', 

   (CASE WHEN CONVERT(CHAR(30), Serverproperty('ISIntegratedSecurityOnly')) = 1 
   THEN 'Integrated Security ' 
   WHEN CONVERT(CHAR(30), Serverproperty('ISIntegratedSecurityOnly')) = 0 
   THEN 'SQL Server Security ' 
   ELSE 'INVALID INPUT/ERROR' 
   END) AS 'SECURITY', 
   
   (CASE WHEN CONVERT(CHAR(30), Serverproperty('ISSingleUser')) = 1 
   THEN 'Single User' 
   WHEN CONVERT(CHAR(30), Serverproperty('ISSingleUser')) = 0 
   THEN 'Multi User' 
   ELSE 'INVALID INPUT/ERROR' 
   END) AS 'USER MODE', 

   CONVERT(CHAR(30), Serverproperty('COLLATION')) AS COLLATION, 
   Getdate() AS RunTime,  
   
   <em>substring(@@version,charindex (' ON ', @@VERSION)+4,(charindex (' (Build', @@VERSION))- (charindex (' ON ', @@VERSION)-1)-5)  as [OS Version],
		substring(@@version,charindex ('Build ', @@VERSION) + 6,4)  as [OS Build],
		case when  charindex ('Service Pack', @@VERSION) = 0
		then ''
		else
			substring(@@version,charindex ('Service Pack', @@VERSION) +13,1 )
		end as [OS Service Pack],   </em>


   @@SPID AS 'ID', 
   SYSTEM_USER AS 'Login Name?', 
   USER AS 'User Name';
   go 
-- END SQL Server Information --]]></content:encoded>
			<link>https://www.insidesql.org/blogs/tosc/2013/02/20/sql-server-information#c2207</link>
		</item>
		<item>
			<title>tosc in response to: SQL Server Information</title>
			<pubDate>Wed, 20 Feb 2013 15:52:29 +0000</pubDate>
			<dc:creator><a href="http://de.linkedin.com/in/dbatosc" title="Show the user profile" class="login user nowrap" rel="bubbletip_user_4"><span class="identity_link_username">tosc</span></a></dc:creator>
			<guid isPermaLink="false">c2197@https://www.insidesql.org/blogs/</guid>
			<description>ups, my fault
...
it&#039;s done!
THX Frank, wish you a nice day!</description>
			<content:encoded><![CDATA[ups, my fault
...
it's done!
THX Frank, wish you a nice day!]]></content:encoded>
			<link>https://www.insidesql.org/blogs/tosc/2013/02/20/sql-server-information#c2197</link>
		</item>
		<item>
			<title>admin in response to: SQL Server Information</title>
			<pubDate>Wed, 20 Feb 2013 15:44:30 +0000</pubDate>
			<dc:creator><a href="http://www.insidesql.org/blogs/" title="Show the user profile" class="login user nowrap" rel="bubbletip_user_1"><span class="identity_link_username">admin</span></a></dc:creator>
			<guid isPermaLink="false">c2196@https://www.insidesql.org/blogs/</guid>
			<description>I would consider making it available as a file to download. :-)</description>
			<content:encoded><![CDATA[I would consider making it available as a file to download. :-)]]></content:encoded>
			<link>https://www.insidesql.org/blogs/tosc/2013/02/20/sql-server-information#c2196</link>
		</item>
			</channel>
</rss>
