{"id":12441,"date":"2019-06-12T20:59:57","date_gmt":"2019-06-12T20:59:57","guid":{"rendered":"https:\/\/dbtut.com\/?p=12441"},"modified":"2019-06-12T20:59:58","modified_gmt":"2019-06-12T20:59:58","slug":"how-to-check-vlf-counts-in-the-databases-using-policy-based-management","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/","title":{"rendered":"How To Check VLF Counts in the Databases Using Policy Based Management"},"content":{"rendered":"<p>Policy-Based Management is a feature that is introduced with SQL Server 2008. It allows us to set the rules we want in our systems, to set our standards and to make our controls automatically. For example, we can create a policy for control purposes so that the names of our stored procedures do not start with a number or database recovery models are not simple.<\/p>\n<p>Before reading this article, I recommend that you read the article &#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2018\/06\/09\/vlfvirtual-log-file-count\/\" target=\"_blank\" rel=\"noopener noreferrer\">Vlf(Virtual Log File) Count<\/a>&#8221; to understand the answer to the question of what means the VLF Count and what should not be.<\/p>\n<p>To comprehend Policy Based Management (PBM), you need to understand some concepts.<\/p>\n<h2>Facet<\/h2>\n<p>A feature that can be managed by PBM. For example, there is a facet called Database. And you can use this facet to create a policy that checks the vlf count in the log file in the database.<\/p>\n<p>You can access all facets via SSMS as follows. To access the facet details, you must double-click on it.<\/p>\n<p id=\"MtdrFPC\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"584\" class=\"size-full wp-image-12444  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00ac0d7fe3c.png\" alt=\"\"><\/p>\n<h2>Condition<\/h2>\n<p>Checks whether the sub-property of the related facets provide the specified condition.<\/p>\n<p>Let&#8217;s create a policy to check the vlf count in the database.<\/p>\n<p>Right click Policies tab as follows from the Management&gt; Policy tab and click New Policy.<\/p>\n<p id=\"kEBLtVs\"><img loading=\"lazy\" decoding=\"async\" width=\"698\" height=\"236\" class=\"size-full wp-image-12446  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00ac2bdbf06.png\" alt=\"\"><\/p>\n<p>We give a name to Policy on the screen that appears. We need to create a condition from Check Condition.<\/p>\n<p>We&#8217;re clicking on New Condition.<\/p>\n<p id=\"fQTddpD\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12448  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00ac42bd99f.png\" alt=\"\" width=\"626\" height=\"342\"><\/p>\n<p>We give a name to the condition from the screen that appears.<\/p>\n<p>From the Facet section, we select the Database facet because we will check the vlf count of the log file in the database.<\/p>\n<p>Click on &#8220;&#8230;&#8221; in the Expression section to paste the following script into the Cell Value section.<\/p>\n<pre class=\"lang:default decode:true\">ExecuteSql('Numeric', '--variables to hold each ''iteration''  \ndeclare @query varchar(100)  \ndeclare @dbname sysname  \ndeclare @vlfs int  \n  \n--table variable used to ''loop'' over databases  \ndeclare @databases table (dbname sysname)  \ninsert into @databases  \n--only choose online databases  \nselect name from sys.databases where state = 0  \n  \n--table variable to hold results  \ndeclare @vlfcounts table  \n    (dbname sysname,  \n    vlfcount int)  \n  \n \n \n--table variable to capture DBCC loginfo output  \n--changes in the output of DBCC loginfo from SQL2012 mean we have to determine the version \n \ndeclare @MajorVersion tinyint  \nset @MajorVersion = LEFT(CAST(SERVERPROPERTY(''ProductVersion'') AS nvarchar(max)),CHARINDEX(''.'',CAST(SERVERPROPERTY(''ProductVersion'') AS nvarchar(max)))-1) \n\nif @MajorVersion &lt; 11 -- pre-SQL2012 \nbegin \n    declare @dbccloginfo table  \n    (  \n        fileid smallint,  \n        file_size bigint,  \n        start_offset bigint,  \n        fseqno int,  \n        [status] tinyint,  \n        parity tinyint,  \n        create_lsn numeric(25,0)  \n    )  \n  \n    while exists(select top 1 dbname from @databases)  \n    begin  \n  \n        set @dbname = (select top 1 dbname from @databases)  \n        set @query = ''dbcc loginfo ('' + '''''''' + @dbname + '''''') ''  \n  \n        insert into @dbccloginfo  \n        exec (@query)  \n  \n        set @vlfs = @@rowcount  \n  \n        insert @vlfcounts  \n        values(@dbname, @vlfs)  \n  \n        delete from @databases where dbname = @dbname  \n  \n    end --while \nend \nelse \nbegin \n    declare @dbccloginfo2012 table  \n    (  \n        RecoveryUnitId int, \n        fileid smallint,  \n        file_size bigint,  \n        start_offset bigint,  \n        fseqno int,  \n        [status] tinyint,  \n        parity tinyint,  \n        create_lsn numeric(25,0)  \n    )  \n  \n    while exists(select top 1 dbname from @databases)  \n    begin  \n  \n        set @dbname = (select top 1 dbname from @databases)  \n        set @query = ''dbcc loginfo ('' + '''''''' + @dbname + '''''') ''  \n  \n        insert into @dbccloginfo2012  \n        exec (@query)  \n  \n        set @vlfs = @@rowcount  \n  \n        insert @vlfcounts  \n        values(@dbname, @vlfs)  \n  \n        delete from @databases where dbname = @dbname  \n  \n    end --while \nend \n  \n--output the full list  \nselect vlfcount  \nfrom @vlfcounts  \norder by dbname\n')\n<\/pre>\n<p id=\"CvxcSqp\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12450  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00ac749ec54.png\" alt=\"\" width=\"736\" height=\"327\"><\/p>\n<p>And since we want the vlf number to be less than 1000, we set it to &#8220;&lt;1000&#8221;. The number 1000 is not an appropriate value for every database. Therefore, you should read the article I mentioned at the beginning of the article.<\/p>\n<p id=\"mXnrnBY\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12452  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00ac8d94a75.png\" alt=\"\" width=\"699\" height=\"326\"><\/p>\n<p>By selecting On Schedule from the Evaluation Mode, we select the interval at which the policy will be checked and then click the Enable check box.<\/p>\n<p>If we choose On Demand, it only checks when we execute policy.<\/p>\n<p>If you have a server-based condition, you can create a server-based condition from the server restriction section.<\/p>\n<p id=\"KBuEneX\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12454  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00aca8c1dfc.png\" alt=\"\" width=\"728\" height=\"491\"><\/p>\n<p>If you want it to be checked automatically at certain intervals, click New in the Schedule section and determine the frequency that the policy will check the condition. We set it up to work once every day at 12: 00: 000 PM.<\/p>\n<p id=\"YSiurIi\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12456  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00acc1c73a9.png\" alt=\"\" width=\"738\" height=\"590\"><\/p>\n<p>We created our policy. We click Evaluate as below to run it manually.<\/p>\n<p id=\"iPZILqx\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12458  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00acde984c3.png\" alt=\"\" width=\"540\" height=\"251\"><\/p>\n<p>Since we use script instead of Facet property, we received a warning like the following. Policy says it contains scripts and we should only run it from a trusted source.<\/p>\n<p><span style=\"color: #ff0000;\"><em>The policy: &#8216;VLFCount&#8217; contains scripts. You should only run policies from a trustworthy source.<\/em><\/span><\/p>\n<p id=\"dLvwmvt\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12460  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/img_5d00ad120d584.png\" alt=\"\" width=\"701\" height=\"460\"><\/p>\n<p>We press the Evaluate button at the bottom right to run the policy despite the warning.<\/p>\n<p>When I perform this operation in my local, I get a result like the following. As you can see, none of the databases have more than 1000 vlfs. You can find out the current vlf count by clicking View.<\/p>\n<p id=\"BRevswI\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-12468\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-3.png\" alt=\"\" width=\"1598\" height=\"721\"><\/p>\n<p>&nbsp;<\/p>\n<p id=\"RZNkzhg\">&nbsp;<\/p>\n<p>With Policy Based Management, you can check many things on SQL Server. And I think a professional database manager should use this feature that SQL Server offers us. You can find more articles on Policy Based Management at the following links.<\/p>\n<p>&#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2019\/05\/20\/how-to-check-the-compatibility-level-of-databases-using-policy-based-management\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Check the Compatibility Level of Databases Using Policy Based Management<\/a>&#8220;,<\/p>\n<p>&#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2019\/06\/09\/how-to-check-recovery-model-of-all-databases-using-policy-based-management\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Check Recovery Model of All Databases Using Policy Based Management<\/a>&#8220;,<\/p>\n<p>&#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2019\/06\/11\/how-to-check-stored-procedure-names-using-policy-based-managementregex\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Check Stored Procedure Names Using Policy Based Management<\/a>&#8220;,<\/p>\n<p>&#8220;How To Check SQL Logins That Password Policy Enforced or Password Expiration Enabled Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Disabled Audits Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Auto Shrink Option of Databases Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Whether Availability Groups is Ready To Failover Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Availability Group&#8217;s Backup Preference Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Availability Group Automatic Failover Settings Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Whether Readable Secondary is Enabled on Availability Groups Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Whether Data File Sizes is Reached a Specific Size Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Auto Close Option of Databases Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Last Log Backup Time Using Policy Based Management&#8221;,<\/p>\n<p>&#8220;How To Check Page Verify Option of Databases Using Policy Based Management&#8221;<\/p>\n\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_12441\" class=\"pvc_stats all  \" data-element-id=\"12441\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Policy-Based Management is a feature that is introduced with SQL Server 2008. It allows us to set the rules we want in our systems, to set our standards and to make our controls automatically. For example, we can create a policy for control purposes so that the names of our stored procedures do not start &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_12441\" class=\"pvc_stats all  \" data-element-id=\"12441\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":12466,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[3],"tags":[4550,4553,4552,4549,4551],"class_list":["post-12441","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-mssql","tag-check-vlf-count-in-a-database","tag-executesql","tag-script-in-pbm","tag-the-policy-contains-scripts-you-should-only-run-policies-from-a-trustworthy-source","tag-use-sql-script-in-policy-based-management"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Check VLF Counts in the Databases Using Policy Based Management - Database Tutorials<\/title>\n<meta name=\"description\" content=\"How To Check VLF Counts in the Databases Using Policy Based Management\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Check VLF Counts in the Databases Using Policy Based Management - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"How To Check VLF Counts in the Databases Using Policy Based Management\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-12T20:59:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-12T20:59:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"664\" \/>\n\t<meta property=\"og:image:height\" content=\"363\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"dbtut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dbtut\" \/>\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:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/\"},\"author\":{\"name\":\"dbtut\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\"},\"headline\":\"How To Check VLF Counts in the Databases Using Policy Based Management\",\"datePublished\":\"2019-06-12T20:59:57+00:00\",\"dateModified\":\"2019-06-12T20:59:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/\"},\"wordCount\":764,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png\",\"keywords\":[\"check vlf count in a database\",\"ExecuteSQL\",\"script in pbm\",\"The policy contains scripts. You should only run policies from a trustworthy source.\",\"use sql script in policy based management\"],\"articleSection\":[\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/\",\"name\":\"How To Check VLF Counts in the Databases Using Policy Based Management - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png\",\"datePublished\":\"2019-06-12T20:59:57+00:00\",\"dateModified\":\"2019-06-12T20:59:58+00:00\",\"description\":\"How To Check VLF Counts in the Databases Using Policy Based Management\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png\",\"width\":664,\"height\":363},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Check VLF Counts in the Databases Using Policy Based Management\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\",\"name\":\"dbtut\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"caption\":\"dbtut\"},\"description\":\"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.\",\"sameAs\":[\"http:\/\/NurullahCAKIR\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/dbtut\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Check VLF Counts in the Databases Using Policy Based Management - Database Tutorials","description":"How To Check VLF Counts in the Databases Using Policy Based Management","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:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/","og_locale":"en_US","og_type":"article","og_title":"How To Check VLF Counts in the Databases Using Policy Based Management - Database Tutorials","og_description":"How To Check VLF Counts in the Databases Using Policy Based Management","og_url":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/","og_site_name":"Database Tutorials","article_published_time":"2019-06-12T20:59:57+00:00","article_modified_time":"2019-06-12T20:59:58+00:00","og_image":[{"width":664,"height":363,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png","type":"image\/png"}],"author":"dbtut","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dbtut","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/"},"author":{"name":"dbtut","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408"},"headline":"How To Check VLF Counts in the Databases Using Policy Based Management","datePublished":"2019-06-12T20:59:57+00:00","dateModified":"2019-06-12T20:59:58+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/"},"wordCount":764,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png","keywords":["check vlf count in a database","ExecuteSQL","script in pbm","The policy contains scripts. You should only run policies from a trustworthy source.","use sql script in policy based management"],"articleSection":["MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/","url":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/","name":"How To Check VLF Counts in the Databases Using Policy Based Management - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png","datePublished":"2019-06-12T20:59:57+00:00","dateModified":"2019-06-12T20:59:58+00:00","description":"How To Check VLF Counts in the Databases Using Policy Based Management","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/06\/Ads\u0131z-2.png","width":664,"height":363},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2019\/06\/12\/how-to-check-vlf-counts-in-the-databases-using-policy-based-management\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"How To Check VLF Counts in the Databases Using Policy Based Management"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408","name":"dbtut","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","caption":"dbtut"},"description":"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.","sameAs":["http:\/\/NurullahCAKIR"],"url":"https:\/\/dbtut.com\/index.php\/author\/dbtut\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/12441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=12441"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/12441\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/12466"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=12441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=12441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=12441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}