SQL Server Articles, SQL Server Tips, SQL Server Tutorials, SQL Server Tuning, SQL Server DBA, SQL Server Basics, Training, etc - MyTechMantra.com

How to Get SQL Server Instance Information


In this article we will take a look at different ways in which a DBA or a Developer can Retrieve System and SQL Server Information. The method mentioned is applicable for SQL Server 2005 and all higher versions.

Below mentioned are some of the key information which a DBA would be keen to know about the instance they manage:-



Different Ways to Get SQL Server Information

There are different ways to get System and SQL Server Information for any server and all the options are mentioned below for your quick reference.

  • How to Get System and SQL Server Information using TSQL script
  • How to Get System and SQL Server Information using SQLCMD
  • How to Get SQL Server Configuration Information Using SQL Server Management Studio

Important Note: To make any configuration changes to your SQL Server Instance like Manage SQL Server Services, Configure Network Protocols, and Network Connectivity Configuration, etc always use SQL Server Configuration Manager. Read the Best Practices.



How to Get System and SQL Server Information using T-SQL script

Execute the below mentioned T-SQL script to retrieve all the System and SQL Server Information.

Use master
GO

EXEC xp_msver
"ProductName"
, "ProductVersion"
, "Language"
, "Platform"
, "WindowsVersion"
, "PhysicalMemory"
, "ProcessorCount"
GO
Retrieve SQL Server Information Using TSQL Code

How to Get System and SQL Server Information using SQLCMD

Connect to SQL Server Instance using SQLCMD and paste the below mentioned command to retrieve the relevant SQL Server and System information.

D:\Program Files\Microsoft SQL Server\110\Tools\Binn>sqlcmd -E -S "MYTECHMANTRA\SQL2012" -Q "exec xp_msver 'ProductName', 'ProductVersion', 'Language', 'Platform', 'WindowsVersion', 'PhysicalMemory', 'ProcessorCount'"
Retrieve SQL Server Information Using SQLCMD


How to Get SQL Server Configuration Information Using SSMS

To retrieve the above information, open SQL Server Management Studio -> connect to the SQL Server Instance -> right click Instance -> select Properties to open up Server Properties. In the General Page you would see the relevant information.

Retrieve SQL Server Information Using SSMS


Conclusion

In this article you have seen how easily a DBA can retrieve System and SQL Server Information from server which they manage day to day.

Ashish Mehta

Ashish Kumar Mehta is a database manager, trainer and technical author. He has more than a decade of IT experience in database administration, performance tuning, database development and technical training on Microsoft SQL Server from SQL Server 2000 to SQL Server 2014. Ashish has authored more than 325 technical articles on SQL Server across leading SQL Server technology portals. Over the last few years, he has also developed and delivered many successful projects in database infrastructure; data warehouse and business intelligence; database migration; and upgrade projects for companies such as Hewlett-Packard, Microsoft, Cognizant and Centrica PLC, UK. He holds an engineering degree in computer science and industry standard certifications from Microsoft including MCITP Database Administrator 2005/2008, MCDBA SQL Server 2000 and MCTS .NET Framework 2.0 Web Applications.

Newsletter Signup! Join 15,000+ Professionals




Be Social! Like & Follow Us

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Advertisement