As a SQL Server DBA, monitoring the free and used space in database files is crucial for performance and capacity planning. Below is a T-SQL script that retrieves the size, used space, and free space for all databases in an instance.
Welcome to SQLDBANow.com! This blog, created by Bandaru Ajeyudu, is dedicated to learning and sharing knowledge about SQL DBA and Azure SQL. Join us as we explore insights, tips, and best practices in the world of SQL Database Administration and Azure SQL.
Enable the SQL Server Agent in Linux
sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true
sudo systemctl restart mssql-server
SQLServerAgent is not currently running
……………………………………………………………………………………………………………………………………………………………………………….
Error 22022: SQLServerAgent is not currently running so it cannot be notified of this action.”
If you receive this error message, first make sure that the SQL Server Agent service is running. To do this, follow these steps:
……………………………………………………………………………………………………………………………………………………………………………….
1.Click Start, click Run, type Services.msc, and then click OK.
2.In the Services window, locate the SQL Server Agent service.
3.Make sure that the value of the Status column of the SQL Server Agent service is Running.
then
EXEC sp_configure ‘show advanced’, 1;
RECONFIGURE;
EXEC sp_configure ‘allow updates’, 0;
RECONFIGURE;
EXEC sp_configure ‘Agent XPs’, 1;
RECONFIGURE;
GO