<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VCritical &#187; SQL Server</title>
	<atom:link href="http://www.vcritical.com/tag/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vcritical.com</link>
	<description>Informed Virtualization Criticism</description>
	<lastBuildDate>Wed, 19 Oct 2011 22:08:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>VMware vCenter Server 4 task and event retention</title>
		<link>http://www.vcritical.com/2009/04/vmware-vcenter-server-4-task-and-event-retention/</link>
		<comments>http://www.vcritical.com/2009/04/vmware-vcenter-server-4-task-and-event-retention/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 04:09:03 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1046</guid>
		<description><![CDATA[As tasks and events happen in vCenter Server they are logged in the VC database.  After a while these tables can become quite large. Prior to vCenter Server 4, customers wishing to prune their VC database down needed to do so manually.  VMware provides an SQL script via KB 1000125 that allows administrators to delete [...]]]></description>
			<content:encoded><![CDATA[<p>As tasks and events happen in vCenter Server they are logged in the VC database.  After a while these tables can become quite large.</p>
<p>Prior to vCenter Server 4, customers wishing to prune their VC database down needed to do so manually.  VMware provides an SQL script via <a href="http://kb.vmware.com/kb/1000125">KB 1000125</a> that allows administrators to delete old tasks, events, and <a href="http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/">performance stats</a>.  <em>By the way, I am the author of that SQL Server purge script &#8212; fear my mad T-SQL skillz!</em></p>
<p>What a difference a vSphere makes&#8230;  Now in vCenter Server 4, there is a simple administrative option to configure the retention period for tasks and events.  By default, the data is retained indefinitely, but as you can see, it&#8217;s quite easy to set it up according to your needs:</p>
<p><img class="alignnone size-full wp-image-1047" title="vCenter Server database retention settings" src="http://www.vcritical.com/wp-content/uploads/2009/04/vcenterdatabaseretention.png" alt="vCenter Server database retention settings" width="484" height="374" /></p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/' rel='bookmark' title='VMware vCenter really needs an agent'>VMware vCenter really needs an agent</a></li>
<li><a href='http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/' rel='bookmark' title='VMware vCenter Server performance stats levels'>VMware vCenter Server performance stats levels</a></li>
<li><a href='http://www.vcritical.com/2009/10/powershell-prevents-datastore-emergencies/' rel='bookmark' title='PowerShell Prevents Datastore Emergencies'>PowerShell Prevents Datastore Emergencies</a></li>
<li><a href='http://www.vcritical.com/2009/02/installing-vcenter-on-linux-technical-preview/' rel='bookmark' title='Installing vCenter on Linux Technical Preview'>Installing vCenter on Linux Technical Preview</a></li>
</ol></p><div style="font-family:Verdana; color:#000000; background-color: #C0C0C0; padding: 7px;border: dashed thin">

<a href="http://www.vcritical.com/2009/04/vmware-vcenter-server-4-task-and-event-retention/#respond">Leave a Comment</a> •
<a href="http://feedproxy.google.com/vcritical">Subscribe to RSS</a> •
<a href="http://feedburner.google.com/fb/a/mailverify?uri=vcritical&loc=en_US">Subscribe via Email</a> •
<a href="http://www.twitter.com/eric_gray">Follow Eric Gray on Twitter</a><br/>

More articles on: <a href="http://www.vcritical.com/tag/database/" rel="tag">database</a>, <a href="http://www.vcritical.com/tag/sql-server/" rel="tag">SQL Server</a>, <a href="http://www.vcritical.com/tag/vcenter/" rel="tag">vCenter</a>, <a href="http://www.vcritical.com/tag/vsphere/" rel="tag">vSphere</a> • <a href="http://www.vcritical.com/category/virtualizationism/">Browse All Virtualization Content</a><br/>

<a href="http://www.vcritical.com/2009/04/vmware-vcenter-server-4-task-and-event-retention/">VMware vCenter Server 4 task and event retention</a> by <a href="http://www.vcritical.com/about/">Eric Gray</a> © 2009 • <a href="http://www.vcritical.com/">VCritical</a>

</div>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/04/vmware-vcenter-server-4-task-and-event-retention/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VMware vCenter Server performance stats levels</title>
		<link>http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/</link>
		<comments>http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 17:43:54 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[vCenter]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=976</guid>
		<description><![CDATA[VirtualCenter (vCenter) database storage requirements grow rapidly as administrators increase the levels from default settings.]]></description>
			<content:encoded><![CDATA[<p>In a recent post, I explained the <a href="http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/">essential role that your database job scheduler</a> (e.g., SQL Server Agent) plays in keeping the vCenter (VirtualCenter) database size under control.  The <strong>statistics level</strong> is another critical factor that affects your database storage and performance requirements.</p>
<p>The statistics levels are easily &#8212; perhaps <em>too </em>easily &#8212; configured by using the VI Client:</p>
<p><a href="http://www.vcritical.com/wp-content/uploads/2009/04/vc_stats_config.png"><img class="alignnone size-medium wp-image-978" title="vCenter Server statistics configuration dialog" src="http://www.vcritical.com/wp-content/uploads/2009/04/vc_stats_config-300x238.png" alt="vCenter Server statistics configuration dialog" width="300" height="238" /></a></p>
<p>You can read in more depth about the performance statistics in the <a href="http://pubs.vmware.com/vi35u2/wwhelp/wwhimpl/js/html/wwhelp.htm">Basic System Administration</a> manual and the <a href="http://www.vmware.com/resources/techresources/771">VirtualCenter Monitoring and Performance Statistics</a> Tech Note, which has this to say about stats level selection:</p>
<blockquote><p>Level 1 has very low overhead on both the VirtualCenter server as well as the ESX Server hosts. Levels 2 – 4 have slightly greater overhead on ESX, but can adversely impact VirtualCenter performance if there are more than 10 ESX Server hosts. In particular Level 4 can quickly fill the VirtualCenter database, so it should only be turned on for limited periods of time.</p></blockquote>
<p>When it says <strong>Level 4 can quickly fill the VirtualCenter database</strong>, that&#8217;s not hyperbole.  Take a look at this chart to see what happens when the &#8220;5 minute&#8221; interval is changed from level 1 to level 4:</p>
<p><a href="http://www.vcritical.com/wp-content/uploads/2009/04/level4_enabled.png"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-medium wp-image-990" title="Statistics level 4 enabled" src="http://www.vcritical.com/wp-content/uploads/2009/04/level4_enabled-300x198.png" alt="Statistics level 4 enabled" width="300" height="198" /></a>The VPX_HIST_STAT1 table &#8212; the one that corresponds with the &#8220;5 minute&#8221; interval &#8212; immediately begins consuming many times its previous size.  After a day, the number of rows in that table increased about 20 times!  (The tick marks across the x-axis of this chart each represent an hour.)<span id="more-976"></span></p>
<p>Recovery is simple, but not immediate.  After resetting to level 1, the additional rows disappear through attrition as the rollup process does its job.</p>
<p><a href="http://www.vcritical.com/wp-content/uploads/2009/04/level4_recovered.png"><img class="size-medium wp-image-992 alignnone" title="Statistics level 1 re-enabled" src="http://www.vcritical.com/wp-content/uploads/2009/04/level4_recovered-300x199.png" alt="Statistics level 1 re-enabled" width="300" height="199" /></a></p>
<p>The statistics levels are configurable in order to collect more detailed performance data on your VMware infrastructure.  As with most things, there is a tradeoff &#8212; making it critical for administrators to know that a seemingly simple change via the UI can put a huge hit on your database &#8212; not only in storage requirements but performance, too.  Do yourself a favor and talk to your DBA before changing your vCenter Server performance stats levels.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/04/vmware-vcenter-server-4-task-and-event-retention/' rel='bookmark' title='VMware vCenter Server 4 task and event retention'>VMware vCenter Server 4 task and event retention</a></li>
<li><a href='http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/' rel='bookmark' title='VMware vCenter really needs an agent'>VMware vCenter really needs an agent</a></li>
<li><a href='http://www.vcritical.com/2009/11/vsphere-thin-provisioned-disk-performance/' rel='bookmark' title='vSphere Thin-Provisioned Disk Performance'>vSphere Thin-Provisioned Disk Performance</a></li>
<li><a href='http://www.vcritical.com/2008/10/upgrading-your-management-platform-from-the-entry-level-edition/' rel='bookmark' title='Upgrading your management platform from the entry-level edition'>Upgrading your management platform from the entry-level edition</a></li>
</ol></p><div style="font-family:Verdana; color:#000000; background-color: #C0C0C0; padding: 7px;border: dashed thin">

<a href="http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/#respond">Leave a Comment</a> •
<a href="http://feedproxy.google.com/vcritical">Subscribe to RSS</a> •
<a href="http://feedburner.google.com/fb/a/mailverify?uri=vcritical&loc=en_US">Subscribe via Email</a> •
<a href="http://www.twitter.com/eric_gray">Follow Eric Gray on Twitter</a><br/>

More articles on: <a href="http://www.vcritical.com/tag/pass/" rel="tag">PASS</a>, <a href="http://www.vcritical.com/tag/sql-server/" rel="tag">SQL Server</a>, <a href="http://www.vcritical.com/tag/technical/" rel="tag">Technical</a>, <a href="http://www.vcritical.com/tag/vcenter/" rel="tag">vCenter</a> • <a href="http://www.vcritical.com/category/virtualizationism/">Browse All Virtualization Content</a><br/>

<a href="http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/">VMware vCenter Server performance stats levels</a> by <a href="http://www.vcritical.com/about/">Eric Gray</a> © 2009 • <a href="http://www.vcritical.com/">VCritical</a>

</div>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VMware vCenter really needs an agent</title>
		<link>http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/</link>
		<comments>http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 02:24:26 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[vCenter]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=954</guid>
		<description><![CDATA[As vCenter Server (VirtualCenter) collects performance data, it is stored in the VC database.  As the data ages, it is aggregated to save storage space.]]></description>
			<content:encoded><![CDATA[<p>One of the great features of VMware vCenter Server (a.k.a. VirtualCenter, or VC) is the performance charts for virtual machines and other objects in the inventory.  Here is a typical chart:</p>
<p><a href="http://www.vcritical.com/wp-content/uploads/2009/04/performance_chart.png"><img class="alignnone size-medium wp-image-955" title="VMware vCenter Server performance chart" src="http://www.vcritical.com/wp-content/uploads/2009/04/performance_chart-300x161.png" alt="VMware vCenter Server performance chart" width="300" height="161" /></a></p>
<p>Managing the data behind these charts is actually a very demanding responsibility of vCenter: receiving, storing, and later aggregating to keep the database size under control.  Starting with VC 2.5, a couple of big changes were made in this area to help with scalability: the schema was modified to divide stats data into multiple tables, and the rollup duty (data aggregation) was delegated to the database server&#8217;s native job scheduling mechanism.  This article focuses on SQL Server and the SQL Server Agent; there is an equivalent capability in Oracle as you would suspect.</p>
<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="size-full wp-image-958 alignright" title="SQL Server Agent vCenter jobs" src="http://www.vcritical.com/wp-content/uploads/2009/04/sql_agent_jobs.png" alt="SQL Server Agent vCenter jobs" width="255" height="204" /></p>
<p>The VC 2.5 installer creates a set of three jobs (for past day, month, and week) and throws up a notice reminding you to make sure the SQL Server Agent is running on your database server &#8212; for good reason, ignore it at your own peril.  You can see the jobs in the SQL Server Management Studio.</p>
<p>You&#8217;ll notice in this example there are actually three instances of each of the three jobs because there are multiple vCenter databases hosted on this SQL Server.  While not typical, it makes perfect sense in a test environment.<span id="more-954"></span></p>
<p style="padding-left: 30px;"><strong>Backstory</strong> In the initial VC 2.5 release, the jobs always had a static name, thus making it impossible to run multiple vCenter Servers against one SQL Server instance.  I knew that was going to annoy a lot of people, so I filed a bug to have it changed &#8212; finally got it in 2.5 Update 2.</p>
<p>What happens if the SQL Server Agent is stopped and these rollup jobs quit running?  A picture is worth a thousand words:</p>
<p><a href="http://www.vcritical.com/wp-content/uploads/2009/04/sql_agent_jobs_disabled.png"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="size-medium wp-image-960 alignleft" title="SQL Agent jobs disabled" src="http://www.vcritical.com/wp-content/uploads/2009/04/sql_agent_jobs_disabled-300x199.png" alt="SQL Agent jobs disabled" width="300" height="199" /></a></p>
<p>In this chart, the abrupt increase in database rows corresponds to the point in time that the rollup jobs were disabled.  vCenter continues receiving performance stats from hosts and dutifully depositing them in VPX_HIST_STAT1.</p>
<p>Essentially, the most granular data (VPX_HIST_STAT1) starts piling up, never aggregating into the summarized tables for longer-term storage.  In a large environment, it is not uncommon to see millions of rows in these tables.  If something goes wrong with the rollup jobs, those millions start multiplying in a hurry.</p>
<p>One nice thing about having the rollups controlled by the SQL Agent is that VC does not even need to be running for the process to take place, which also takes some load off of the VC server.  After resuming the jobs, the data flood quickly subsides and things go back on track:</p>
<p><a href="http://www.vcritical.com/wp-content/uploads/2009/04/agent_jobs_resumed.png"><img class="alignnone size-medium wp-image-962" title="SQL Agent jobs resumed" src="http://www.vcritical.com/wp-content/uploads/2009/04/agent_jobs_resumed-300x200.png" alt="SQL Agent jobs resumed" width="300" height="200" /></a></p>
<p>One note about <strong>SQL Server Express</strong>, the bundled database included with VC: There is no SQL Agent in that product.  Before you panic, please realize that VMware engineers <em>know this</em>.  For those deployments, the rollup stored procedures are simply kicked off by vCenter Server (vpxd), just like VC 2.0.x.  I could not believe the creative workarounds some well-meaning folks have attempted to implement because of this situation &#8212; it had something to do with the Windows task scheduler.  Please do not do that!</p>
<p>Hopefully now you have a little better understanding of the relationship between your database job scheduler, vCenter Server, and the size of your vCenter database.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/04/vmware-vcenter-server-4-task-and-event-retention/' rel='bookmark' title='VMware vCenter Server 4 task and event retention'>VMware vCenter Server 4 task and event retention</a></li>
<li><a href='http://www.vcritical.com/2009/04/vmware-vcenter-server-performance-stats-levels/' rel='bookmark' title='VMware vCenter Server performance stats levels'>VMware vCenter Server performance stats levels</a></li>
<li><a href='http://www.vcritical.com/2009/02/installing-vcenter-on-linux-technical-preview/' rel='bookmark' title='Installing vCenter on Linux Technical Preview'>Installing vCenter on Linux Technical Preview</a></li>
<li><a href='http://www.vcritical.com/2009/02/new-vmware-esxi-management-kit/' rel='bookmark' title='New VMware ESXi Management Kit'>New VMware ESXi Management Kit</a></li>
</ol></p><div style="font-family:Verdana; color:#000000; background-color: #C0C0C0; padding: 7px;border: dashed thin">

<a href="http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/#respond">Leave a Comment</a> •
<a href="http://feedproxy.google.com/vcritical">Subscribe to RSS</a> •
<a href="http://feedburner.google.com/fb/a/mailverify?uri=vcritical&loc=en_US">Subscribe via Email</a> •
<a href="http://www.twitter.com/eric_gray">Follow Eric Gray on Twitter</a><br/>

More articles on: <a href="http://www.vcritical.com/tag/pass/" rel="tag">PASS</a>, <a href="http://www.vcritical.com/tag/sql-server/" rel="tag">SQL Server</a>, <a href="http://www.vcritical.com/tag/technical/" rel="tag">Technical</a>, <a href="http://www.vcritical.com/tag/vcenter/" rel="tag">vCenter</a> • <a href="http://www.vcritical.com/category/virtualizationism/">Browse All Virtualization Content</a><br/>

<a href="http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/">VMware vCenter really needs an agent</a> by <a href="http://www.vcritical.com/about/">Eric Gray</a> © 2009 • <a href="http://www.vcritical.com/">VCritical</a>

</div>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/04/vmware-vcenter-really-needs-an-agent/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

