<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/2.4.5" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Database Tools, DBA Blogs, Database Installations</title>
		<link>http://database-tools.com/blog1.php</link>
		<description>Database-tools - tools, blogs, and instructions for databases and database administrators</description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=2.4.5"/>
		<ttl>60</ttl>
				<item>
			<title>Apache: MaxClients of 1000 exceeds ServerLimit value of 256 servers.</title>
			<link>http://database-tools.com/blog1.php/2009/05/01/apache-maxclients-of-1000-exceeds-server</link>
			<pubDate>Thu, 30 Apr 2009 22:30:11 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Databases</category>
<category domain="alt">Useful Queries</category>			<guid isPermaLink="false">69@http://database-tools.com/</guid>
						<description>&lt;p&gt;Our apache cluster was not able to serve all the requests so we need to &lt;em&gt;raise MaxClients&lt;/em&gt; paramenter on each node. Unfortunatly the new value was exceeding the ServerLimit value so we had to raise it accordingly. Despite this on restart apache was again complaining that MaxClients was exceeding ServerLimit value:&lt;/p&gt;

&lt;p&gt;# /etc/init.d/apache2 restart&lt;br /&gt;
* Forcing reload of web server (apache2)...&lt;br /&gt;
WARNING: MaxClients of 1000 exceeds ServerLimit value of 256 servers,lowering MaxClients to 256.  To increase, please see the ServerLimitdirective.&lt;/p&gt;

&lt;p&gt;These are the interesting lines in &lt;em&gt;/etc/apache2/apache2.conf&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can you see something wrong here? It was hard for me to figure out how to fix the problem!&lt;/strong&gt;&lt;br /&gt;
 &lt;/p&gt;
&lt;pre&gt;
  StartServers            10
  MinSpareServers         10
  MaxSpareServers         20
  MaxClients              1000
  ServerLimit             1000
  MaxRequestsPerChild     0
  &lt;/pre&gt;
&lt;p&gt;Here the right one.&lt;br /&gt;
The point is: ServerLimit must be put before MaxClients directive!&lt;/p&gt;


&lt;pre&gt;StartServers            10
MinSpareServers         10
MaxSpareServers         20
ServerLimit             1000
MaxClients              1000
MaxRequestsPerChild     0&lt;/pre&gt;


&lt;p&gt;Hope this help you!&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/05/01/apache-maxclients-of-1000-exceeds-server&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Our apache cluster was not able to serve all the requests so we need to <em>raise MaxClients</em> paramenter on each node. Unfortunatly the new value was exceeding the ServerLimit value so we had to raise it accordingly. Despite this on restart apache was again complaining that MaxClients was exceeding ServerLimit value:</p>

<p># /etc/init.d/apache2 restart<br />
* Forcing reload of web server (apache2)...<br />
WARNING: MaxClients of 1000 exceeds ServerLimit value of 256 servers,lowering MaxClients to 256.  To increase, please see the ServerLimitdirective.</p>

<p>These are the interesting lines in <em>/etc/apache2/apache2.conf</em>.</p>

<p><strong>Can you see something wrong here? It was hard for me to figure out how to fix the problem!</strong><br />
 </p>
<pre>
  StartServers            10
  MinSpareServers         10
  MaxSpareServers         20
  MaxClients              1000
  ServerLimit             1000
  MaxRequestsPerChild     0
  </pre>
<p>Here the right one.<br />
The point is: ServerLimit must be put before MaxClients directive!</p>


<pre>StartServers            10
MinSpareServers         10
MaxSpareServers         20
ServerLimit             1000
MaxClients              1000
MaxRequestsPerChild     0</pre>


