DEV Community

Cover image for SQL-Quick tip #14 - Server information
Allan Simonsen
Allan Simonsen

Posted on

4 4

SQL-Quick tip #14 - Server information

Sql Server tips and tricks

This is part of a series of quick tips and tricks I have accumulated over the year, that I think can be useful for others.
If you have similar short tips and tricks please leave a comment.

Server information

Some times you need information about the operating system and don't have direct access to the operating system, then you can use the scripts below to get some basic information about the operating system and the Sql Server version and when the server was booted.

SELECT host_distribution AS [Operating system],
       @@VERSION AS [Sql Server version],
       physical_memory_kb AS [Physical memory in Kb],
       sqlserver_start_time AS [Last boot time],
       cpu_count AS [CPU count]
  FROM sys.dm_os_host_info, sys.dm_os_sys_info
Enter fullscreen mode Exit fullscreen mode

Sql Server Management Studio screenshot

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DevOps for Private APIs. With DreamFactory API Generation, you get:

  • Auto-generated live APIs mapped from database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay