<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>BDBits Bytes</title>
	<atom:link href="http://bdbits.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bdbits.wordpress.com</link>
	<description>my blog, my opinions</description>
	<lastBuildDate>Fri, 03 Apr 2009 17:05:17 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='bdbits.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/7fb38122311e3610f955dd45c56d7a9a?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>BDBits Bytes</title>
		<link>http://bdbits.wordpress.com</link>
	</image>
			<item>
		<title>Java jvm PermGen errors</title>
		<link>http://bdbits.wordpress.com/2009/04/03/java-jvm-permgen-errors/</link>
		<comments>http://bdbits.wordpress.com/2009/04/03/java-jvm-permgen-errors/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 17:05:17 +0000</pubDate>
		<dc:creator>bdbits</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bdbits.wordpress.com/?p=115</guid>
		<description><![CDATA[I recently set up a Tomcat 6.x server for our Documentum web apps, which are java-based. Annoyingly, I was regularly getting error messages saying there was insufficient memory and &#8220;PermGen&#8221; space. I won&#8217;t go into great detail about this, but at a high level, a java virtual machine (jvm) has internal memory allocations that are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=115&subd=bdbits&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently set up a Tomcat 6.x server for our Documentum web apps, which are java-based. Annoyingly, I was regularly getting error messages saying there was insufficient memory and &#8220;PermGen&#8221; space. I won&#8217;t go into great detail about this, but at a high level, a java virtual machine (jvm) has internal memory allocations that are periodically garbage-collected, i.e. no-longer-needed allocations are cleaned out and the space freed. There is a lot of debate about why and whose code is at fault, but the fact remains it doesn&#8217;t seem to work very well right now, particularly for <em>PermGen</em> space. Fortunately, after much gleaning and some experimentation, I found some startup parameters that seem to have resolved it for me. YMMV and all that, of course.</p>
<p>In Tomcat on Windows (yeah I know), go to <em>Start &gt; All Programs &gt; Apache Tomcat 6.0 &gt; Configure Tomcat</em> &gt; <em>Java</em> and put these in the <em>Java Options</em> textbox. For any other platform or java server, you probably already know where these go. :)  <em>MaxPermSize </em>may need tweaking depending on the java apps you are running. If you still get errors that indicate you are running out of <em>PermGen</em>, try increasing <em>MaxPermSize</em>, but there is a limit depending on your total memory allocation. I have mine set to 1024M max memory and Tomcat wouldn&#8217;t even start if I set <em>MaxPermSize </em>to large values like 512M. If you need that much PermGen you will need to allocate more total memory as well. <em>MaxPermSize=128M </em>seems to have been enough in my case. You&#8217;ll just have to experiment &#8211; or find a better blog post.</p>
<pre>-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:MaxPermSize=128M</pre>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bdbits.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdbits.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bdbits.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdbits.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bdbits.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdbits.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bdbits.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdbits.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bdbits.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdbits.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=115&subd=bdbits&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bdbits.wordpress.com/2009/04/03/java-jvm-permgen-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77198cdbd92e186193d7d53b4467ee43?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">bdbits</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving a SQL Server 2005 transaction log</title>
		<link>http://bdbits.wordpress.com/2009/04/02/moving-a-sql-server-2005-transaction-log/</link>
		<comments>http://bdbits.wordpress.com/2009/04/02/moving-a-sql-server-2005-transaction-log/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 16:46:53 +0000</pubDate>
		<dc:creator>bdbits</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://bdbits.wordpress.com/?p=112</guid>
		<description><![CDATA[Since I don&#8217;t do this very often, I always have to refresh my memory on the process. It is easily found via your favorite search engine, but since part of my reason for this blog is to consolidate the places I have to go to look for this kind of thing, I&#8217;m going to post [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=112&subd=bdbits&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Since I don&#8217;t do this very often, I always have to refresh my memory on the process. It is easily found via your favorite search engine, but since part of my reason for this blog is to consolidate the places I have to go to look for this kind of thing, I&#8217;m going to post it here. :)</p>
<ol>
<li>Document the current database permissions.</li>
<li>Make sure there are no active connections to the database. Really, you need to do this.</li>
<li>Check where the current files are located before you detach the database.</li>
<li>Detach the database. In SQL Server Management Studio (SSMS), just right-click the database and choose <em>Tasks</em> &gt; <em>Detach&#8230;</em> and click <em>OK</em>. The database will disappear from SSMS (gasp!).</li>
<li>Move the transaction log file.</li>
<li>Back in SSMS, right click <em>Databases</em> and pick <em>Attach&#8230;</em>, click <em>Add</em>, find your .mdb file and click <em>OK</em>.</li>
<li>In the dialog on the bottom part (<em>database details</em>), you will see the log file has <em>Not Found</em> under the Message column. Fix the pathname of the log file to the new location, use the <em>&#8230;</em> button if you like or just type it in. The error message should disappear.</li>
<li>Click <em>OK</em>. Your database is back.</li>
<li>Check the database permissions and fix them up as needed from the documentation you created earlier.</li>
</ol>
Posted in SQL Server  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bdbits.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdbits.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bdbits.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdbits.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bdbits.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdbits.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bdbits.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdbits.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bdbits.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdbits.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=112&subd=bdbits&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bdbits.wordpress.com/2009/04/02/moving-a-sql-server-2005-transaction-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77198cdbd92e186193d7d53b4467ee43?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">bdbits</media:title>
		</media:content>
	</item>
		<item>
		<title>32-bit Remote Desktop in Windows 2008</title>
		<link>http://bdbits.wordpress.com/2009/03/30/32-bit-remote-desktop-in-windows-2008/</link>
		<comments>http://bdbits.wordpress.com/2009/03/30/32-bit-remote-desktop-in-windows-2008/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 15:14:21 +0000</pubDate>
		<dc:creator>bdbits</dc:creator>
				<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://bdbits.wordpress.com/?p=108</guid>
		<description><![CDATA[I find 16-bit color desktops cause me more eyestrain than 32-bit, so I wanted my Windows Server 2008 remote desktops in all their 32-bit glory. By default, they are limited to 16-bit but this is easily remedied. Go to Start &#62; Administrative Tools &#62; Terminal Services Configuration (or Start &#62; Run &#62; tsconfig.msc), right-click the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=108&subd=bdbits&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I find 16-bit color desktops cause me more eyestrain than 32-bit, so I wanted my Windows Server 2008 remote desktops in all their 32-bit glory. By default, they are limited to 16-bit but this is easily remedied. Go to Start &gt; Administrative Tools &gt; Terminal Services Configuration (or Start &gt; Run &gt; tsconfig.msc), right-click the connection under <em>Connections</em> and select <em>Properties</em>, and select the <em>Client Settings </em>tab. <em>Color Depth </em>probably has <em>Limit Maximum Color Depth</em> checked and <em>16 bits per pixel</em> in the dropdown. Uncheck it, or change the dropdown to 32 bits per pixel. Click <em>OK</em> and you&#8217;ll likely get a dialog about how this won&#8217;t change the current session. So close that and log off and back on, making sure your client is set to use 32 bits. You should now have a 32-bit display depth and a little less eyestrain.</p>
Posted in Windows Server 2008  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bdbits.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdbits.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bdbits.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdbits.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bdbits.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdbits.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bdbits.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdbits.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bdbits.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdbits.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=108&subd=bdbits&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bdbits.wordpress.com/2009/03/30/32-bit-remote-desktop-in-windows-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77198cdbd92e186193d7d53b4467ee43?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">bdbits</media:title>
		</media:content>
	</item>
		<item>
		<title>Waiting in batch files</title>
		<link>http://bdbits.wordpress.com/2008/12/15/waiting-in-batch-files/</link>
		<comments>http://bdbits.wordpress.com/2008/12/15/waiting-in-batch-files/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 23:00:34 +0000</pubDate>
		<dc:creator>bdbits</dc:creator>
				<category><![CDATA[Microsoft Windows]]></category>

		<guid isPermaLink="false">http://bdbits.wordpress.com/?p=98</guid>
		<description><![CDATA[Unfortunately, I still have the occasional need to write a batch file that has to run on generic XP. And on such occassions, sometimes I want the script &#8211; if we can call it that &#8211; to wait for a couple of seconds at some point. Alas, XP has no sleep or similar command, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=98&subd=bdbits&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Unfortunately, I still have the occasional need to write a batch file that has to run on generic XP. And on such occassions, sometimes I want the script &#8211; if we can call it that &#8211; to wait for a couple of seconds at some point. Alas, XP has no <strong>sleep </strong>or similar command, but there is a way to simulate the functionality. I found the gist of this idea at <a title="Rob van der Woude's Scripting Pages" href="http://www.robvanderwoude.com/wait.html">Rob van der Woude&#8217;s Scripting Pages</a>, and truth be told cannot believe I had never seen or thought of this before. The core idea is to use a number of <strong>ping </strong>commands to <em>localhost</em>.</p>
<p>So for example, I wanted to kill some Documentum Desktop processes that integrate with the <strong>explorer.exe </strong>task that makes up the Windows desktop interface. But, I wanted it to pause for a moment before relaunching explorer; <strong>ping </strong>to the rescue. Here is the batch file I ended up creating for the purpose.</p>
<pre style="padding-left:30px;">@echo off
rem
rem  Kills core Documentum Desktop processes and restarts Explorer so they relaunch
rem
taskkill /f /im dcathmgr.exe /im dcevtsrv.exe /im explorer.exe
rem tasklist /nh |sort
rem --- the next line just delays for a moment
ping -n 3 localhost &gt;nul
start explorer.exe</pre>
<p>The second-to-last line simply pings <em>localhost</em> 3 times, buying a couple of seconds of delay. You can adjust the number of times upward if you want it to wait a little longer. Normally the pings will be separated by a second, but the last attempt will terminate the <strong>ping </strong>command line so you really want <em>number of seconds + 1</em>, e.g. <strong>-n 6</strong> would wait about 5 seconds.</p>
<p>And that&#8217;s all I have to say about that.</p>
Posted in Microsoft Windows  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bdbits.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdbits.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bdbits.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdbits.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bdbits.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdbits.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bdbits.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdbits.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bdbits.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdbits.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=98&subd=bdbits&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bdbits.wordpress.com/2008/12/15/waiting-in-batch-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77198cdbd92e186193d7d53b4467ee43?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">bdbits</media:title>
		</media:content>
	</item>
		<item>
		<title>Shrinking SQL Server 2005 log files &#8211; part deux</title>
		<link>http://bdbits.wordpress.com/2008/10/17/shrinking-sql-server-2005-log-files-part-deux/</link>
		<comments>http://bdbits.wordpress.com/2008/10/17/shrinking-sql-server-2005-log-files-part-deux/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 16:26:22 +0000</pubDate>
		<dc:creator>bdbits</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://bdbits.wordpress.com/?p=89</guid>
		<description><![CDATA[In Shrinking SQL Server 2005 log files I gave some standard approaches to shrinking transaction logs. I was having trouble making those work on a development server, due in part to an extreme shortage of disk space. I came up with a neat little trick that seems to work pretty well, with some caveats.
The trick [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=89&subd=bdbits&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In <a href="http://bdbits.wordpress.com/2008/09/16/shrinking-sql-server-2005-log-files/">Shrinking SQL Server 2005 log files</a> I gave some standard approaches to shrinking transaction logs. I was having trouble making those work on a development server, due in part to an extreme shortage of disk space. I came up with a neat little trick that seems to work pretty well, with some caveats.</p>
<p>The trick is to change the database recovery model from <em>Full</em> to <em>Simple</em>, change the recovery model back to <em>Full</em>, then do the <strong>dbcc shrinkfile</strong>. (The recovery model is found in the database&#8217;s properties in SQL Server Management Studio.) I think this works because changing the model to simple clears the committed transaction log entries, effectively emptying the transaction log if it is not actively being used (in which case this is probably not a good idea anyway). I should note that in case Something Bad Happens™, it would be prudent to take a backup of the database first if possible.</p>
<p>Hopefully the combination of the previous article and this little trick will help you get those transactions logs back under control.</p>
Posted in SQL Server  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bdbits.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdbits.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bdbits.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdbits.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bdbits.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdbits.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bdbits.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdbits.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bdbits.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdbits.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdbits.wordpress.com&blog=2017114&post=89&subd=bdbits&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bdbits.wordpress.com/2008/10/17/shrinking-sql-server-2005-log-files-part-deux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77198cdbd92e186193d7d53b4467ee43?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">bdbits</media:title>
		</media:content>
	</item>
	</channel>
</rss>