<p>Hope this help you!</p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/05/01/apache-maxclients-of-1000-exceeds-server">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/05/01/apache-maxclients-of-1000-exceeds-server#comments</comments>
		</item>
				<item>
			<title>Oracle Buying Sun, Gets MySQL</title>
			<link>http://database-tools.com/blog1.php/2009/04/28/title-2</link>
			<pubDate>Tue, 28 Apr 2009 21:04:09 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Databases</category>			<guid isPermaLink="false">67@http://database-tools.com/</guid>
						<description>&lt;p&gt;Interesting news this morning, just as the &lt;a href=&quot;http://www.mysqlconf.com/mysql2009&quot;&gt;2009 MySQL Conference &lt;/a&gt;is starting. As is being reported all over the place, Oracle has agreed to buy Sun at $9.50 per share, giving them to a ton of great technology (Solaris, ZFS, MySQL, DTrace, etc.).&lt;/p&gt;

&lt;p&gt;One one of the biggest threats to Oracle's core database business (at the low end, at least) for a while now has been MySQL. And now they're poised to own MySQL after Sun bought it not long ago. (It seems like yesterday that Oracle bought Innobase.)&lt;/p&gt;

&lt;p&gt;As I noted a while back, the MySQL landscape is changing.&lt;/p&gt;

&lt;p&gt;This news is sure to make the conference more... interesting.&lt;/p&gt;

&lt;p&gt;Oracle, please get the InnoDB team together with the MySQL team and see about GPLing ZFS.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/04/28/title-2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Interesting news this morning, just as the <a href="http://www.mysqlconf.com/mysql2009">2009 MySQL Conference </a>is starting. As is being reported all over the place, Oracle has agreed to buy Sun at $9.50 per share, giving them to a ton of great technology (Solaris, ZFS, MySQL, DTrace, etc.).</p>

<p>One one of the biggest threats to Oracle's core database business (at the low end, at least) for a while now has been MySQL. And now they're poised to own MySQL after Sun bought it not long ago. (It seems like yesterday that Oracle bought Innobase.)</p>

<p>As I noted a while back, the MySQL landscape is changing.</p>

<p>This news is sure to make the conference more... interesting.</p>

<p>Oracle, please get the InnoDB team together with the MySQL team and see about GPLing ZFS.</p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/04/28/title-2">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/04/28/title-2#comments</comments>
		</item>
				<item>
			<title>Load2Test - great load test product</title>
			<link>http://database-tools.com/blog1.php/2009/04/16/load2test-great-load-test-product</link>
			<pubDate>Thu, 16 Apr 2009 08:23:55 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Databases</category>
<category domain="alt">Oracle</category>
<category domain="alt">SQL</category>
<category domain="alt">MySQL</category>
<category domain="alt">DB2</category>			<guid isPermaLink="false">63@http://database-tools.com/</guid>
						<description>&lt;p&gt;Load2Test by &lt;a href=&quot;http://www.dbainfopower.com&quot;&gt;DBA InfoPower&lt;/a&gt; is a the best for MySQL load testing - they can record actual MySQL production traffic and replay it in staging multiple ways, like &quot;as is&quot;, &quot;load parallelization&quot;, &quot;think time reduction&quot;, etc and generate performance issues root cause analysis on a spot.&lt;/p&gt;

&lt;p&gt;I used it with number of my customers and it takes no time to do load testing and get analytics and root cause analysis back (like gathering slow-log data without any impact on a system and more), compare runs, etc&lt;/p&gt;

&lt;p&gt;They are small startup that operates &quot;under the radar&quot;. I got introduced to this product through the person who works there - and I really like the tool!!!&lt;/p&gt;

&lt;p&gt;Load2Test official page - &lt;a href=&quot;http://www.load2test.com&quot;&gt;load2test.com&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/04/16/load2test-great-load-test-product&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Load2Test by <a href="http://www.dbainfopower.com">DBA InfoPower</a> is a the best for MySQL load testing - they can record actual MySQL production traffic and replay it in staging multiple ways, like "as is", "load parallelization", "think time reduction", etc and generate performance issues root cause analysis on a spot.</p>

<p>I used it with number of my customers and it takes no time to do load testing and get analytics and root cause analysis back (like gathering slow-log data without any impact on a system and more), compare runs, etc</p>

