<?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>Webninja.org &#187; Tech</title>
	<atom:link href="http://webninja.org/archives/category/tech/feed" rel="self" type="application/rss+xml" />
	<link>http://webninja.org</link>
	<description>The digital biography of Justin King</description>
	<lastBuildDate>Wed, 13 May 2009 02:13:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>It&#8217;s here!</title>
		<link>http://webninja.org/archives/102</link>
		<comments>http://webninja.org/archives/102#comments</comments>
		<pubDate>Wed, 06 May 2009 18:03:14 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[flipcam woot.com]]></category>

		<guid isPermaLink="false">http://webninja.org/archives/102</guid>
		<description><![CDATA[Woot.com doesn&#8217;t always have stuff I want. In fact, typically it&#8217;s only a couple times per year I see something I&#8217;m interested in. Last week for the low price of $75, I saw the Flip Ultra. I&#8217;ve played around with Brandon&#8217;s flip and have wanted one for a while but didn&#8217;t really want to spend [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both"><a href="http://webninja.org/wp-content/uploads/2009/05/flipultrafront1.jpg" class="image-link"><img class="linked-to-original" src="http://webninja.org/wp-content/uploads/2009/05/flipultrafront1-thumb.jpg" height="200" align="left" width="152" style=" display: inline; float: left; margin: 0 10px 10px 0;" /></a>Woot.com doesn&#8217;t always have stuff I want. In fact, typically it&#8217;s only a couple times per year I see something I&#8217;m interested in. Last week for the low price of $75, I saw the Flip Ultra. I&#8217;ve played around with Brandon&#8217;s flip and have wanted one for a while but didn&#8217;t really want to spend the $150 on it for fear of it sitting in my laptop bag doing nothing. </p>
<p>Guess we&#8217;ll see what happens with this one. Hopefully it turns out to be more than a $75 paperweight. It doesn&#8217;t weigh much even with batteries so it probably won&#8217;t be a good one. </p>
<p style="clear: both">As a byproduct, who knows maybe I&#8217;ll even start posting videos here.</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/102/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time to give writing here another shot</title>
		<link>http://webninja.org/archives/98</link>
		<comments>http://webninja.org/archives/98#comments</comments>
		<pubDate>Tue, 05 May 2009 14:42:40 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Blogo]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webninja.org/archives/98</guid>
		<description><![CDATA[I&#8217;m giving the OSX app Blogo a try right now. More and more I find myself replacing web sites with applications that integrate with websites. Ironically I remember wanting to do this years ago for Livejournal knowing the web can only do so much. Overall I like the application so far and I&#8217;m tempted to [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both"><a href="http://webninja.org/wp-content/uploads/2009/05/image.png" class="image-link"><img class="linked-to-original" src="http://webninja.org/wp-content/uploads/2009/05/image-thumb.png" height="81" align="left" width="143" style=" display: inline; float: left; margin: 0 10px 10px 0;" /></a>I&#8217;m giving the OSX app <a href="http://www.drinkbrainjuice.com/blogo">Blogo</a> a try right now. More and more I find myself replacing web sites with applications that integrate with websites. Ironically I remember wanting to do this years ago for Livejournal knowing the web can only do so much. Overall I like the application so far and I&#8217;m tempted to buy it at the $20 price point in hopes I&#8217;ll start writing more.</p>
<p style="clear: both">On the twitter side of things, i highly recommend <a href="http://www.atebits.com/tweetie-mac/">Tweetie</a>. Enough where I sent the $11 to help support the project. I&#8217;ve been a Tweetie convert on my iPhone for the past month or so and really am enjoying it on OSX. I&#8217;m still using <a href="http://www.twhirl.org/">twhirl</a> on my PC though. It&#8217;s odd that I find so much innovation in OSX software in terms of UI and simplicity. Hopefully Windows developers are taking note.</p>
<p style="clear: both">Speaking of the web only doing so much, if you&#8217;re a PHP developer and cringe at the though of working with javascript, I highly recommend sitting down with <a href="http://www.jquery.com">jQuery</a>. We&#8217;re in the process of replacing Mootools with it and I love it. As soon as I finally get around to updating our code structure to support dynamically loading the correct plugins, life will be a breeze with it. I&#8217;ll try to get some actual decent demos up sometime soon.</p>
<p style="clear: both">Other than that, life is back to working long work days, I&#8217;m pretty sure these will never end. It builds character right? Or is it that it puts hair on my chest? The world may never know&#8230;</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/98/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Objects and Sessions</title>
		<link>http://webninja.org/archives/86</link>
		<comments>http://webninja.org/archives/86#comments</comments>
		<pubDate>Thu, 11 Dec 2008 20:24:35 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sessions]]></category>

		<guid isPermaLink="false">http://webninja.org/?p=86</guid>
		<description><![CDATA[We stumbled across an interesting issue at work today with the Zend Framework and objects.  We&#8217;re working on a filter for a series of reports that carries over from page to page and in the process of development, decided it would be best to move this from page to page within an object. The error [...]]]></description>
			<content:encoded><![CDATA[<p>We stumbled across an interesting issue at work today with the Zend Framework and objects.  We&#8217;re working on a filter for a series of reports that carries over from page to page and in the process of development, decided it would be best to move this from page to page within an object.</p>
<p>The error we were receiving while doing so however was &#8220;The script tried to execute a method or access a property of an incomplete object.&#8221;  Doing a bit of reading up on php.net, it turns out that php serializes an object, then when the session is started, it unserializes the object.  You won&#8217;t actually find out there&#8217;s a problem until you call a method that is supposed to reside within the object.</p>
<p>The work around for this problem is loading the class into memory before starting your session.  In our situation, we&#8217;re running the Zend Framework which start&#8217;s the session on it&#8217;s own and it seems unsensible to modify the Zend libraries but we still had a problem with an incomplete object.  Thus on my path to finding a way to work around this problem, I created class.cow.php.</p>
<p><span id="more-86"></span></p>
<pre class="prettyprint">class cow {

	var $name;
	var $milk;

	function __construct() {
		$this->name = 'bessie';
		$this->milk = false;
	}
	function moo() {
		echo "mooo!!!!
";
	}

	function gotMilk() {
		if($this->milk == true) {
			return true;
		} else {
			return false;
		}
	}
}</pre>
<p>Cow has all of the basics for our needs.  You can tell your cow (all cows are named Bessie btw) to moo, or check if it&#8217;s ready to be milked.  For my test, I created 2 files, the first was index1.php which will be used to create our session object, the second is index2.php which we used to load our cow object from memory.</p>
<p><strong>index1.php</strong></p>
<pre class="prettyprint"><?php
	session_start();
	include('myclass.php');

	$calf = new cow();
	echo "The cow's name is: ".$calf->name."
";

	$calf->moo();

	if($calf->gotMilk()) {
		echo "We can milk ".$calf->name."
";
	} else {
		echo $calf->name." still doesn't have any milk.
";
	}
	echo "waiting...
";
	$calf->milk = true;
	if($calf->gotMilk()) {
		echo "We can milk ".$calf->name."
";
	} else {
		echo $calf->name." still doesn't have any milk.
";
	}

	$_SESSION['calf']=$calf;
?></pre>
<p><strong>index2.php</strong></p>
<pre class="prettyprint"><?php
	session_start();
	include('myclass.php');

	$calf = $_SESSION['calf'];
	echo "The cow's name is: ".$calf->name."
";
	$calf->moo();

	if($calf->gotMilk()) {
		echo "We can milk ".$calf->name."
";
	} else {
		echo $calf->name." still doesn't have any milk.
";
	}
	echo "waiting...
";
	$calf->milk = true;
	if($calf->gotMilk()) {
		echo "We can milk ".$calf->name."
";
	} else {
		echo $calf->name." still doesn't have any milk.
";
	}

?></pre>
<p>Both files are mostly identical except for the line $calf = $_SESSION['calf']; in index2.php.  </p>
<p>Here is where we get the error: Notice: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &#8220;cow&#8221; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in index2.php on line 6.</p>
<p>The solution was to load the class, then unserialize and re-serialize our object.  The code change to $calf = unserialize(serialize($_SESSION['calf'])); resolves the issue and all works as normal.  This was pretty interesting food for thought for me, hopefully you found it to be the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/86/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google really rules my life.</title>
		<link>http://webninja.org/archives/66</link>
		<comments>http://webninja.org/archives/66#comments</comments>
		<pubDate>Wed, 14 May 2008 05:05:47 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://webninja.org/archives/66</guid>
		<description><![CDATA[I think I&#8217;ve made mention before just how much Google has changed my life. So many times during the day a quick command-K or ctrl-K gets me any of the data I&#8217;m looking for. It&#8217;s odd to see myself search Google versus other users, it seems as if my brain has learned which keywords work [...]]]></description>
			<content:encoded><![CDATA[<p>I think I&#8217;ve made mention before just how much Google has changed my life.  So many times during the day a quick command-K or ctrl-K gets me any of the data I&#8217;m looking for.  It&#8217;s odd to see myself search Google versus other users, it seems as if my brain has learned which keywords work best for my query, without me needing to think.</p>
<p>Unfortunately, lots of the world isn&#8217;t like me.  Most people don&#8217;t think in queries, and which words are most likely to be indexed.  Enter, <a href="http://www.powerset.com">Powerset</a>, a company that is working on developing a search engine targeted towards parsing the human language.  While I can applaud them for trying, I have to admit I was skeptical if they can knock google down. It&#8217;s time to do a comparison.</p>
<p><span id="more-66"></span></p>
<p>Now before I show off some comparisons, I&#8217;d like to point out that to be fair, at the moment Powerset searches Wikipedia so we&#8217;ll be comparing it to Google&#8217;s site:domain.com feature.</p>
<p>To start with, we&#8217;re going to use one of the searches they recommend &#8220;Who is Jon Stewart&#8221;</p>
<p><img src="http://www.webninja.org/stuff/powerset/js_ps.png" /></p>
<p>The first thing we see is that Powerset is giving us <a href="http://www.freebase.com/view/en/jon_stewart">data it has obtained from Freebase</a>.  Beyond that we see a list of results in Wikipedia that reference Jon.</p>
<p><img src="http://www.webninja.org/stuff/powerset/js_ps2.png" /></p>
<p>So now, let&#8217;s do some comparison shopping&#8230; and here&#8217;s Google&#8217;s results</p>
<p><img src="http://www.webninja.org/stuff/powerset/js_g.png" /></p>
<p>Based on our up front comparison, I&#8217;d say Powerset is holding up as a solid contender to Google.  Most of our results all link to one of a few things, the Wikipedia entry for Jon Stewart, the Daily Show, the short lived Jon Stewart Show, and entries on Jon Stewart in other languages.</p>
<p>Of course, this was a recommended search, I&#8217;d expect to see results like this.  Let&#8217;s go a but deeper now.  At the moment, Serenity is playing on my tv, so it seems fitting.  Let&#8217;s see what TV shows Joss Whedon has worked on.  This time, we&#8217;ll use the string, &#8220;What TV shows has Joss Whedon worked on?&#8221;</p>
<p><img src="http://www.webninja.org/stuff/powerset/jw_ps.png" /></p>
<p>I&#8217;m pretty pleased with the <a href="http://www.powerset.com/explore/pset?q=What+TV+shows+has+Joss+Whedon+worked+on%3F&amp;x=0&amp;y=0">results found with this search</a>.  How will Google compare?</p>
<p><img src="http://www.webninja.org/stuff/powerset/jw_g.png" /></p>
<p>Obviously Firefly is the most successful show that Joss has worked on, but we notice the 3rd one down, Dollhouse.  It&#8217;s Joss Whedon&#8217;s new series which I was actually unaware of.  Funny thing, PowerSet missed this so we need to give the point to Google.</p>
<p>Lastly, let&#8217;s do one more test, this time, let&#8217;s find out <em>who developed the Tesla Roadster</em>.  The Tesla Roadster is an electric sports car, developed by Larry Page and the Tesla foundation.  Due to it&#8217;s electric engine, not only is it free of pollutants, it sports an impressive 4 second 0-60 time.</p>
<p><img src="http://www.webninja.org/stuff/powerset/tm_ps.png" /></p>
<p>Good news, the Factz portion of Powerset noticed that Larry Page is an investor in Tesla Motors.  The results below the Factz show Lotus&#8217; work on the vehicle as well as well as more info on Larry Page.</p>
<p><img src="http://www.webninja.org/stuff/powerset/tm_g.png" /></p>
<p>We pretty much get the same info with Google, however we&#8217;re given a bit more info showing us Lotus played a much more important role than what PowerSet has led us to believe.   All in all, we&#8217;re really not getting much benefit from PowerSet over Google.  I like what PowerSet is trying to achieve, however I&#8217;m much more interested in seeing where other newcomers to the search engine world such as the human powered <a href="http://www.mahalo.com">Mahalo</a>.  Granted, PowerSet is still in development so we&#8217;ll just have to watch and see what comes from the San Francisco firm.  For a bit more insight, I recommend checking out the Jason Calacanis&#8217; <a href="http://www.calacanis.com/2008/05/13/the-official-verdict-on-powerset-or-what-would-i-do-if-i-was/">blog post which led to me to my research</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/66/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fun with SQL and in line queries</title>
		<link>http://webninja.org/archives/46</link>
		<comments>http://webninja.org/archives/46#comments</comments>
		<pubDate>Sun, 29 Jul 2007 17:40:36 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Neat Stuff]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://webninja.org/archives/46</guid>
		<description><![CDATA[So I&#8217;ve grown to not like the coding style of the guy before me at all. Some of his methods are quite, recursive and hellish when it comes to SQL. Several times, the easy way was taken rather than the correct way. To give you a bit of background, the main application I support controls [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve grown to not like the coding style of the guy before me at all.  Some of his methods are quite, recursive and hellish when it comes to SQL.  Several times, the easy way was taken rather than the correct way.  To give you a bit of background, the main application I support controls at outbound call center.  Agents log into the system and dial out with it.  In order to track what a current agent is doing there is a table called actions.  Everything from logging in, logging out, and more is logged here.  Over the past 2 years, this has led to over 7 million records in the table.   If you&#8217;re not a tech person, it&#8217;s about to get deep.</p>
<p>In order to determine if a user is logged in, the previous programmer would do the following.  Query the database for all users with a type of 2 (call center agent).   After that  for each user in the database of type 2 (call center agents, currently ~120 agents exist), he would query the actions table for the users last action, whether it&#8217;s action type 1 (login) or 2 (logout).  If the first returned row is of action type 1, the user is logged in.  Lastly, the code queries the actions table to see what the last campaign a user logged into.  (action type 20).  After throwing in some basic code to track the queries and time of this (and thanking John Davis along the way for teaching the importance of big O notation) I learned that an average check of who&#8217;s logged in totaled around 150-200 queries along with taking 45 seconds to a minute.  So this was one of my goals in Nashville last week, to write one massive query I could use to get the results I&#8217;m looking for.   To assist me in the insanity, I called master of all that is shoes, <a href="http://http://shoefalsefiction.blogspot.com/"><strong>Brian Schumacher</strong></a>.  We worked together back at Irresistible Ink as data developers and since he&#8217;s gone on to be a DBA in Klamath Falls, Oregon.  Well he quit last week but that&#8217;s his story not mine.</p>
<p>So after about 45 minutes of being on the phone and utilizing the greatness that is <a href="http://www.pastebin.com">pastebin</a>, we worked out a viable solution.  I present to you, possibly the most complicated query I&#8217;ve written to date.</p>
<p><code class="prettyprint">SELECT<br />
	loggedIn.lastname, loggedIn.firstname, campaigns.cpnname, DATEDIFF(ss,[actions_4].[actionwhen],getdate()) AS LoggedIn, DATEDIFF(ss,[actions_3].[actionwhen],getdate()) AS CampaignLogin<br />
FROM<br />
	(<br />
		SELECT<br />
			employees.unqempid, employees.lastname, employees.firstname, ActionIDLoggedIn.actionID<br />
		FROM<br />
		(<br />
			SELECT<br />
				unqempid, MAX(actionid) AS actionID<br />
			FROM<br />
				actions<br />
			WHERE<br />
				(actiontypeid = '1')<br />
			GROUP BY unqempid<br />
    ) AS ActionIDLoggedIn<br />
		INNER JOIN<br />
		(<br />
			SELECT<br />
				unqempid, MAX(actionid) AS actionID<br />
			FROM<br />
				actions AS actions_2<br />
			WHERE<br />
				(actiontypeid = '2')<br />
			GROUP BY<br />
				unqempid<br />
     ) AS ActionIDLoggedOut<br />
		ON<br />
			ActionIDLoggedIn.unqempid = ActionIDLoggedOut.unqempid AND<br />
			ActionIDLoggedIn.actionID > ActionIDLoggedOut.actionID<br />
			INNER JOIN<br />
				employees ON employees.unqempid = ActionIDLoggedIn.unqempid<br />
			WHERE      (employees.type = 2)<br />
  ) AS loggedIn<br />
INNER JOIN<br />
(<br />
	SELECT<br />
		unqempid, MAX(actionid) AS actionID<br />
	FROM<br />
		actions AS actions_1<br />
	WHERE<br />
		(actiontypeid = '20')<br />
	GROUP BY<br />
		unqempid<br />
) AS maxCampaign<br />
ON maxCampaign.unqempid = loggedIn.unqempid<br />
INNER JOIN<br />
	actions AS actions_3 ON maxCampaign.actionID = actions_3.actionid<br />
INNER JOIN<br />
	campaigns ON actions_3.actioninfo = campaigns.cpnid<br />
INNER JOIN<br />
	actions AS actions_4 ON loggedIn.actionID = actions_4.actionid<br />
ORDER BY<br />
  loggedIn.lastname, loggedIn.firstname<br />
</code></p>
<p>The end result, we&#8217;ve shortened this down to 1 query that takes 2-3 seconds.  Hopefully this post can only serve as help to some programmer stumbling along a similar problem as mine.</p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/46/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking at work for fun and a paycheck</title>
		<link>http://webninja.org/archives/42</link>
		<comments>http://webninja.org/archives/42#comments</comments>
		<pubDate>Tue, 17 Jul 2007 03:00:10 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://webninja.org/archives/42</guid>
		<description><![CDATA[So at the new job we have a few offices in different locations of country.  For example, next week I&#8217;m heading to Tennessee to experience the call center application I&#8217;m working on first hand.   I had just relocated one of our databases from the Michigan office to our sql server here in Minnesota and a [...]]]></description>
			<content:encoded><![CDATA[<p>So at the new job we have a few offices in different locations of country.  For example, next week I&#8217;m heading to Tennessee to experience the call center application I&#8217;m working on first hand.   I had just relocated one of our databases from the Michigan office to our sql server here in Minnesota and a report that a user from Michigan runs broke in the process.  The user called in to report the report had to be run but she wasn&#8217;t at her system.  I was told that remote desktop was disabled on these systems but the passwords I was given weren&#8217;t working properly.</p>
<p>After some failed attempts at remotely starting remote desktop, I started looking into ways to get into VNC.  They weren&#8217;t running the older vulnerable version of so that was out of the question.  After doing a bit of google searching I came across a utility called vncpwdump which allows you to dump the existing password from the registry.  Unfortunately the program was only giving me a portion of the password.  Instead I decided I was approaching this the wrong way.   I went ahead and changed my VNC password to a temporary password and then exported the registry key.</p>
<blockquote><p>Windows Registry Editor Version 5.00</p>
<p>[HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\WinVNC4]<br />
&#8220;Password&#8221;=hex:aa,aa,aa,aa,aa,aa,aa,aa<br />
&#8220;SecurityTypes&#8221;=&#8221;VncAuth&#8221;<br />
&#8220;ReverseSecurityTypes&#8221;=&#8221;None&#8221;<br />
&#8220;QueryConnect&#8221;=dword:00000000<br />
&#8220;dummy&#8221;=&#8221;"</p></blockquote>
<p>Then using <em>Connect Network Registry</em> option in the registry editor, I imported my registry file to the remote system.  <em>Voila!  </em></p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/42/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Vista and terminal service</title>
		<link>http://webninja.org/archives/38</link>
		<comments>http://webninja.org/archives/38#comments</comments>
		<pubDate>Thu, 12 Jul 2007 01:54:12 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://webninja.org/archives/38</guid>
		<description><![CDATA[I actually stumbled across this a few days ago at work.  While trying to remote desktop into our terminal server,  I kept experiencing some odd slowdowns as if the connection was intermittently working.  The odd thing, is I had no issues while typing in my password or typing in a window when I turned up [...]]]></description>
			<content:encoded><![CDATA[<p>I actually stumbled across this a few days ago at work.  While trying to remote desktop into our terminal server,  I kept experiencing some odd slowdowns as if the connection was intermittently working.  The odd thing, is I had no issues while typing in my password or typing in a window when I turned up the command prompt.  After doing a bit of searching I came across some sites that explained what was going on.</p>
<p>With Windows Vista a new technology referred to as autotuning was introduced.  This feature enables the system to adjust the size of tcp packets beyond 64kb.  To do this, a SYN packet to negotiate a larger packet size is sent to the client.  This is all fine and dandy except that some routers think this is something else and strip the acknowledgment packet so the server starts running with the new packet size, and the client sits dumbfounded.</p>
<p>To make a long story short, I disabled autotuning with the following command:</p>
<blockquote><p><em>netsh interface tcp set global autotuning=disabled </em></p></blockquote>
<p>After which, I was able to remote desktop to my hearts content.  The reason this only occured with our 2003 server was that our 2000 servers don&#8217;t support autotuning.  Go figure.</p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/38/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MSSQL to MySQL migration</title>
		<link>http://webninja.org/archives/37</link>
		<comments>http://webninja.org/archives/37#comments</comments>
		<pubDate>Tue, 10 Jul 2007 20:48:45 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://webninja.org/archives/37</guid>
		<description><![CDATA[Well today I start the initial steps of migrating our MSSQL databases to MySQL.  One of the first tasks here at the new job was to determine where our MSSQL licensing was at.  We&#8217;re currently running a version of MSSQL 2000 Personal edition so we either need to migrate or get our servers legal.  &#60;rant&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Well today I start the initial steps of migrating our MSSQL databases to MySQL.  One of the first tasks here at the new job was to determine where our MSSQL licensing was at.  We&#8217;re currently running a version of MSSQL 2000 Personal edition so we either need to migrate or get our servers legal.  &lt;rant&gt; Our existing setup is 2 servers, 1 IIS server, and another dual processor system running MSSQL.  Due to Microsoft&#8217;s awesome licensing setup, in order to be legal we need to purchase 2 MS  Windows Server Unlimited Connector licenses.  The part that makes no sense, is one is for the IIS server, the other is for the SQL server.  I can understand one, but the second is ridiculous.&lt;/rant&gt; So in the end, it&#8217;s pay $17,000+ to be legal, or move MySQL, which in the benchmarks I can find, smokes MSSQL.</p>
<p>After this, I went ahead and installed the MySQL migration tools on the MSSQL due to the application crashing on the CentOS box.  I had to modify the grant tables to allow root to remotely connect to the system.  After this, I ran into a small pitfall of the Migration tool.  The default value of some of the fields in my table refer to MSSQL functions, which aren&#8217;t compatible with MySQL so I had a compatibility error.   For example:</p>
<blockquote><p>`beginningdate` DATETIME NULL DEFAULT convert(datetime,(convert(varchar,datepart(year,getdate())) + &#8216;-&#8217; + convert(varchar,datepart(month,getdate())) + &#8216;-&#8217; + convert(varchar,datepart(day,getdate())))),</p></blockquote>
<p>Since getdate() and datepart() aren&#8217;t acceptable functions, I removed the default value for now.  After that all of the data migrated fine except for a few truncated records.  When I move this to production though I&#8217;ll be sure to solve that problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://webninja.org/archives/37/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
