{"id":3736,"date":"2014-05-23T06:52:00","date_gmt":"2014-05-23T04:52:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/"},"modified":"2014-05-23T06:52:00","modified_gmt":"2014-05-23T04:52:00","slug":"check-sql-server-error-log-size-with-a-policy","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/","title":{"rendered":"Check SQL Server Error Log size with a policy"},"content":{"rendered":"<p><img decoding=\"async\" class=\"blog-image aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg\" alt=\"\" \/><\/p>\n<p>In many blogs or articles, we can read that it is recommended to recycle the error log to be sure that the size is not too big<br \/>\nIn the <a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=29302\">Best Practice Analyzer (BPA) for SQL Server<\/a>, this is a rule.<br \/>\nBut what is a good size for the error log file?<br \/>\nI have often heard \u201cit depends\u201d, but in my opinion, this is not a good answer<br \/>\nThe first step is to find out what is a good size for the error log file.<\/p>\n<h3>Step 1: Identify the error log size threshold<\/h3>\n<p>To find an acceptable limit, I first checked the server. The easiest way is to go to the windows explorer on the server, open the error log path and look at the size by file as showed on the following picture:<\/p>\n<p><a title=\"DBI_errorlog_09.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_09.png\"><img decoding=\"async\" title=\"DBI_errorlog_09.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_09.png\" alt=\"DBI_errorlog_09.png\" \/><\/a><\/p>\n<p>You can also use the undocumented stored procedure xp_enumerrorlogs, which will be useful in my case because I will create a policy that will verify each error log file size against a configured threshold:<\/p>\n<p><a title=\"DBI_errorlog_10.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_10.png\"><img decoding=\"async\" title=\"DBI_errorlog_10.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_10.png\" alt=\"DBI_errorlog_10.png\" \/><\/a><\/p>\n<p>xp_enumerrorlogs provides the following information:<\/p>\n<ul>\n<li>Archive Number<\/li>\n<li>Creation Date (recycling date)<\/li>\n<li>Size in byte<\/li>\n<\/ul>\n<p>On my server, I noticed I have 13 archive files with different sizes, but I have not a strategy to recycle the error log file. Thus, it is recycled during the SQL Server Engine service restart.<\/p>\n<p>For a production server, this can be long to read and display the error log file. Furthermore the error log can become very very big.<br \/>\nAt the end of this article, I will give you a dbi best practice for the error log.<\/p>\n<p>In my sample, I will focus with 4 archives: 2 small size archive files with number 2 and 11 and 2 big size archive files with number 3 &amp; 4.<br \/>\nI will run SQL Server Management Studio (SSMS) to display one archive after the other and in parallel, I will run the resource manager to see the memory used by SSMS.<\/p>\n<h4>Result for Archive Number 2<\/h4>\n<p><a title=\"DBI_errorlog_02.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_02.png\"><img decoding=\"async\" title=\"DBI_errorlog_02.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_02.png\" alt=\"DBI_errorlog_02.png\" \/><\/a><\/p>\n<h4>Result for Archive Number 11<\/h4>\n<p><a title=\"DBI_errorlog_06.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_06.png\"><img decoding=\"async\" title=\"DBI_errorlog_06.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_06.png\" alt=\"DBI_errorlog_06.png\" \/><\/a><\/p>\n<h4>Result for Archive Number 3<\/h4>\n<p><a title=\"DBI_errorlog_05.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_05.png\"><img decoding=\"async\" title=\"DBI_errorlog_05.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_05.png\" alt=\"DBI_errorlog_05.png\" \/><\/a><\/p>\n<h4>Result for Archive Number 4<\/h4>\n<p><a title=\"DBI_errorlog_01.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_01.png\"><img decoding=\"async\" title=\"DBI_errorlog_01.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_01.png\" alt=\"DBI_errorlog_01.png\" \/><\/a><\/p>\n<p>The following table summarizes the results of each error log files reading:<\/p>\n<p><a title=\"DBI_errorlog_08.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_08.png\"><img decoding=\"async\" title=\"DBI_errorlog_08.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_08.png\" alt=\"DBI_errorlog_08.png\" \/><\/a><\/p>\n<h4>Time result<\/h4>\n<p>We can notice that between the archive number 11 with 45459 records and the archive number 3 with 761039 records, the time to read is approximately 30s.<br \/>\nThe archive number 4 run more than 1 minutes&#8230; I can easily take a coffee!:-o<\/p>\n<h4>Memory result<\/h4>\n<p>The private memory column gives us an important information here: we can see that for the archive number 11, the memory has doubled in size.<br \/>\nFurthermore, for the Archive number 3, we have 4 times more and for the Archive number 4 we have 11 times more.<br \/>\nAs the reminder, this metric is typically used to measure the memory impact of an application.<\/p>\n<p>According to these information, I can deduce that a good error log file size is between 33MB and 164MB.<br \/>\nTo be comfortable, I choose a policy threshold value of 50MB.<\/p>\n<h3>Step2: Creating the script<\/h3>\n<p>I create a table with the information provided from the xp_enumerrorlogs.<br \/>\nI divide the size per 1024 to have kB and again to have MB.<\/p>\n<p><a title=\"DBI_errorlog_04.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_04.png\"><img decoding=\"async\" title=\"DBI_errorlog_04.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_04.png\" alt=\"DBI_errorlog_04.png\" \/><\/a><\/p>\n<p>In this picture, you can see that I have 2 archive sizes greater than the\u00a0 50Mb threshold value.<br \/>\nSo, to create my policy condition I have to count the number of files whose size is greater than this threshold value.<\/p>\n<p><a title=\"DBI_errorlog_03.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_03.png\"><img decoding=\"async\" title=\"DBI_errorlog_03.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_03.png\" alt=\"DBI_errorlog_03.png\" \/><\/a><\/p>\n<p>And of course in my sample, I get 2. Perfect!:-)<\/p>\n<h3>Step3: Create the policy<\/h3>\n<p>I create the new policy &#8220;dbi services &#8211; SQL Server Error log too big&#8221;<\/p>\n<p><a title=\"DBI_errorlog_11.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_11.png\"><img decoding=\"async\" title=\"DBI_errorlog_11.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_11.png\" alt=\"DBI_errorlog_11.png\" \/><\/a><\/p>\n<p>I create a new condition &#8220;SQL Server Error log size&#8221;<\/p>\n<p><a title=\"DBI_errorlog_12.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_12.png\"><img decoding=\"async\" title=\"DBI_errorlog_12.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_12.png\" alt=\"DBI_errorlog_12.png\" \/><\/a><\/p>\n<p>If it is greater than 0, the condition is not meet and it implies that I have an error log file greater than 50Mb.<\/p>\n<p><a title=\"DBI_errorlog_13.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_13.png\"><img decoding=\"async\" title=\"DBI_errorlog_13.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_13.png\" alt=\"DBI_errorlog_13.png\" \/><\/a><\/p>\n<p>And now I can evaluate the policy against my error log files on my server as following:<\/p>\n<p><a title=\"DBI_errorlog_14.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_14.png\"><img decoding=\"async\" title=\"DBI_errorlog_14.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_14.png\" alt=\"DBI_errorlog_14.png\" \/><\/a><\/p>\n<p><a title=\"DBI_errorlog_15.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_15.png\"><img decoding=\"async\" title=\"DBI_errorlog_15.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_15.png\" alt=\"DBI_errorlog_15.png\" \/><\/a><\/p>\n<p>Click on evaluate and&#8230;<\/p>\n<p><a title=\"DBI_errorlog_16.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_16.png\"><img decoding=\"async\" title=\"DBI_errorlog_16.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_16.png\" alt=\"DBI_errorlog_16.png\" \/><\/a><\/p>\n<p>On this test server, the condition is met because I have not a big error log file (&gt; 50MB).<br \/>\nThen, I export the policy on the sample server that has 2 error log files with a size bigger than 50MB.<br \/>\nSo, now if I evaluate my policy against this server\u2026<\/p>\n<p><a title=\"DBI_errorlog_17.png\" href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_17.png\"><img decoding=\"async\" title=\"DBI_errorlog_17.png\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/DBI_errorlog_17.png\" alt=\"DBI_errorlog_17.png\" \/><\/a><\/p>\n<p>\u2026 as expected it fails because we have two error log files that does not meet the condition.<br \/>\nI can easily deploy this policy\u00a0on all servers or by using <a href=\"http:\/\/epmframework.codeplex.com\/\">Enterprise Policy Management (EPM) on codeplex<\/a> and the Central Management Server feature (CMS).<\/p>\n<h3>Conclusion<\/h3>\n<p>I recommend to use this policy to check the error log file size.<br \/>\nMy best practice here is to <strong>recycle the error log every day with a cycle of 30 files<\/strong> (30 days) per default in a maintenance job.<br \/>\nIf this policy failed with this best practice, then you can be sure that you have a lot of errors or too much information (like trace flag activation).<br \/>\nI hope this can help you and click here <a title=\"title\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/dbi-services---SQL-Server-Error-log-too-big.zip\" target=\"_self\">dbi-services&#8212;SQL-Server-Error-log-too-big.zip <\/a>to download the policy to try it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In many blogs or articles, we can read that it is recommended to recycle the error log to be sure that the size is not too big In the Best Practice Analyzer (BPA) for SQL Server, this is a rule. But what is a good size for the error log file? I have often heard [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":3556,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[198],"tags":[49,51,265,54,52],"type_dbi":[],"class_list":["post-3736","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-management","tag-microsoft","tag-sql-server","tag-sql-server-2008","tag-sql-server-2012","tag-sql-server-2014"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Check SQL Server Error Log size with a policy - dbi Blog<\/title>\n<meta name=\"description\" content=\"Create a policy to check the size from all Error Log Archive in an instance\" \/>\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\/check-sql-server-error-log-size-with-a-policy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Check SQL Server Error Log size with a policy\" \/>\n<meta property=\"og:description\" content=\"Create a policy to check the size from all Error Log Archive in an instance\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-23T04:52:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"473\" \/>\n\t<meta property=\"og:image:height\" content=\"164\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Haby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Haby\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 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\/check-sql-server-error-log-size-with-a-policy\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/\"},\"author\":{\"name\":\"St\u00e9phane Haby\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\"},\"headline\":\"Check SQL Server Error Log size with a policy\",\"datePublished\":\"2014-05-23T04:52:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/\"},\"wordCount\":805,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg\",\"keywords\":[\"Microsoft\",\"SQL Server\",\"SQL Server 2008\",\"SQL Server 2012\",\"SQL Server 2014\"],\"articleSection\":[\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/\",\"name\":\"Check SQL Server Error Log size with a policy - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg\",\"datePublished\":\"2014-05-23T04:52:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\"},\"description\":\"Create a policy to check the size from all Error Log Archive in an instance\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg\",\"width\":473,\"height\":164},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Check SQL Server Error Log size with a policy\"}]},{\"@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\/d0bfb7484ae81c8980fc2b11334f803b\",\"name\":\"St\u00e9phane Haby\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"caption\":\"St\u00e9phane Haby\"},\"description\":\"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \/ Financial Services, and many other industries.\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Check SQL Server Error Log size with a policy - dbi Blog","description":"Create a policy to check the size from all Error Log Archive in an instance","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\/check-sql-server-error-log-size-with-a-policy\/","og_locale":"en_US","og_type":"article","og_title":"Check SQL Server Error Log size with a policy","og_description":"Create a policy to check the size from all Error Log Archive in an instance","og_url":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/","og_site_name":"dbi Blog","article_published_time":"2014-05-23T04:52:00+00:00","og_image":[{"width":473,"height":164,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg","type":"image\/jpeg"}],"author":"St\u00e9phane Haby","twitter_card":"summary_large_image","twitter_misc":{"Written by":"St\u00e9phane Haby","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/"},"author":{"name":"St\u00e9phane Haby","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"headline":"Check SQL Server Error Log size with a policy","datePublished":"2014-05-23T04:52:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/"},"wordCount":805,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg","keywords":["Microsoft","SQL Server","SQL Server 2008","SQL Server 2012","SQL Server 2014"],"articleSection":["Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/","url":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/","name":"Check SQL Server Error Log size with a policy - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg","datePublished":"2014-05-23T04:52:00+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"description":"Create a policy to check the size from all Error Log Archive in an instance","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_SQLServer_20140326-103734_1.jpg","width":473,"height":164},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/check-sql-server-error-log-size-with-a-policy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Check SQL Server Error Log size with a policy"}]},{"@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\/d0bfb7484ae81c8980fc2b11334f803b","name":"St\u00e9phane Haby","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","caption":"St\u00e9phane Haby"},"description":"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \/ Financial Services, and many other industries.","url":"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3736","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=3736"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3736\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/3556"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=3736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=3736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=3736"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=3736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}