<p>They are small startup that operates "under the radar". I got introduced to this product through the person who works there - and I really like the tool!!!</p>

<p>Load2Test official page - <a href="http://www.load2test.com">load2test.com</a></p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/04/16/load2test-great-load-test-product">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/04/16/load2test-great-load-test-product#comments</comments>
		</item>
				<item>
			<title>Oracle, Sun, MySQL</title>
			<link>http://database-tools.com/blog1.php/2009/04/01/oracle-sun-mysql</link>
			<pubDate>Wed, 01 Apr 2009 21:05:31 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Databases</category>
<category domain="alt">Oracle</category>
<category domain="alt">MySQL</category>			<guid isPermaLink="false">68@http://database-tools.com/</guid>
						<description>&lt;p&gt;So Oracle is to buy Sun now. Well, that makes sense. I guess I jumped ship just in time then. People started congratulating me yesterday that I avoided being an Oracle employee. :-) Although I was de facto a MySQL employee for a while; not sure which is worse.&lt;/p&gt;

&lt;p&gt;John Dvorak, possibly of of the most tracked-back men these days, apparently knew all along that the acquisition of MySQL by Sun was just a proxy deal for Oracle. Now with IBM nearly snatching up Sun, I guess Oracle had to react.&lt;/p&gt;

&lt;p&gt;The question inevitably arose, what will this mean for PostgreSQL. Probably not much. For one thing, you'd be overestimating the impact that Sun has on anything these days. ;-) The acquisition of MySQL by Sun eventually led to the (very small) PostgreSQL business at Sun being phased out, and it is possible that whatever is left will now fade away even more. But it really hasn't impacted the PostgreSQL community much, and won't do so now.&lt;/p&gt;

&lt;p&gt;On the contrary, open-source databases, both MySQL and PostgreSQL, have always (at least since they became credible) been considered the anti-Oracle proposition. Now with MySQL actually owned by Oracle, this makes PostgreSQL the primary alternative. Considering the sometimes irrational but not insignificant ill-will that the Sun acquisition has spread among open-source database enthusiasts, it is easy to imagine how even worse this will impact MySQL's reputation on perception alone.&lt;/p&gt;

&lt;p&gt;One might of course also think that Oracle now has a devilish plan to corner the database market from both sides. But it would be too presumptuous to assume that Oracle spends $7 billion on an anti-PostgreSQL plan. In some way, this basically only continues the path that Oracle started on when it bought Sleepycat and InnoDB a few years ago, and the impact of that on the open-source database field was pretty minimal.&lt;/p&gt;

&lt;p&gt;I don't expect that MySQL will be &quot;killed&quot; either. It is too valuable as a &quot;foot in the door&quot; in any case. Moreover, much of the MySQL momentum already lies outside of Sun anyway, in the hands of Percona, Open Query, the Monty Program, Drizzle, and others, so killing MySQL is already impossible for a single company. Which is probably a good situation for the extended open-source database community.&lt;/p&gt;

&lt;p&gt;What about the rest of Sun? I assume Oracle will be quite interested in Solaris and Java, of course, also Open Storage, Glassfish, and some of the other pieces of middleware that no one outside Sun really knows (yay, Sun marketing). Some of these pieces nicely fill the gaps in Oracle's offerings, reduce the interdependencies of Oracle with IBM and/or solidify the already existing relationships with Sun. The cloud computing initiatives might also be of interest, as Oracle has on occasion tried to become an Internet-enabled company no matter how silly the approach (remember the Network Computer or Oracle 8i/9i?). And as many have commented, keeping OpenOffice.org around just to annoy Microsoft is probably going to be worthwhile even if it doesn't make any money. I won't be surprised, however, if the hardware business, meaning SPARC on the one side, and StorageTek on the other, will be sold to someone else.&lt;/p&gt;

