<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Refactoring Self</title>
	<atom:link href="http://refactoringself.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://refactoringself.com</link>
	<description>All about things to save your time and sanity!</description>
	<lastBuildDate>Tue, 04 Jun 2013 14:52:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='refactoringself.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Refactoring Self</title>
		<link>http://refactoringself.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://refactoringself.com/osd.xml" title="Refactoring Self" />
	<atom:link rel='hub' href='http://refactoringself.com/?pushpress=hub'/>
		<item>
		<title>Remotely connecting to SQL Server 2008 Integration Services &#8211; Access is denied error.</title>
		<link>http://refactoringself.com/2013/06/04/integration-services-access-is-denied-error/</link>
		<comments>http://refactoringself.com/2013/06/04/integration-services-access-is-denied-error/#comments</comments>
		<pubDate>Tue, 04 Jun 2013 14:52:13 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[integration services]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows administration]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=827</guid>
		<description><![CDATA[Very annoying error and I haven&#8217;t seen clear concise instructions for getting this to work. I will attempt to do that here. Open Administrative Tools &#62; Component Services Navigate to DCOM Config and open the properties for MsDtsServer100 Click on the Security tab Add the appropriate users/groups that you need and assign their permissions to [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=827&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Very annoying error and I haven&#8217;t seen clear concise instructions for getting this to work. I will attempt to do that here.</p>
<ol>
<li>Open Administrative Tools &gt; Component Services</li>
<li>Navigate to DCOM Config and open the properties for MsDtsServer100</li>
<li>Click on the Security tab</li>
<li>Add the appropriate users/groups that you need and assign their permissions to BOTH &#8220;Launch and Activation Permissions&#8221; AND &#8220;Access Permisions&#8221; (Both of whom, select Customize then Edit)</li>
<li>Click Ok to save changes and close those windows.</li>
<li>Right click on Computer, select Manage.</li>
<li>Navigate to System Tools &gt; Local Users and Groups &gt; Groups</li>
<li>Double click on Distributed COM Users</li>
<li>Add the users/groups you wanted to give permissions to.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/827/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/827/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=827&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2013/06/04/integration-services-access-is-denied-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>Parenting Hack &#8211; Feeding a child who refuses to eat</title>
		<link>http://refactoringself.com/2013/03/03/parenting-hack-feeding-a-child-who-refuses-to-eat/</link>
		<comments>http://refactoringself.com/2013/03/03/parenting-hack-feeding-a-child-who-refuses-to-eat/#comments</comments>
		<pubDate>Sun, 03 Mar 2013 15:34:21 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[Parenting]]></category>
		<category><![CDATA[kids]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[parenting]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=823</guid>
		<description><![CDATA[Being the parent of a child in the terrible 2&#8242;s can be a daunting task; they are expressing the individuality and are testing the boundaries. My daughter was refusing to eat, it was just an act of defiance. I then remembered something from the book the Art of War, take the middle ground. If she [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=823&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Being the parent of a child in the terrible 2&#8242;s can be a daunting task; they are expressing the individuality and are testing the boundaries. My daughter was refusing to eat, it was just an act of defiance.</p>
<p>I then remembered something from the book the Art of War, take the middle ground. If she won&#8217;t eat food, maybe I could get her to just hold the food. Obviously, it should be something easy for a 2 year old to hold. In this case I used pancakes. I told her to help daddy by holding a pancake for me.</p>
<p>In a minute, she ate the pancake. I asked her to hold another one for me, and wouldn&#8217;t you know that she ate that one too!</p>
<p>So I hope this helps to feed your defiant 2 year old as well!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/823/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=823&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2013/03/03/parenting-hack-feeding-a-child-who-refuses-to-eat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server Database Corruption</title>
		<link>http://refactoringself.com/2013/03/03/sql-server-database-corruption/</link>
		<comments>http://refactoringself.com/2013/03/03/sql-server-database-corruption/#comments</comments>
		<pubDate>Sun, 03 Mar 2013 15:23:00 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[70-450]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[data recovery]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[t-sql]]></category>
		<category><![CDATA[transactions]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=821</guid>
		<description><![CDATA[I&#8217;m currently studying for the 70-450 exam to obtain my MCITP in SQL Server Database Administration. I wanted to get a better understanding for SQL Server&#8217;s transaction log. I wanted to see if I could corrupt a databases MDF and recover data even after the last t-log backup. This is where the tail backup comes [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=821&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m currently studying for the 70-450 exam to obtain my MCITP in SQL Server Database Administration. I wanted to get a better understanding for SQL Server&#8217;s transaction log. I wanted to see if I could corrupt a databases MDF and recover data even after the last t-log backup. This is where the tail backup comes in.</p>
<p>The tail log backup can recover your data even if the MDF is corrupted. This is because it stores all the transactions since the last full backup and t-log backup. If the MDF is corrupted your t-log should still be able  to be backed up, unless that is corrupted too. If the database is not truly corrupt, a backup log statement with the norecovery option will work just fine. This puts your database into recovery mode and prevents users from going into the database, preserving the state of the database so the restoration can be performed.</p>
<p>Unfortunately this does not work when the database is corrupted. You have to use the option continue_after_error, this forces the backup to occur.</p>
<p>You can then restore all data back to the database using your full and t-log backups.</p>
<p>Immediately after bringing the database online, be sure to make a full backup. This way you have a good restore point and if you routinely are backing up your t-logs, your next transactional backup will work just fine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/821/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=821&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2013/03/03/sql-server-database-corruption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server &#8211; Searching for Non-Alphanumeric characters Using Like</title>
		<link>http://refactoringself.com/2013/02/13/sql-server-searching-for-non-alphanumeric-characters-using-like/</link>
		<comments>http://refactoringself.com/2013/02/13/sql-server-searching-for-non-alphanumeric-characters-using-like/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 23:04:40 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[Computers and Internet]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=816</guid>
		<description><![CDATA[All I can say is I have never really needed to search for a percent sign or square brackets or a caret in a query until today. GooBling (Googling and Binging) didn&#8217;t return any useful results. Of course Kim Tripp, one of the sage SQL Server gurus always recommends checking Books Online first, shame on [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=816&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>All I can say is I have never really needed to search for a percent sign or square brackets or a caret in a query until today. GooBling (Googling and Binging) didn&#8217;t return any useful results. Of course Kim Tripp, one of the sage SQL Server gurus always recommends checking Books Online first, shame on me for not checking there first but this wasn&#8217;t entirely obvious. Check out the details here: <a title="Like Keyword - BOL" href="http://msdn.microsoft.com/en-us/library/ms179859.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms179859.aspx</a></p>
<p>You can specify an escape character using a very, now, obvious escape character. An escape character placed in front of a pattern matching character will force SQL Server to recognize the pattern matching character as a normal character.</p>
<p>For example:</p>
<p>SELECT * FROM table WHERE col1 LIKE &#8216;%|%%&#8217; ESCAPE &#8216;|&#8217;</p>
<p>The above query will return all rows where col1 contains a percent sign.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/816/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/816/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=816&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2013/02/13/sql-server-searching-for-non-alphanumeric-characters-using-like/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>Virtual PC for Windows 7 Black Screen</title>
		<link>http://refactoringself.com/2013/01/28/virtual-pc-for-windows-7-black-screen/</link>
		<comments>http://refactoringself.com/2013/01/28/virtual-pc-for-windows-7-black-screen/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 23:32:04 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[Computers and Internet]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Testbox]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[Virtual PC]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VM]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=791</guid>
		<description><![CDATA[Virtual PC Blank or Black Screen while starting it, here is what I did to recover.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=791&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>57% of all VM launches in Virtual PC are failures. I&#8217;m joking, don&#8217;t believe everything you read on the internet (or politicians for that matter). To that end, take my solution into consideration but a warning for you, there is a distinct chance you will lose data in this case, especially if you never save changes from the Undo Disk.</p>
<p>If you are having problems booting your VM in Virtual PC, I have a trick fro those of you who have the Undo Disk enabled. If you cannot boot, you can go into settings of the VM &gt; Close in the left pane &gt; Select Prompt in the right pane.</p>
<p>Try to stop the VM and it will prompt you for an action when you close. Select &#8220;Turn Off and Delete Changes&#8221;. When it closes it deletes everything in your undo disk and it will revert your VM to a time when, hopefully it was booting correctly.</p>
<h2>Note: any changes made since the last time you committed changes from the undo disk will be gone forever. The idea here is to recover the VM to a working state. I do not want to hear that your VM is dead, you have been warned.</h2>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/791/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=791&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2013/01/28/virtual-pc-for-windows-7-black-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server Rebuild or Reoganize Your Indexes &#8211; It depends, but here is a script I use.</title>
		<link>http://refactoringself.com/2013/01/18/sql-server-rebuild-or-reoganize-your-indexes-it-depends-but-here-is-a-script-i-use/</link>
		<comments>http://refactoringself.com/2013/01/18/sql-server-rebuild-or-reoganize-your-indexes-it-depends-but-here-is-a-script-i-use/#comments</comments>
		<pubDate>Fri, 18 Jan 2013 23:46:01 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[microsoft sql server]]></category>
		<category><![CDATA[organize]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rebuild]]></category>
		<category><![CDATA[t-sql]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=741</guid>
		<description><![CDATA[SQL Server Rebuild and Reorganize Your Indexes<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=741&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>So if you are like me, chances are you have that one server where the reindexing or reorganizing is taking a long time to finish. I came up with a solution that has helped me reduce the time it takes to maintain my indexes.</p>
<h1>Background</h1>
<p>Rebuilding indexes basically recreates an index from scratch (retrieving the data from the table again) whereas reorganizing is a process that relocates the pages of an index.</p>
<h1>Rebuilding an Index</h1>
<p>Rebuilding an index is typically an offline process, unless you have the Enterprise edition of SQL Server with the online flag set (check BOL for your particular version). While non-clustered indexes are being rebuilt, the table is available. <strong>However, rebuilding clustered indexes results in the the table being offline.</strong></p>
<h1>Reorganizing an Index</h1>
<p>Reorganizing is an online process. It can reduce your fragmentation, but doesn&#8217;t always. Remember it is only moving pages around and not actually recreating the pages from data in the table.</p>
<h1>Best Practices</h1>
<p>Based on what I have read from various experts of SQL Server, rebuilding is recommended for indexes over 30 percent fragmentation. Under 30 percent, the index should be reorganized.</p>
<p>It is also recommended to not do anything to the indexes that are under 100 pages in size as they will not gain anything from a rebuild or reorganize. Of course, sometimes you might need to rebuild a small index, if for example, one of the pages has data corruption.</p>
<h1>What the Script Does</h1>
<h3>Based on the best practices I mention above, it scans the sys.indexes view of every database on your SQL Server instance and then creates (and executes) rebuild or reogranize command for each index that has more than 5% fragmentation and more than 100 pages in size.</h3>
<h3>It uses the server default fill factor, which you can set in the properties of server instance.It currently DOES rebuild clustered indexes, so if you are running this be sure to run it in your maintenance window.</h3>
<h3>I encourage you to read through and understand the script as well as test it in your test environment before running it on production to get a feel for its behavior.</h3>
<p>Let me know if it helps you out, I know it has helped me get more done in my maintenance window.</p>
<p>DECLARE @rebuildThreshold FLOAT;<br />
SET @rebuildThreshold = 30.0;</p>
<p>CREATE TABLE #indices (<br />
dbname VARCHAR(300),<br />
tablename VARCHAR(300),<br />
indexname VARCHAR(300),<br />
fragmentation FLOAT<br />
)<br />
DECLARE @db SYSNAME;<br />
DECLARE @sql VARCHAR(2000);</p>
<p>DECLARE curs CURSOR<br />
FOR<br />
SELECT  name<br />
FROM    sys.databases<br />
WHERE   name&lt;&gt;&#8217;tempdb&#8217;  AND state_desc &lt;&gt; &#8216;OFFLINE&#8217; AND is_read_only = 0</p>
<p>OPEN curs</p>
<p>FETCH NEXT FROM curs INTO @db;<br />
WHILE @@FETCH_STATUS=0<br />
BEGIN<br />
SET @sql = &#8216;SELECT &#8221;&#8217; + @db + &#8221;&#8217;,<br />
&#8221;['' + SCHEMA_NAME(schema_id) + ''].['' + OBJECT_NAME(i.object_id, DB_ID(''' + @db + ''')) + '']&#8221;,<br />
i.name AS indexname,<br />
ips.avg_fragmentation_in_percent<br />
FROM    sys.dm_db_index_physical_stats(DB_ID(&#8221;&#8217; + @db + &#8221;&#8217;), NULL, NULL, NULL, NULL) ips<br />
INNER JOIN [' + @db + '].sys.indexes i ON ips.object_id=i.object_id AND<br />
ips.index_id=i.index_id<br />
INNER JOIN [' + @db + '].sys.objects o ON i.object_id = o.object_id<br />
WHERE   page_count&gt;=100 AND<br />
avg_fragmentation_in_percent &gt; 5&#8242;;</p>
<p>INSERT  INTO #indices<br />
(<br />
dbname,<br />
tablename,<br />
indexname,<br />
fragmentation<br />
)<br />
EXEC (<br />
@sql<br />
);</p>
<p>FETCH NEXT FROM curs INTO @db;<br />
END<br />
CLOSE curs;<br />
DEALLOCATE curs;</p>
<p>DECLARE curs2 CURSOR<br />
FOR<br />
SELECT  CASE WHEN fragmentation&lt;@rebuildThreshold THEN &#8216;ALTER INDEX &#8216; + indexname + &#8216; ON [' + dbname + '].&#8217; + tablename + &#8216; REORGANIZE;&#8217;<br />
ELSE &#8216;ALTER INDEX &#8216; + indexname + &#8216; ON [' + dbname + '].&#8217; + tablename + &#8216; REBUILD;&#8217;<br />
END<br />
FROM    #indices<br />
WHERE   indexname IS NOT NULL;</p>
<p>OPEN curs2;</p>
<p>FETCH NEXT FROM curs2 INTO @sql;<br />
WHILE @@FETCH_STATUS=0<br />
BEGIN<br />
EXEC (@sql);<br />
PRINT @sql;</p>
<p>FETCH NEXT FROM curs2 INTO @sql;<br />
END</p>
<p>CLOSE curs2;<br />
DEALLOCATE curs2;</p>
<p>DROP TABLE #indices</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/741/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=741&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2013/01/18/sql-server-rebuild-or-reoganize-your-indexes-it-depends-but-here-is-a-script-i-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server Delete From vs. Truncate Table</title>
		<link>http://refactoringself.com/2012/11/08/sql-server-delete-from-vs-truncate-table/</link>
		<comments>http://refactoringself.com/2012/11/08/sql-server-delete-from-vs-truncate-table/#comments</comments>
		<pubDate>Fri, 09 Nov 2012 02:38:12 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[Computers and Internet]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[t-sql]]></category>

		<guid isPermaLink="false">https://refactoringself.wordpress.com/?p=607</guid>
		<description><![CDATA[There are some very important distinctions between these that I feel I need to explain. Delete From First and foremost delete is used for deleting a limited number of rows from a table. This is not to be used for deleting all rows in a table. Another important note is that this is a logged [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=607&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There are some very important distinctions between these that I feel I need to explain. </p>
<p><strong>Delete From</strong><br />
First and foremost delete is used for deleting a limited number of rows from a table. This is not to be used for deleting all rows in a table. </p>
<p>Another important note is that this is a logged process meaning it writes this delete into the transaction log. Which is good if you ever need to recover those rows.</p>
<p>Also deleting rows does not reset or reseed, more technically, any identity columns. So deleting the last row will not decrement the identity column.</p>
<p><strong>Truncate Table</strong><br />
So this function is to delete all rows in the table.</p>
<p>Unlike Delete, this operation is very efficient, mainly because it is not a logged process. Use this for very specific reasons, testing, repeating processes, etc.</p>
<p>Also it will reseed the identity column in your table. So for example, it will delete all the rows in your table and the identity will be reset to its initial value, by default this is the number 1.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/607/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=607&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2012/11/08/sql-server-delete-from-vs-truncate-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>Metro Apps Cannot Connect to Internet &#8211; Resolved</title>
		<link>http://refactoringself.com/2012/10/31/metro-apps-cannot-connect-to-internet-resolved/</link>
		<comments>http://refactoringself.com/2012/10/31/metro-apps-cannot-connect-to-internet-resolved/#comments</comments>
		<pubDate>Thu, 01 Nov 2012 02:49:48 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[Computers and Internet]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[win8]]></category>
		<category><![CDATA[windows 8]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=604</guid>
		<description><![CDATA[I was having problems with my upgrade to Windows 8 where my Metro Apps were not connecting to the internet. It turns out, for me, it was a very simple fix and I should have caught it sooner. I was running last year&#8217;s AVG (2012). It turns out they have a new version (2013) that [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=604&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I was having problems with my upgrade to Windows 8 where my Metro Apps were not connecting to the internet. It turns out, for me, it was a very simple fix and I should have caught it sooner.</p>
<p>I was running last year&#8217;s AVG (2012). It turns out they have a new version (2013) that works just fine with the Metro apps, simply replace your old Antivirus/Firewall and you should be good to go.</p>
<p>&nbsp;</p>
<p>Also some people from what I read on the forums were having problems because their screen resolution was to low and needed to go to a higher resolution.<br />
Hope this helps!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/604/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=604&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2012/10/31/metro-apps-cannot-connect-to-internet-resolved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>Short Tip: Get UUID of Hard Disks [Update]</title>
		<link>http://refactoringself.com/2012/10/21/601/</link>
		<comments>http://refactoringself.com/2012/10/21/601/#comments</comments>
		<pubDate>Sun, 21 Oct 2012 16:41:43 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[Computers and Internet]]></category>

		<guid isPermaLink="false">http://refactoringself.com/2012/10/21/601/</guid>
		<description><![CDATA[Reblogged from /home/liquidat - Open Source, Linux and Business: There is an update to this post available: UUIDs and Linux: Everything you ever need to know. The Universally Unique Identifier can be used to identify a device independent form its mount point or device name. This is more and more important as many devices today [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=601&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div class="reblog-post"><p class="reblog-from"><img alt='' src='http://1.gravatar.com/avatar/149998f68dddc1d05569f91559cd2c21?s=25&amp;d=monsterid&amp;r=PG' class='avatar avatar-25' height='25' width='25' /> <a href="http://liquidat.wordpress.com/2007/10/15/short-tip-get-uuid-of-hard-disks/">Reblogged from /home/liquidat - Open Source, Linux and Business:</a></p><div class="wpcom-enhanced-excerpt"><div class="wpcom-enhanced-excerpt-content"><a href="http://liquidat.wordpress.com/2007/10/15/short-tip-get-uuid-of-hard-disks/" target="_self"><img src="http://s0.wp.com/imgpress?url=http%3A%2F%2Ffarm2.static.flickr.com%2F1109%2F920839987_135ba34fff_z.jpg" alt="Click to visit the original post" class="size-full" /></a>
<p><br />
<strong>There is an update to this post available: <a href="/2013/03/13/uuids-and-linux-everything-you-ever-need-to-know/">UUIDs and Linux: Everything you ever need to know</a>.</strong></p>
<p>The <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier">Universally Unique Identifier</a> can be used to identify a device independent form its mount point or device name. This is more and more important as many devices today support hot-plugging or are external anyway. Therefore it makes sometimes sense to access a device (for example in&hellip;</p>
</div> <p class="read-more"><a href="http://liquidat.wordpress.com/2007/10/15/short-tip-get-uuid-of-hard-disks/" target="_self"><span>Read more&hellip;</span> 158 more words</a></p></div></div><div class="reblogger-note"><div class='reblogger-note-content'>
This is an awesome tip. Just to note you have to say "disk" in the path /dev/disk because without it, the command will not work. Example ls -l /dev/sda1/by-uuid is incorrect.
</div></div>]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2012/10/21/601/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
		<item>
		<title>Cannot fetch a row using a bookmark from OLE DB provider (Msg 7333, Level 16, State 2)</title>
		<link>http://refactoringself.com/2012/10/16/cannot-fetch-a-row-using-a-bookmark-from-ole-db-provider-msg-7333-level-16-state-2/</link>
		<comments>http://refactoringself.com/2012/10/16/cannot-fetch-a-row-using-a-bookmark-from-ole-db-provider-msg-7333-level-16-state-2/#comments</comments>
		<pubDate>Tue, 16 Oct 2012 19:39:22 +0000</pubDate>
		<dc:creator>John Glasgow</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[openquery]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[t-sql]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://refactoringself.com/?p=596</guid>
		<description><![CDATA[Solving Msg 7333 (Cannot fetch a row using a bookmark from OLE DB provider)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=596&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h1>Linked Server Msg 7333</h1>
<p>If you are getting this error and are trying to resolve it. Let me give you a little background information. A bookmark in this error is a left over from SQL Server 2005 SP1 and earlier. Bookmarks after 2005 SP1 is really a referred to as a key lookup, not to be confused with primary/foreign keys. From now on I am going to refer to bookmarks as key lookups so we are uniform and using the modern terminology.</p>
<p>Key lookups are objects within a query that refer to a data page (where the data is actually stored in the database) from a non-clustered index.</p>
<p>When SQL Server is executing DML (Insert, Update, Delete) against a linked server successfully for days, months, or even years and then fails with this error:</p>
<blockquote><p> Cannot fetch a row using a bookmark from OLE DB provider (Msg 7333, Level 16, State 2)</p></blockquote>
<p>Something in the query execution plan is wrong. So far I have only run into this problem using linked servers and it probably has to do with resource management within SQL Server. Perhaps someone could elaborate on this that has more experience than I. But within the query&#8217;s execution plan, SQL Server decides to switch to a different index to run the query. The query then fails because it is using an index that is lacking information to complete the request.</p>
<h3>Resolution</h3>
<p>Ultimately, you have to do the following:</p>
<ol>
<li>Look at your where criteria in your query that is dependent on the linked server.</li>
<li>Review indices on the table, that the where criteria is referring to.</li>
<li>Is your one of your criteria covered by more than one index?</li>
</ol>
<p>If you answered yes to number 3, there is a good chance that the behavior I am describing is actually causing your problem.</p>
<p>To diagnose this, disable one of the indexes  that is in question.</p>
<h2><span style="color:#ff0000;">NOTE: Never disable the clustered index, you will prevent data access to the table.</span></h2>
<p>Run the query again, and it should work, if not rebuild the disabled index to bring it back online and then disable the other index. If the query works you are in business. Talk with your database administrator, developer, or vendor of the application to come up with a good solution. But this will temporarily get your query to work.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/refactoringself.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/refactoringself.wordpress.com/596/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=refactoringself.com&#038;blog=16466279&#038;post=596&#038;subd=refactoringself&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://refactoringself.com/2012/10/16/cannot-fetch-a-row-using-a-bookmark-from-ole-db-provider-msg-7333-level-16-state-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/ee5717fdffd2ba10087566f4b095b09a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">bc6really</media:title>
		</media:content>
	</item>
	</channel>
</rss>
