<?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>Calazan.com &#187; SQL Server</title>
	<atom:link href="http://www.calazan.com/tag/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.calazan.com</link>
	<description>Share the Knowledge</description>
	<lastBuildDate>Sun, 05 Sep 2010 00:59:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to check the progress of the &#8216;Shrink Database&#8217; task in SQL Server 2005</title>
		<link>http://www.calazan.com/how-to-check-the-progress-of-the-shrink-database-task-in-sql-server-2005/</link>
		<comments>http://www.calazan.com/how-to-check-the-progress-of-the-shrink-database-task-in-sql-server-2005/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 19:11:46 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.calazan.com/?p=432</guid>
		<description><![CDATA[My first blog post in a long time!
So I archived some data from our database yesterday and I needed to shrink the database file so I ran the &#8220;Shrink Database&#8221; task in Management Studio.  The database is over 500GB in size and I checked 7 hours later and the database shrink operation is still going.  [...]]]></description>
			<content:encoded><![CDATA[<p>My first blog post in a long time!</p>
<p>So I archived some data from our database yesterday and I needed to shrink the database file so I ran the &#8220;Shrink Database&#8221; task in Management Studio.  The database is over 500GB in size and I checked 7 hours later and the database shrink operation is still going.  I got a little worried because someone needs to use this database today and I&#8217;m not sure if the task would be done by then because the GUI is not showing the progress.  I needed to know where the DBCC Shrink operation is currently at or if it&#8217;s even doing anything so I can cancel if it doesn&#8217;t look like it will finish in time.</p>
<p>The next step I took of course is open up Firefox and used my favorite search engine to look for a way to check the progress.  I found <a href="http://blogs.msdn.com/psssql/archive/2008/03/28/how-it-works-sql-server-2005-dbcc-shrink-may-take-longer-than-sql-server-2000.aspx" target="_blank">this website</a> that explained it and all I needed to do is open Query Analyzer and query <strong>sys.dm_exec_requests</strong> and look for <strong>DbccFilesCompact</strong> in the command column.</p>
<p>Here&#8217;s an example:</p>
<pre><span style="font-size: small;"><tt>SELECT percent_complete, start_time, status, command, estimated_completion_time,
cpu_time, total_elapsed_time
FROM sys.dm_exec_requests
</tt></span></pre>
<p>In my case, the percent_complete was already at 94.xxxx and slowly moving so that made me happy.  Going from 94 to the end took about 5 hours, by the way.  The entire operation took around 12 hours.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calazan.com/how-to-check-the-progress-of-the-shrink-database-task-in-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t connect to SQL Server 2005 using PHP</title>
		<link>http://www.calazan.com/cant-connect-to-sql-server-2005-using-php/</link>
		<comments>http://www.calazan.com/cant-connect-to-sql-server-2005-using-php/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 22:49:22 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.calazan.com/cant-connect-to-sql-server-2005-using-php/</guid>
		<description><![CDATA[I was updating our web application last Friday and I needed it to connect to an SQL Server 2005 Express Edition database to query some tables but my application couldn&#8217;t connect to the MSSQL server.
After a few hours of searching the internet and trying different things I finally got it to work by downloading a [...]]]></description>
			<content:encoded><![CDATA[<p>I was updating our web application last Friday and I needed it to connect to an SQL Server 2005 Express Edition database to query some tables but my application couldn&#8217;t connect to the MSSQL server.</p>
<p>After a few hours of searching the internet and trying different things I finally got it to work by downloading a newer version of <a title="ntwdblib.dll" href="http://www.calazan.com/wp-content/uploads/2008/10/ntwdblib.dll">ntwdblib.dll (version 2000.80.194.0)</a> and replacing the one that came with PHP 5.2 (we&#8217;re using WAMP (Windows, Apache, MySQL, PHP) btw).</p>
<p>In our case, I had to put it in <strong>wamp\php</strong>, <strong>wamp\Apache2\bin</strong>, and <strong>C:\Wndows\System32</strong>.</p>
<p>Also, in your application, don&#8217;t forget to add the instance name of the SQL Server in your connection string (eg. server1\instanceName).</p>
<p>Here&#8217;s an example connection string for ADOdb (it worked for me without specifying the port number):</p>
<p><em>&#8216;mssql://admin:password111@webserver01\\SQLEXPRESS/Database1&#8242;</em></p>
<p>I don&#8217;t remember the URL where I found this solution, I&#8217;ll post it here if I find it again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.calazan.com/cant-connect-to-sql-server-2005-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