&lt;p&gt;What I will be interested in seeing is whether Oracle can do a better job exploiting the vertical integration story that Sun has been been pushing for basically two decades but has repeatedly failed to deliver on. (Like MySQL not building on SPARC (at some point), and JavaFX not being available for OpenSolaris.)&lt;/p&gt;

&lt;p&gt;I do feel sorry for the people at MySQL, who will have to readjust to a new employer and probably a new strategy and a few more sets of reorgs for the second time in less than two years. And all this a day before the MySQL Conference, which will now probably be completely distracted by this news. Add the conspicuous absence of any mention of MySQL in the official announcements, and the uncertainty couldn't be greater.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/04/01/oracle-sun-mysql&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>So Oracle is to buy Sun now. Well, that makes sense. I guess I jumped ship just in time then. People started congratulating me yesterday that I avoided being an Oracle employee. :-) Although I was de facto a MySQL employee for a while; not sure which is worse.</p>

<p>John Dvorak, possibly of of the most tracked-back men these days, apparently knew all along that the acquisition of MySQL by Sun was just a proxy deal for Oracle. Now with IBM nearly snatching up Sun, I guess Oracle had to react.</p>

<p>The question inevitably arose, what will this mean for PostgreSQL. Probably not much. For one thing, you'd be overestimating the impact that Sun has on anything these days. ;-) The acquisition of MySQL by Sun eventually led to the (very small) PostgreSQL business at Sun being phased out, and it is possible that whatever is left will now fade away even more. But it really hasn't impacted the PostgreSQL community much, and won't do so now.</p>

<p>On the contrary, open-source databases, both MySQL and PostgreSQL, have always (at least since they became credible) been considered the anti-Oracle proposition. Now with MySQL actually owned by Oracle, this makes PostgreSQL the primary alternative. Considering the sometimes irrational but not insignificant ill-will that the Sun acquisition has spread among open-source database enthusiasts, it is easy to imagine how even worse this will impact MySQL's reputation on perception alone.</p>

<p>One might of course also think that Oracle now has a devilish plan to corner the database market from both sides. But it would be too presumptuous to assume that Oracle spends $7 billion on an anti-PostgreSQL plan. In some way, this basically only continues the path that Oracle started on when it bought Sleepycat and InnoDB a few years ago, and the impact of that on the open-source database field was pretty minimal.</p>

<p>I don't expect that MySQL will be "killed" either. It is too valuable as a "foot in the door" in any case. Moreover, much of the MySQL momentum already lies outside of Sun anyway, in the hands of Percona, Open Query, the Monty Program, Drizzle, and others, so killing MySQL is already impossible for a single company. Which is probably a good situation for the extended open-source database community.</p>

<p>What about the rest of Sun? I assume Oracle will be quite interested in Solaris and Java, of course, also Open Storage, Glassfish, and some of the other pieces of middleware that no one outside Sun really knows (yay, Sun marketing). Some of these pieces nicely fill the gaps in Oracle's offerings, reduce the interdependencies of Oracle with IBM and/or solidify the already existing relationships with Sun. The cloud computing initiatives might also be of interest, as Oracle has on occasion tried to become an Internet-enabled company no matter how silly the approach (remember the Network Computer or Oracle 8i/9i?). And as many have commented, keeping OpenOffice.org around just to annoy Microsoft is probably going to be worthwhile even if it doesn't make any money. I won't be surprised, however, if the hardware business, meaning SPARC on the one side, and StorageTek on the other, will be sold to someone else.</p>

<p>What I will be interested in seeing is whether Oracle can do a better job exploiting the vertical integration story that Sun has been been pushing for basically two decades but has repeatedly failed to deliver on. (Like MySQL not building on SPARC (at some point), and JavaFX not being available for OpenSolaris.)</p>

