<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://license.citruslime.com/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CoolSQL</title><link>http://license.citruslime.com/cs/blogs/sql/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Find SQL Server database and log file size with stored procedure</title><link>http://license.citruslime.com/cs/blogs/sql/archive/2008/09/04/find-sql-server-database-and-log-file-size-with-stored-procedure.aspx</link><pubDate>Thu, 04 Sep 2008 08:14:00 GMT</pubDate><guid isPermaLink="false">0a34ab24-b62d-498c-91e2-48046adb1201:67</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://license.citruslime.com/cs/blogs/sql/rsscomments.aspx?PostID=67</wfw:commentRss><comments>http://license.citruslime.com/cs/blogs/sql/archive/2008/09/04/find-sql-server-database-and-log-file-size-with-stored-procedure.aspx#comments</comments><description>&lt;p&gt;sp_SDS is a stored procedure in the master database on CITRMANSQL2. It can be used to calculate SQL database and log file size.. It can take&amp;nbsp;4 parameters breifly described below.&lt;/p&gt;
&lt;table class="MsoNormalTable" style="mso-cellspacing:1.5pt;mso-yfti-tbllook:1184;" cellpadding="0" class="MsoNormalTable"&gt;

&lt;tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;Variable&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:1;"&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;@TargetDatabase&lt;/span&gt;&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;The database we want to size &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:2;"&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;@Level&lt;/span&gt;&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;How detailed the report should be, either at the database level or at the individual database file level&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:3;"&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;@UpdateUsage&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;The default value of 0 means we do not wish to run &amp;quot;DBCC UPDATEUSAGE&amp;quot;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:4;mso-yfti-lastrow:yes;"&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;@Unit&lt;/span&gt;&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;PADDING-RIGHT:0.75pt;BORDER-TOP:#ece9d8;PADDING-LEFT:0.75pt;PADDING-BOTTOM:0.75pt;BORDER-LEFT:#ece9d8;PADDING-TOP:0.75pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;indicates what measurement the report should be in, namely KB, MB or GB. If it&amp;#39;s not specified, the measurement used is megabytes.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Century Gothic&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:EN-GB;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&amp;nbsp; 
&lt;p&gt;Typical scenario for simple useage with default parameters&lt;/p&gt;
&lt;p&gt;USE master&lt;br /&gt;EXEC dbo.sp_SDS&lt;/p&gt;
&lt;p&gt;&lt;a href="http://media.techtarget.com/digitalguide/images/Misc/sql_sds_1.jpg" target="_blank"&gt;&lt;img alt="Result of running sp_SDS with no input parameters on a testing SQL Server 2005." src="http://media.techtarget.com/digitalguide/images/Misc/sql_sds_1_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The first column &amp;quot;Weight (%)&amp;quot; calculates the percentage of total database size that a given database takes. For example, AdventureWorks is 469.94 MB in total, divided by the grand total of 20,404.51 MB, which is 0.023 (i.e., 2.3 %).&amp;nbsp; From the report, it&amp;#39;s easy to tell that the majority of database space is taken by DBAReports (approximately 77 %). Data in this column gives DBAs a rough database picture at a glance. The remaining value-related columns are organized in a formula-like structure.&lt;/p&gt;
&lt;p&gt;See also: &lt;strong&gt;Find size of SQL Server tables and other objects with stored procedure&lt;/strong&gt; to calculate SQL server table and other&amp;nbsp;object space&lt;/p&gt;
&lt;p&gt;&lt;span class="a4"&gt;See also full instructions available in downloads section: &lt;a href="http://license.citruslime.com/cs/files/folders/sample_files/default.aspx"&gt;http://license.citruslime.com/cs/files/folders/sample_files/default.aspx&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://license.citruslime.com/cs/aggbug.aspx?PostID=67" width="1" height="1"&gt;</description></item><item><title>Find size of SQL Server tables and other objects with stored procedure.</title><link>http://license.citruslime.com/cs/blogs/sql/archive/2008/09/04/stored-procedures-for-finding-size-of-sql-databases-log-files-tables-and-other-objects.aspx</link><pubDate>Thu, 04 Sep 2008 07:23:00 GMT</pubDate><guid isPermaLink="false">0a34ab24-b62d-498c-91e2-48046adb1201:66</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://license.citruslime.com/cs/blogs/sql/rsscomments.aspx?PostID=66</wfw:commentRss><comments>http://license.citruslime.com/cs/blogs/sql/archive/2008/09/04/stored-procedures-for-finding-size-of-sql-databases-log-files-tables-and-other-objects.aspx#comments</comments><description>&lt;p&gt;sp_SOS&amp;nbsp;is a stored procedure in the master database on CITRMANSQL2. It can be used to calculate SQL server object space. It can take 8 parameters breifly described below.&lt;/p&gt;
&lt;p&gt;
&lt;table class=""&gt;

