Get SQL Server version, Application Name With a Query
In this article I am going to explain about methods to get information about server you are using.
There is a way to determine the version of SQL Server Version, Application Name and additional information.
1. Query to find out the SQL Server Version
This returns the complete string "Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Enterprise Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)". But to find individually the particular property.
2. Get the product version
select SERVERPROPERTY ('productversion')
3. APP_Name() Function
This function returns the name of application which starts the database connection. This function is useful in various conditions like, some problem occurs in initiating database connection and you want to determine which application initiates process. Lets see practical example:
select APP_Name() as ApplicationName
4. Get additional details about the server
In above examples we determine individual information, but if we want to all information about the server. Type following code:
Execute this stored procedure.