<p>I do feel sorry for the people at MySQL, who will have to readjust to a new employer and probably a new strategy and a few more sets of reorgs for the second time in less than two years. And all this a day before the MySQL Conference, which will now probably be completely distracted by this news. Add the conspicuous absence of any mention of MySQL in the official announcements, and the uncertainty couldn't be greater.</p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/04/01/oracle-sun-mysql">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/04/01/oracle-sun-mysql#comments</comments>
		</item>
				<item>
			<title>SQL Server Management Studio - Null Values</title>
			<link>http://database-tools.com/blog1.php/2009/02/20/sql-server-management-studio-null-values</link>
			<pubDate>Fri, 20 Feb 2009 18:01:35 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">SQL</category>			<guid isPermaLink="false">46@http://database-tools.com/</guid>
						<description>&lt;p&gt;&lt;strong&gt;Enter null values&lt;/strong&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;em&gt;Problem: You want to enter a null value into a field using the &quot;Open Table&quot; view.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution: Press Ctrl + 0 (zero) with the field highlighted.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Works in Management Studio and Enterprise Manager.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/02/20/sql-server-management-studio-null-values&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><strong>Enter null values</strong><br />
 <br />
<em>Problem: You want to enter a null value into a field using the "Open Table" view.</em></p>

<p><strong>Solution: Press Ctrl + 0 (zero) with the field highlighted.</strong></p>

<p>Works in Management Studio and Enterprise Manager.</p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/02/20/sql-server-management-studio-null-values">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/02/20/sql-server-management-studio-null-values#comments</comments>
		</item>
				<item>
			<title>SQL Server 2005 - Cursor Example</title>
			<link>http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-cursor-example</link>
			<pubDate>Fri, 20 Feb 2009 17:58:14 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">SQL</category>
<category domain="alt">Useful Queries</category>			<guid isPermaLink="false">45@http://database-tools.com/</guid>
						<description>&lt;p&gt;SQL Server 2005: Simple Cursor Example&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DECLARE @id INT&lt;br /&gt;
DECLARE db_cursor CURSOR FOR &lt;br /&gt;
SELECT id From myTable&lt;br /&gt;
OPEN db_cursor &lt;br /&gt;
FETCH NEXT FROM db_cursor INTO @id&lt;br /&gt;
&lt;br /&gt;
WHILE @@FETCH_STATUS = 0 &lt;br /&gt;
BEGIN &lt;br /&gt;
-- do something&lt;br /&gt;
FETCH NEXT FROM db_cursor INTO @id&lt;br /&gt;
END &lt;br /&gt;
&lt;br /&gt;
CLOSE db_cursor &lt;br /&gt;
DEALLOCATE db_cursor&lt;/code&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-cursor-example&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>SQL Server 2005: Simple Cursor Example</p>

<p><code>DECLARE @id INT<br />
DECLARE db_cursor CURSOR FOR <br />
SELECT id From myTable<br />
OPEN db_cursor <br />
FETCH NEXT FROM db_cursor INTO @id<br />
<br />
WHILE @@FETCH_STATUS = 0 <br />
BEGIN <br />
-- do something<br />
FETCH NEXT FROM db_cursor INTO @id<br />
END <br />
<br />
CLOSE db_cursor <br />
DEALLOCATE db_cursor</code></p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-cursor-example">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-cursor-example#comments</comments>
		</item>
				<item>
			<title>SQL Server 2005: Show Users / Disconnect Users</title>
			<link>http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-show-users-disconnect-us</link>
			<pubDate>Fri, 20 Feb 2009 17:53:07 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">SQL</category>
<category domain="alt">Useful Queries</category>			<guid isPermaLink="false">44@http://database-tools.com/</guid>
						<description>&lt;p&gt;&lt;strong&gt;Show Users&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;USE MASTER&lt;br /&gt;