&lt;tr&gt;
&lt;td class=""&gt;&lt;b&gt;Variable&lt;/b&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;b&gt;Data type&lt;/b&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;b&gt;Nullable&lt;/b&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;b&gt;Default&lt;/b&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;b&gt;Default implication&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@DbName&lt;/td&gt;
&lt;td class=""&gt;sysname&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;NULL&lt;/td&gt;
&lt;td class=""&gt;Current database&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@SchemaName&lt;/td&gt;
&lt;td class=""&gt;sysname&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;NULL&lt;/td&gt;
&lt;td class=""&gt;All schemas&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@ObjectName&lt;/td&gt;
&lt;td class=""&gt;sysname&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;%&lt;/td&gt;
&lt;td class=""&gt;Including all objects in &amp;quot;LIKE&amp;quot; clause&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@TopClause&lt;/td&gt;
&lt;td class=""&gt;nvarchar(20)&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;NULL&lt;/td&gt;
&lt;td class=""&gt;All objects. Can be &amp;quot;TOP N&amp;quot; or &amp;quot;TOP N PERCENT&amp;quot;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@ObjectType&lt;/td&gt;
&lt;td class=""&gt;nvarchar(50)&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;NULL&lt;/td&gt;
&lt;td class=""&gt;All objects that can be sized. Valid values are S(system), U(user), V(indexed view), SQ(service broker queue), IT(internal table) or any combination of them&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@ShowInternalTable&lt;/td&gt;
&lt;td class=""&gt;nvarchar(3)&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;NULL&lt;/td&gt;
&lt;td class=""&gt;Includes internal table. The Parent excludes it in size&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@OrderBy&lt;/td&gt;
&lt;td class=""&gt;nvarchar(100)&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;NULL&lt;/td&gt;
&lt;td class=""&gt;By object name, can be any size related column. Valid short terms are N(name), R(row), T(total), U(used), I(index), D(data), F(free or unused) and Y(type)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;@UpdateUsage&lt;/td&gt;
&lt;td class=""&gt;bit&lt;/td&gt;
&lt;td class=""&gt;Yes&lt;/td&gt;
&lt;td class=""&gt;0&lt;/td&gt;
&lt;td class=""&gt;Do not run &amp;quot;DBCC UPDATEUSAGE&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Typical scenario for simple&amp;nbsp;useage&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;@DbName is the database name where you want to find object space in SQL Server. If it&amp;#39;s not supplied, it will use the current database&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;USE&lt;/font&gt;&lt;font size="2"&gt; WBSC&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;EXEC&lt;/font&gt;&lt;font size="2"&gt; dbo.sp_SOS&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Type =S(system), U(user), V(indexed view), SQ(service broker queue), IT(internal table) &lt;/p&gt;
&lt;p&gt;The formula for space is &amp;quot;Total(MB) - Unused(MB) == Used(MB) = Index(MB) + Data(MB)&amp;quot;, i.e., the used space is the simultaneous result of total minus unused as well as index plus data&lt;/p&gt;
&lt;p&gt;See also: &lt;span class="a4"&gt;&lt;strong&gt;Find size of SQL Server tables and other objects with stored procedure&lt;/strong&gt; to find SQL database and log file size&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="a4"&gt;See also full instructions available in downloads section: &lt;a href="http://license.citruslime.com/cs/files/folders/sample_files/default.aspx"&gt;http://license.citruslime.com/cs/files/folders/sample_files/default.aspx&lt;/a&gt;&lt;/p&gt;
&lt;h1 class="a4"&gt;&amp;nbsp;&lt;/h1&gt;&lt;/span&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;img height="1" alt="" src="http://license.citruslime.com/cs/controlpanel/blogs/C:/Documents%20and%20Settings/Administrator/My%20Documents/images/spObjectSize.bmp" width="1" border="0" /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://license.citruslime.com/cs/aggbug.aspx?PostID=66" width="1" height="1"&gt;</description></item><item><title>Batch Set the CitrusStore Detail Link</title><link>http://license.citruslime.com/cs/blogs/sql/archive/2008/06/20/batch-set-the-citrusstore-detail-link.aspx</link><pubDate>Fri, 20 Jun 2008 13:47:00 GMT</pubDate><guid isPermaLink="false">0a34ab24-b62d-498c-91e2-48046adb1201:53</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://license.citruslime.com/cs/blogs/sql/rsscomments.aspx?PostID=53</wfw:commentRss><comments>http://license.citruslime.com/cs/blogs/sql/archive/2008/06/20/batch-set-the-citrusstore-detail-link.aspx#comments</comments><description>&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;update&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; products &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;set&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; detaillink&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;#39;../detail.aspx?ID=&amp;#39;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;+&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff00ff" size="2"&gt;&lt;font color="#ff00ff" size="2"&gt;CAST&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;products&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;uid &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;as&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;nvarchar&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;img src="http://license.citruslime.com/cs/aggbug.aspx?PostID=53" width="1" height="1"&gt;</description></item><item><title>Dynamic Search Conditions in T-SQL</title><link>http://license.citruslime.com/cs/blogs/sql/archive/2008/02/19/dynamic-search-conditions-in-t-sql.aspx</link><pubDate>Mon, 18 Feb 2008 22:18:00 GMT</pubDate><guid isPermaLink="false">0a34ab24-b62d-498c-91e2-48046adb1201:7</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://license.citruslime.com/cs/blogs/sql/rsscomments.aspx?PostID=7</wfw:commentRss><comments>http://license.citruslime.com/cs/blogs/sql/archive/2008/02/19/dynamic-search-conditions-in-t-sql.aspx#comments</comments><description>&lt;p&gt;This is a great article on the best way to build store procedures when you have a requirement for variable clauses on your where statements (e.g. say search for an order by name or order date). Its pretty damn good!&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://www.sommarskog.se/dyn-search.html"&gt;Dynamic Search Conditions in T-SQL&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Neil&lt;/p&gt;&lt;img src="http://license.citruslime.com/cs/aggbug.aspx?PostID=7" width="1" height="1"&gt;</description><category domain="http://license.citruslime.com/cs/blogs/sql/archive/tags/Dynamic+Search/default.aspx">Dynamic Search</category><category domain="http://license.citruslime.com/cs/blogs/sql/archive/tags/Store+Procedures/default.aspx">Store Procedures</category><category domain="http://license.citruslime.com/cs/blogs/sql/archive/tags/TSQL/default.aspx">TSQL</category></item><item><title>Batch Detach Databases</title><link>http://license.citruslime.com/cs/blogs/sql/archive/2008/02/15/batch-detach-databases.aspx</link><pubDate>Fri, 15 Feb 2008 10:53:00 GMT</pubDate><guid isPermaLink="false">0a34ab24-b62d-498c-91e2-48046adb1201:6</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://license.citruslime.com/cs/blogs/sql/rsscomments.aspx?PostID=6</wfw:commentRss><comments>http://license.citruslime.com/cs/blogs/sql/archive/2008/02/15/batch-detach-databases.aspx#comments</comments><description>&lt;p&gt;Run this script and send the results to a text file. The resulting text file is a script to detach every database on the server. &lt;/p&gt;
&lt;p&gt;--Detaching&lt;br /&gt;EXEC sp_MSforeachdb&lt;br /&gt;&amp;#39;IF N&amp;#39;&amp;#39;?&amp;#39;&amp;#39; NOT IN(&amp;#39;&amp;#39;model&amp;#39;&amp;#39; ,&amp;#39;&amp;#39;master&amp;#39;&amp;#39;, &amp;#39;&amp;#39;msdb&amp;#39;&amp;#39;, &amp;#39;&amp;#39;tempdb&amp;#39;&amp;#39;)&lt;br /&gt;BEGIN&lt;br /&gt;SELECT &amp;#39;&amp;#39;EXEC sp_detach_db &amp;#39;&amp;#39;&amp;#39;&amp;#39;?&amp;#39;&amp;#39;&amp;#39;&amp;#39;,&amp;#39;&amp;#39;&amp;#39;&amp;#39;true&amp;#39;&amp;#39;&amp;#39;&amp;#39;&amp;#39;&amp;#39;&lt;br /&gt;END&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://license.citruslime.com/cs/aggbug.aspx?PostID=6" width="1" height="1"&gt;</description><category domain="http://license.citruslime.com/cs/blogs/sql/archive/tags/Detach+SQL2000+SQL2005/default.aspx">Detach SQL2000 SQL2005</category></item></channel></rss>