<?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>Ionut Nica &#187; transaction log</title>
	<atom:link href="http://www.rivnet.ro/tag/transaction-log/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rivnet.ro</link>
	<description>Windows, Scripting, Virtualization, Cloud Computing - tricks for getting around in the world of Technology</description>
	<lastBuildDate>Tue, 31 Jan 2012 12:10:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fix &#8220;Transaction log for database &#8216;VIM_VCDB&#8217; is full&#8221; errors</title>
		<link>http://www.rivnet.ro/2010/04/fix-transaction-log-for-database-vim_vcdb-is-full-errors.html</link>
		<comments>http://www.rivnet.ro/2010/04/fix-transaction-log-for-database-vim_vcdb-is-full-errors.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 20:08:06 +0000</pubDate>
		<dc:creator>Ionut Nica</dc:creator>
				<category><![CDATA[vCenter]]></category>
		<category><![CDATA[VMWARE]]></category>
		<category><![CDATA[transaction log]]></category>
		<category><![CDATA[VirtualCenter Service]]></category>

		<guid isPermaLink="false">http://www.rivnet.ro/?p=378</guid>
		<description><![CDATA[This is one of those &#8220;note to self posts&#8221;, in hope this may hit me again so I don&#8217;t go wandering the Internet all over again. I have a small VMware lab at home, and a few days ago I was confronted with an issue related to vCenter &#8211; the management application for VMware&#8217;s hypervisor. [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of those &#8220;note to self posts&#8221;, in hope this may hit me again so I don&#8217;t go wandering the Internet all over again. I have a small VMware lab at home, and a few days ago I was confronted with an issue related to vCenter &#8211; the management application for VMware&#8217;s hypervisor. I tried to connect to my vCenter installation &#8211; connection refused&#8230;.ok, I&#8217;ve seen this before, probably the service is not up. Initially I thought there had been a power outage at my home (they kinda happen) and the vCenter Service hanged upon starting (this also kinda happens)</p>
<p>No problem I can fix it! open services snap-in remote to vCenter machine, start service, service starts, close snapin. Start vSphere Client client works, play around with it a bit, close Client.</p>
<p>Time goes by, I need to log back into the system again for some work. Connection refused&#8230;.now this is rich, no power outage, why is the service crashing? Ok, it&#8217;s just life treating me badly VMware is acting up (not that is usually does), open service, start service, login again to vCenter, do some work, few minutes later client disconnects&#8230;reconnect not working.</p>
<p>Ok, troubleshooting mode now; open Splunk, sort by events from that host, anything that is not information from the system log. And there it was:</p>
<p style="padding-left: 60px;"><strong>Error[VdbODBCError] (-1) &#8220;ODBC error: (42000) &#8211; [Microsoft][SQL Native Client][SQL Server]The transaction log for database &#8216;VIM_VCDB&#8217; is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases&#8221; is returned when executing SQL statement &#8220;UPDATE VPX_VM WITH (ROWLOCK) SET SUSPEND_TIME = ? , BOOT_TIME = ? , SUSPEND_INTERVAL = ? , QUESTION_INFO = ? , MEMORY_OVERHEAD = ? , TOOLS_MOUNTED = ? , MKS_CONNECTIONS = ? , FAULT_TOLERANCE_STATE = ? , RECORD_REPLAY_STATE = ? WHERE ID = ?&#8221;</strong></p>
<p>Ouch, something really broke, Immediately I made quick check to see if I had disk space left, which I had, so this was not going to be this easy.</p>
<p>In that case: to the Internets! Found this <a href="http://communities.vmware.com/message/1347878;jsessionid=22AC58F641683C24EC62849C87080E24" target="_blank">thread</a> on the VMware communities. I won&#8217;t bore you anymore with the storyline, I&#8217;ll just get to fixing this issue</p>
<p><strong>Note: </strong>this is probably an extremely trivial topic that does not happen  on production databases, with vigilant DBA;s. However this is a  homelab and I&#8217;m not a DBA <img src='http://www.rivnet.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and if you are reading this, probably so are you.</p>
<h3>The Fix</h3>
<p>To fix this you will need SQL Server Management Studio Express installed either on the server holding the databases or on a management machine (in which case you better know how to give yourself remote access to the vCenter Database Server, I couldn&#8217;t, so I installed it locally on the affected machine). You&#8217;l also need a local administrator account to run the management studio under.</p>
<p>Once in the management studio, select the <strong>VIM_VCDB</strong> database, right click properties:</p>
<p><a href="http://www.rivnet.ro/wp-content/uploads/2010/04/SSMSE_01.png"><img class="aligncenter size-medium wp-image-379" title="SSMSE_01" src="http://www.rivnet.ro/wp-content/uploads/2010/04/SSMSE_01-300x80.png" alt="" width="300" height="80" /></a></p>
<p>On the left side of the new window select the <strong>File </strong>section:</p>
<p><a href="http://www.rivnet.ro/wp-content/uploads/2010/04/SSMSE_02.png"><img class="aligncenter size-medium wp-image-380" title="SSMSE_02" src="http://www.rivnet.ro/wp-content/uploads/2010/04/SSMSE_02-300x269.png" alt="" width="300" height="269" /></a>So, there are 2 files, database and the logs. The error we got mentioned log files. A quick look in my setup revealed I had reserved only 460MB for logs (screenshot taken after fix). Scroll down to the right, and find the &#8220;&#8230;&#8221; button, which will let you configure the maximum size of the log files. <a href="http://www.rivnet.ro/wp-content/uploads/2010/04/SSMSE_04.png"><img class="aligncenter size-medium wp-image-381" title="SSMSE_04" src="http://www.rivnet.ro/wp-content/uploads/2010/04/SSMSE_04-300x232.png" alt="" width="300" height="232" /></a></p>
<p>Now change this value to a bigger value, for a home lab 2GB is quite a lot actually, but i wanted to be safe. Close all windows by pressing OK, close the Management Studio.</p>
<p>After this restart <strong>VMware VirtualCenter Server</strong> service and watch your vCenter go <img src='http://www.rivnet.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Now for a little investigation why this happened. The vCenter database holds performance data, VM metadata and the likes&#8230;but how could 8VM&#8217;s gather performance data in less than 2 months that fit into 460MB which was the configured size of the log file&#8230;.Well the answer lies into vCenter Server Settings, once I started browsing the menus I remembered, that just for testing I configured the <strong>statistics logging level to 4</strong> (highest) for each retention period, and not just for testing, I Forgot to turn it off, lesson learned now.</p>
<p>p.s. This my first non scripting post <img src='http://www.rivnet.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.rivnet.ro%2F2010%2F04%2Ffix-transaction-log-for-database-vim_vcdb-is-full-errors.html&amp;title=Fix%20%26%238220%3BTransaction%20log%20for%20database%20%26%238216%3BVIM_VCDB%26%238217%3B%20is%20full%26%238221%3B%20errors" id="wpa2a_2"><img src="http://www.rivnet.ro/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.rivnet.ro/2010/04/fix-transaction-log-for-database-vim_vcdb-is-full-errors.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