SELECT * FROM sysprocesses WHERE dbid = DB_ID('dbname')&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disconnect Users&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;USE master&lt;br /&gt;
GO&lt;br /&gt;
DECLARE @dbname varchar(30), @spid varchar(10), @start datetime&lt;br /&gt;
SELECT @start = current_timestamp, @dbname = 'dbname'&lt;br /&gt;
-- Timeout after 5 mts&lt;br /&gt;
while(exists(Select * FROM sysprocesses WHERE dbid = db_id(@dbname)) AND&lt;br /&gt;
datediff(mi, @start, current_timestamp) &lt; 5)&lt;br /&gt;
begin&lt;br /&gt;
DECLARE spids CURSOR FOR&lt;br /&gt;
SELECT convert(varchar, spid) FROM sysprocesses&lt;br /&gt;
WHERE dbid = db_id(@dbname)&lt;br /&gt;
OPEN spids&lt;br /&gt;
while(1=1)&lt;br /&gt;
BEGIN&lt;br /&gt;
FETCH spids INTO @spid&lt;br /&gt;
IF @@fetch_status &lt; 0 BREAK&lt;br /&gt;
exec('kill ' + @spid)&lt;br /&gt;
END&lt;br /&gt;
DEALLOCATE spids&lt;br /&gt;
END&lt;br /&gt;
GO&lt;/code&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-show-users-disconnect-us&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><strong>Show Users</strong><br />
<code>USE MASTER<br />
SELECT * FROM sysprocesses WHERE dbid = DB_ID('dbname')</code></p>

<p><strong>Disconnect Users</strong></p>

<p><code>USE master<br />
GO<br />
DECLARE @dbname varchar(30), @spid varchar(10), @start datetime<br />
SELECT @start = current_timestamp, @dbname = 'dbname'<br />
-- Timeout after 5 mts<br />
while(exists(Select * FROM sysprocesses WHERE dbid = db_id(@dbname)) AND<br />
datediff(mi, @start, current_timestamp) < 5)<br />
begin<br />
DECLARE spids CURSOR FOR<br />
SELECT convert(varchar, spid) FROM sysprocesses<br />
WHERE dbid = db_id(@dbname)<br />
OPEN spids<br />
while(1=1)<br />
BEGIN<br />
FETCH spids INTO @spid<br />
IF @@fetch_status < 0 BREAK<br />
exec('kill ' + @spid)<br />
END<br />
DEALLOCATE spids<br />
END<br />
GO</code></p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-show-users-disconnect-us">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/02/20/sql-server-2005-show-users-disconnect-us#comments</comments>
		</item>
				<item>
			<title>Find Product Key For SQL Server 2000 and SQL Server 2005</title>
			<link>http://database-tools.com/blog1.php/2009/01/27/find-product-key-for-sql-server-2000-and-2005</link>
			<pubDate>Tue, 27 Jan 2009 19:46:07 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Databases</category>
<category domain="alt">SQL</category>			<guid isPermaLink="false">43@http://database-tools.com/</guid>
						<description>&lt;p&gt;To find the key for your installed product perform the following steps:&lt;/p&gt;

&lt;p&gt;1. Click Run&lt;br /&gt;
2. Type regedit and click enter&lt;br /&gt;
3. Navigate to the following, depending on your version:&lt;br /&gt;
CD KEY for SQL 2000.&lt;/p&gt;

&lt;p&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration&lt;/p&gt;

&lt;p&gt;2005 comes &quot;pre-licensed&quot;, but you might take a look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Setup&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://database-tools.com/blog1.php/2009/01/27/find-product-key-for-sql-server-2000-and-2005&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://www.database-tools.com/&quot;&gt;database-tools.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>To find the key for your installed product perform the following steps:</p>

<p>1. Click Run<br />
2. Type regedit and click enter<br />
3. Navigate to the following, depending on your version:<br />
CD KEY for SQL 2000.</p>

<p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration</p>

<p>2005 comes "pre-licensed", but you might take a look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Setup</p><div class="item_footer"><p><small><a href="http://database-tools.com/blog1.php/2009/01/27/find-product-key-for-sql-server-2000-and-2005">Original post</a> blogged on <a href="http://www.database-tools.com/">database-tools.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://database-tools.com/blog1.php/2009/01/27/find-product-key-for-sql-server-2000-and-2005#comments</comments>
		</item>
			</channel>
</rss>
