Checking the Status of SQL Server Services in SQL Server

Hello everyone,

In this article, I will provide information about checking the status of SQL Server services in SQL Server.

In SQL Server, in some cases, we may want to check the status of SQL Server services, whether they are running or not.

You can easily do this with the help of the code below.

EXEC xp_servicecontrol N'querystate', N'MSSQLServer'; --Buradaki isimler SERVER'a göre değişebilir. 
EXEC xp_servicecontrol N'querystate', N'SQLServerAGENT'; --Buradaki isimler SERVER'a göre değişebilir. 
EXEC xp_servicecontrol N'querystate', N'msdtc'; --Buradaki isimler SERVER'a göre değişebilir. 
EXEC xp_servicecontrol N'querystate', N'sqlbrowser'; --Buradaki isimler SERVER'a göre değişebilir. 
EXEC xp_servicecontrol N'querystate', N'MSSQLServerOLAPService'; --Buradaki isimler SERVER'a göre değişebilir. 
EXEC xp_servicecontrol N'querystate', N'ReportServer$YAVUZSELIM'; --Buradaki isimler SERVER'a göre değişebilir.

When you run the code, you will get a result like the one below.

Checking the Status of SQL Server Services in SQL Server

As you can see, the status of SQL Server services has been checked.

Good luck to everyone in business and life.

169 Views

Yavuz Selim Kart

I try to explain what I know in software and database. I am still improving myself by doing research on many programming languages. Apart from these, I am also interested in Graphic Design and Wordpress. I also have knowledge about SEO and Social media management. In short, I am a determined person who likes to work hard.

You may also like...

Don`t copy text!