{"id":16082,"date":"2021-04-12T06:48:15","date_gmt":"2021-04-12T04:48:15","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/"},"modified":"2025-10-01T11:51:58","modified_gmt":"2025-10-01T09:51:58","slug":"sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/","title":{"rendered":"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs"},"content":{"rendered":"<h4>Introduction<\/h4>\n<p>Very often with our customers, there is only one person with the DBA role. The configuration of the instances is then under control and if anything strange has to be questioned, the culprit is quickly identified. \ud83d\ude42<br \/>\nWhen many people, not necessarily having DBA knowledge, have high permissions (sysadmin) on instances it becomes important to know who does what.<\/p>\n<p>In this blog post, we will see how to get notified by email when certain sensitive points at the instance level are modified.<br \/>\nThe elements that I will cover here are the following.<\/p>\n<ul>\n<li>Instance level configuration (Max server memory, etc.)<\/li>\n<li>Linked Server (creation or modification ..)<\/li>\n<li>Agent Jobs (create, drop, etc.)<\/li>\n<\/ul>\n<p>The default <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/sql-trace\/sql-trace\">SQL Trace<\/a> contains some useful data like the files growth events but does not have the information I needed. Plus, as mentioned in the doc, it is deprecated.<\/p>\n<blockquote><p>This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.<\/p><\/blockquote>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/extended-events\/extended-events\">Extended events<\/a> is a great performance troubleshooting tool but it does not help in this case.<\/p>\n<p>It&#8217;s possible to use T-SQL and copy into a table the data from <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/system-catalog-views\/sys-configurations-transact-sql\">sys.configurations<\/a> and other DMVs related to the Agent and linked server. At a 5min interval, you can compare the current state with the previous one and send an email alert based on this delta. In most cases, this will tell you what has changed but not who did it.<\/p>\n<p>So finally I decided to use <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/security\/auditing\/sql-server-audit-database-engine\">Audits<\/a>. This feature is not widely used and sometimes underrated, but it is very powerful as we will see.<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_0_Audit.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49163\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_0_Audit.jpg\" alt=\"\" width=\"201\" height=\"201\"><\/a><\/p>\n<h4>Audits<\/h4>\n<p>So let&#8217;s start with creating a new Audit.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49124\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_1_newAudit.png\" alt=\"\" width=\"278\" height=\"277\"><\/p>\n<p>I configure 4 rollover audit files of 50MB each located in C:\\Temp\\.<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_2_newAudit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49125\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_2_newAudit.png\" alt=\"\" width=\"591\" height=\"459\"><\/a><\/p>\n<p>Now looking at the Server Audit Specification we can see there is nothing related to Linked Server, Configuration, or Agent Jobs.<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_3_newAudit_Server_Spec.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49126\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_3_newAudit_Server_Spec.png\" alt=\"\" width=\"694\" height=\"735\"><\/a><\/p>\n<p>So I decided to use a Database Specification on the system databases related to the audit I want to perform.<br \/>\nFor a configuration change like &#8220;Max Server memory&#8221;, I can audit the execution of Stored Procedure &#8220;sp_configure&#8221; in the master database. For Linked Servers I will do the same with all related stored procedure.<\/p>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_4_master_spec.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49127\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_4_master_spec.png\" alt=\"\" width=\"370\" height=\"402\"><br \/>\n<\/a><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_5_master_spec.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49132\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_5_master_spec.png\" alt=\"\" width=\"848\" height=\"317\"><\/a>Here is the T-SQL.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">USE [master]\nGO\nCREATE DATABASE AUDIT SPECIFICATION [AUDIT___DBA_SPEC_master]\nFOR SERVER AUDIT [AUDIT___DBA]\n\/* Linked Server *\/\nADD (EXECUTE ON OBJECT::[sys].[sp_addlinkedserver] BY [dbo]),\nADD (EXECUTE ON OBJECT::[sys].[sp_addlinkedsrvlogin] BY [dbo]),\nADD (EXECUTE ON OBJECT::[sys].[sp_droplinkedsrvlogin] BY [dbo]),\nADD (EXECUTE ON OBJECT::[sys].[sp_addlinkedserver] BY [dbo]),\nADD (EXECUTE ON OBJECT::[sys].[sp_addserver] BY [dbo]),\nADD (EXECUTE ON OBJECT::[sys].[sp_dropserver] BY [dbo]),\nADD (EXECUTE ON OBJECT::[sys].[sp_serveroption] BY [dbo]),\nADD (EXECUTE ON OBJECT::[sys].[sp_setnetname] BY [dbo]),\n\/* Configuration *\/\nADD (EXECUTE ON OBJECT::[sys].[sp_configure] BY [dbo])\nWITH (STATE = ON)\nGO<\/pre>\n<p>Same thing for the Agent Job related stored procedure in the msdb database.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">USE [msdb]\nGO\nCREATE DATABASE AUDIT SPECIFICATION [AUDIT___DBA_SPEC_msdb]\nFOR SERVER AUDIT [AUDIT___DBA]\n\/* Agent Jobs *\/\nADD (EXECUTE ON OBJECT::[dbo].[sp_add_schedule] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_add_jobstep] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_update_jobstep] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_update_jobschedule] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_delete_jobschedule] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_add_job] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_update_job] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_delete_job] BY [dbo]),\nADD (EXECUTE ON OBJECT::[dbo].[sp_stop_job] BY [dbo])\nWITH (STATE = ON)\nGO<\/pre>\n<h4>Query Audit files<\/h4>\n<p>Now, after enabling the Audit and doing some changes, the following queries using <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/system-functions\/sys-fn-get-audit-file-transact-sql\">sys.fn_get_audit_file<\/a> will show if something has been changed on my instance and who did it.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">select distinct [statement]\n\t, session_server_principal_name\n\t, server_instance_name\n\t, DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP), event_time) AS event_time\n\t--, *\nfrom sys.fn_get_audit_file('C:\\Temp\\AUDIT___DBA*.sqlaudit', default, default)\nwhere [object_name] = 'sp_configure'\n  and [statement] not like '%show advanced options%'\norder by event_time desc<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_6_sp_configure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49143\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_6_sp_configure.png\" alt=\"\" width=\"977\" height=\"126\"><\/a>The Audit contains all the information I need. The login &#8220;LAB\\Administrator&#8221; changed the &#8220;Max Dregree of parallelism&#8221; setting to value 4.<\/p>\n<p>A similar query for linked server.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">select DISTINCT [statement]\n\t, session_server_principal_name\n\t, server_instance_name\n\t, DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP), event_time) AS event_time\n\t--, *\nfrom sys.fn_get_audit_file('C:\\Temp\\AUDIT___DBA*.sqlaudit', default, default)\nwhere [object_name] IN ('sp_addlinkedserver', 'sp_addlinkedsrvlogin', 'sp_droplinkedsrvlogin'\n\t, 'sp_dropserver', 'sp_addserver')\norder by event_time desc<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_9_linked_server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49150\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_9_linked_server.png\" alt=\"\" width=\"997\" height=\"138\"><\/a>And finally for SQL Server Agent Job.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">select DISTINCT [statement]\n\t, session_server_principal_name\n\t, server_instance_name\n\t, DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP), event_time) AS event_time\n\t--, *\nfrom sys.fn_get_audit_file('C:\\Temp\\AUDIT___DBA*.sqlaudit', default, default)\nwhere [object_name] IN ('sp_add_job', 'sp_add_jobstep', 'sp_update_job', 'sp_delete_job', 'sp_stop_job'\n\t, 'sp_update_jobschedule', 'sp_delete_jobschedule', 'sp_update_jobstep', 'sp_add_schedule')\norder by event_time desc<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_7_agent_jobs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-49146\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_7_agent_jobs.png\" alt=\"\" width=\"1229\" height=\"124\"><\/a><\/p>\n<h4>Email<\/h4>\n<p>Having this all set up, I can run a Job that will read the audit file and send an email with everything that happened for the last 5 minutes.<br \/>\nI decided to do an email for each type of audited element (Configuration, Agent Jobs, etc..).<br \/>\nThe T-SQL script is quite simple:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">--\tCheck interval\nDECLARE @CheckPeriodInMinute int = 5\n\nDECLARE @profile_mail varchar(128)= 'DBA_Profile'\n      , @subject_mail varchar(128)= 'AUDIT - Configuration change ('+convert(varchar(256),@@servername)+')'\n\t  , @recipient_mail varchar(128)=' sql@DBA.local'\n\t  , @html_header varchar(max), @html varchar(max), @html_part varchar(max),  @html_footer varchar(max)\n\nDECLARE @Event TABLE (\n\t [statement] varchar(503)\n\t,session_server_principal_name sysname\n\t,server_instance_name sysname\n\t,event_time datetime\n)\n\ninsert into @Event\n\tselect distinct IIF(LEN([statement])&gt;500, LEFT([statement], 500)+'...', [statement]) AS [statement]\n\t\t, session_server_principal_name\n\t\t, server_instance_name\n\t\t, DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP), event_time) AS event_time\n\tfrom sys.fn_get_audit_file('C:\\Temp\\AUDIT___DBA*.sqlaudit', default, default)\n\twhere [object_name] = 'sp_configure'\n\t  and [statement] not like '%show advanced options%'\n\t  and DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP), event_time) &gt; DATEADD(MINUTE, -@CheckPeriodInMinute, GETDATE())\n\torder by event_time desc\n\nif @@ROWCOUNT&gt;0\nbegin\n\tset @html_header='&lt;head&gt;\n\t&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\"&gt;&lt;style type=\"text\/css\"&gt;\n\tbody    {font:9pt Arial,Helvetica,sans-serif; color:black; background:White;}\n\ttable   {font:9pt Arial,Helvetica,sans-serif; color:Black; background:#C0C0C0; padding:0px 0px 0px 0px; margin:1px 1px 1px 1px;width:80%}\n\ttr,td   {font:9pt Arial,Helvetica,sans-serif; color:Black; background:#F5F5F5; padding:0px 0px 0px 0px; margin:1px 1px 1px 1px;}\n\tth      {font:bold 9pt Arial,Helvetica,sans-serif; color:#336699; background:#cccc99; padding:2px 2px 2px 2px;}\n\tth.th2  {font:bold 9pt Arial,Helvetica,sans-serif; color:#333399; background:#ddddaa; padding:2px 2px 2px 2px;}\n\th1      {font:bold 16pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; border-bottom:1px solid #cccc99; margin-top:15pt; margin-bottom:0pt; padding:0px 0px 0px 0px;}\n\th2      {font:bold 14pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; margin-top:4pt; margin-bottom:0pt;}\n\tp       {font:9pt Arial,Helvetica,sans-serif; color:black; background:White;}\n\t&lt;\/style&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t'\n\tset @html_footer='&lt;p&gt;&lt;i&gt;Executed on '+convert(varchar,getdate(),120)+' from server \"'+isnull(convert(varchar(128),@@SERVERNAME),'')+'\"&lt;\/i&gt;&lt;\/p&gt;'\n\n\tSET @html=@html_header+'&lt;h1&gt;AUDIT - Configuration change&lt;\/h1&gt;\n\t&lt;p&gt;&lt;i&gt;Check done on last '+convert(varchar(20),@CheckPeriodInMinute)+' minutes&lt;\/i&gt;&lt;\/p&gt;\n\t&lt;table&gt;\n\t&lt;tr&gt;\n\t  &lt;th&gt;statement&lt;\/th&gt;\n\t  &lt;th&gt;session_server_principal_name&lt;\/th&gt;\n\t  &lt;th&gt;server_instance_name&lt;\/th&gt;\n\t  &lt;th&gt;event_time&lt;\/th&gt;\n\t&lt;\/tr&gt;\n\t'\n\n\tdeclare c1 cursor for\n\t\tselect \n\t\t'&lt;tr&gt;\n\t\t  &lt;td&gt;'+[statement]+'&lt;\/td&gt;\n\t\t  &lt;td&gt;'+session_server_principal_name+'&lt;\/td&gt;\n\t\t  &lt;td&gt;'+server_instance_name+'&lt;\/td&gt;\n\t\t  &lt;td&gt;'+CONVERT(varchar, event_time, 120)+'&lt;\/td&gt;\n\t\t&lt;\/tr&gt;\n\t\t'\n\t\tfrom @Event\n\t\torder by event_time desc\n\n\topen c1\n\tfetch c1 into @html_part\n\twhile @@FETCH_STATUS=0\n\tbegin\n\t\tset @html=@html+@html_part\n\n\t\tfetch c1 into @html_part\n\tend\n\tclose c1\n\tdeallocate c1\n\n\tset @html=@html+'&lt;\/table&gt;\n\t'+@html_footer\n\n\texec msdb.dbo.sp_send_dbmail \n\t\t  @profile_name=\t@profile_mail\n\t\t, @recipients=\t\t@recipient_mail\n\t\t, @subject=\t\t\t@subject_mail\n\t\t, @body=\t\t\t@html\n\t\t, @body_format=\t\t'HTML'\nend<\/pre>\n<p>&nbsp;<\/p>\n<p>Here is an example of the email I receive when someone changes the configuration of an instance :<\/p>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_8_email.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-49148\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_8_email.png\" alt=\"\" width=\"1205\" height=\"406\"><\/a><\/p>\n<p>Audits are very powerful can be very useful to get notified when a change occurs at the SQL Server instance level.<\/p>\n\n\n<p>Written by <a href=\"https:\/\/www.linkedin.com\/in\/steven-naudet-aa540158\/\">Steven Naudet<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Very often with our customers, there is only one person with the DBA role. The configuration of the instances is then under control and if anything strange has to be questioned, the culprit is quickly identified. \ud83d\ude42 When many people, not necessarily having DBA knowledge, have high permissions (sysadmin) on instances it becomes important [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":16084,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,99],"tags":[2316,667,902,2033,2550],"type_dbi":[],"class_list":["post-16082","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","category-sql-server","tag-agent-jobs","tag-audit","tag-configuration","tag-linked-server","tag-sql-server-2"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs\" \/>\n<meta property=\"og:description\" content=\"Introduction Very often with our customers, there is only one person with the DBA role. The configuration of the instances is then under control and if anything strange has to be questioned, the culprit is quickly identified. \ud83d\ude42 When many people, not necessarily having DBA knowledge, have high permissions (sysadmin) on instances it becomes important [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-12T04:48:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-01T09:51:58+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_1_newAudit.png\" \/>\n\t<meta property=\"og:image:width\" content=\"468\" \/>\n\t<meta property=\"og:image:height\" content=\"466\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Microsoft Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/\"},\"author\":{\"name\":\"Microsoft Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfab48333280d616e1170e7369df90a4\"},\"headline\":\"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs\",\"datePublished\":\"2021-04-12T04:48:15+00:00\",\"dateModified\":\"2025-10-01T09:51:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/\"},\"wordCount\":565,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Blog18_1_newAudit.png\",\"keywords\":[\"Agent Jobs\",\"audit\",\"configuration\",\"Linked server\",\"SQL Server\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/\",\"name\":\"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Blog18_1_newAudit.png\",\"datePublished\":\"2021-04-12T04:48:15+00:00\",\"dateModified\":\"2025-10-01T09:51:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfab48333280d616e1170e7369df90a4\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Blog18_1_newAudit.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Blog18_1_newAudit.png\",\"width\":468,\"height\":466},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfab48333280d616e1170e7369df90a4\",\"name\":\"Microsoft Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"caption\":\"Microsoft Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/microsoft-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs","og_description":"Introduction Very often with our customers, there is only one person with the DBA role. The configuration of the instances is then under control and if anything strange has to be questioned, the culprit is quickly identified. \ud83d\ude42 When many people, not necessarily having DBA knowledge, have high permissions (sysadmin) on instances it becomes important [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/","og_site_name":"dbi Blog","article_published_time":"2021-04-12T04:48:15+00:00","article_modified_time":"2025-10-01T09:51:58+00:00","og_image":[{"width":468,"height":466,"url":"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_1_newAudit.png","type":"image\/png"}],"author":"Microsoft Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Microsoft Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/"},"author":{"name":"Microsoft Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"headline":"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs","datePublished":"2021-04-12T04:48:15+00:00","dateModified":"2025-10-01T09:51:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/"},"wordCount":565,"commentCount":1,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_1_newAudit.png","keywords":["Agent Jobs","audit","configuration","Linked server","SQL Server"],"articleSection":["Database Administration &amp; Monitoring","SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/","name":"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_1_newAudit.png","datePublished":"2021-04-12T04:48:15+00:00","dateModified":"2025-10-01T09:51:58+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_1_newAudit.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Blog18_1_newAudit.png","width":468,"height":466},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-audit-changes-on-instance-configuration-linked-servers-and-agent-jobs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server: Audit changes on Instance Configuration, Linked Servers and Agent Jobs"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4","name":"Microsoft Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","caption":"Microsoft Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=16082"}],"version-history":[{"count":2,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16082\/revisions"}],"predecessor-version":[{"id":40605,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16082\/revisions\/40605"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/16084"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=16082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=16082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=16082"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=16082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}