CentOS 7安装SQL Server 2017 后,启动 SQL Server 代理
可能会报下面的错误
SQL Server blocked access to procedure 'dbo.sp_get_sqlagent_properties' of component 'Agent XPs' because this component is turned off as part of the security configuration for this server.
出现这个错误,可以执行下面的SQL 解决
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO
启用SQL Server Agent
有时候开始执行作业时会报如下错误
SQLServerAgent is not currently running so it cannot be notified of this action.
这就是代理服务没有启动。
执行下面的命令启用 SQL Server Agent
sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true
重启 SQL Server
sudo systemctl restart mssql-server
这样就可以通过SSMS或Transact-SQL创建作业,计划等