<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/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>Rachit's Blog : SQL</title><link>http://weblogs.asp.net/rachit/archive/tags/SQL/default.aspx</link><description>Tags: SQL</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Missing Microsoft.SqlServer.SmoEnum Dll</title><link>http://weblogs.asp.net/rachit/archive/2009/07/29/missing-microsoft-sqlserver-smoenum-dll.aspx</link><pubDate>Wed, 29 Jul 2009 16:12:09 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7156930</guid><dc:creator>rachitp</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/rsscomments.aspx?PostID=7156930</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/commentapi.aspx?PostID=7156930</wfw:comment><comments>http://weblogs.asp.net/rachit/archive/2009/07/29/missing-microsoft-sqlserver-smoenum-dll.aspx#comments</comments><description>I like this SSB (Sql Server Broker) Admin tool but every time I refer this to somebody they come back to me with the questions that some of the DLLs are missing and they can’t launch the application. You should be able to find all the missing Dlls on...(&lt;a href="http://weblogs.asp.net/rachit/archive/2009/07/29/missing-microsoft-sqlserver-smoenum-dll.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7156930" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rachit/archive/tags/SQL/default.aspx">SQL</category><category domain="http://weblogs.asp.net/rachit/archive/tags/Service+Broker/default.aspx">Service Broker</category><category domain="http://weblogs.asp.net/rachit/archive/tags/General+Software+Development/default.aspx">General Software Development</category></item><item><title>SQL Server Power Tools</title><link>http://weblogs.asp.net/rachit/archive/2009/03/06/sql-server-power-tools.aspx</link><pubDate>Fri, 06 Mar 2009 15:38:01 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6942883</guid><dc:creator>rachitp</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/rsscomments.aspx?PostID=6942883</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/commentapi.aspx?PostID=6942883</wfw:comment><comments>http://weblogs.asp.net/rachit/archive/2009/03/06/sql-server-power-tools.aspx#comments</comments><description>The SSMS Tools Pack is a “must have” for any developer who works with the SQL Server 2005 and above. I thank a lot Mladen for making this tool available. Go give it a try! http://www.ssmstoolspack.com...(&lt;a href="http://weblogs.asp.net/rachit/archive/2009/03/06/sql-server-power-tools.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6942883" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rachit/archive/tags/SQL/default.aspx">SQL</category><category domain="http://weblogs.asp.net/rachit/archive/tags/General+Software+Development/default.aspx">General Software Development</category><category domain="http://weblogs.asp.net/rachit/archive/tags/Community+News/default.aspx">Community News</category><category domain="http://weblogs.asp.net/rachit/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Better error message please...SQL Error '...is not a recognized table hints option'</title><link>http://weblogs.asp.net/rachit/archive/2008/11/03/better-error-message-please-sql-error-is-not-a-recognized-table-hints-option.aspx</link><pubDate>Mon, 03 Nov 2008 21:29:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6718490</guid><dc:creator>rachitp</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/rsscomments.aspx?PostID=6718490</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/commentapi.aspx?PostID=6718490</wfw:comment><comments>http://weblogs.asp.net/rachit/archive/2008/11/03/better-error-message-please-sql-error-is-not-a-recognized-table-hints-option.aspx#comments</comments><description>&lt;p&gt;I was getting the following error in a stored procedure that I had written. Nothing fancy in it as far as concern with using any new features of SQL 2005.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;Msg 321, &lt;span class="kwrd"&gt;Level&lt;/span&gt; 15, &lt;span class="kwrd"&gt;State&lt;/span&gt; 1, Line 5&lt;br&gt;&lt;br&gt;"sql_handle" &lt;span class="kwrd"&gt;is&lt;/span&gt; &lt;span class="kwrd"&gt;not&lt;/span&gt; a recognized &lt;span class="kwrd"&gt;table&lt;/span&gt; hints &lt;span class="kwrd"&gt;option&lt;/span&gt;. &lt;span class="kwrd"&gt;If&lt;/span&gt; it &lt;span class="kwrd"&gt;is&lt;/span&gt; intended &lt;span class="kwrd"&gt;as&lt;/span&gt; a &lt;span class="kwrd"&gt;parameter&lt;/span&gt; &lt;span class="kwrd"&gt;to&lt;/span&gt; a &lt;span class="kwrd"&gt;table&lt;/span&gt;-valued &lt;span class="kwrd"&gt;function&lt;/span&gt;, &lt;/pre&gt;

&lt;pre class="csharpcode"&gt;ensure that your &lt;span class="kwrd"&gt;database&lt;/span&gt; compatibility mode &lt;span class="kwrd"&gt;is&lt;/span&gt; &lt;span class="kwrd"&gt;set&lt;/span&gt; &lt;span class="kwrd"&gt;to&lt;/span&gt; 90.&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;font color="#ff0000"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;I googled about it and most of the places (like &lt;a href="http://blogs.msdn.com/psssql/archive/2007/10/16/database-compatibility-and-new-features.aspx" mce_href="http://blogs.msdn.com/psssql/archive/2007/10/16/database-compatibility-and-new-features.aspx" target="_blank"&gt;this&lt;/a&gt;) the answers are about checking the database compatibility. I looked at our database's configuration and everything seemed fine to me.&lt;/p&gt;

&lt;p&gt;Then I realized that I had used the dynamic sql in the stored proc and between two lines of the sql statements, I had forgotten the "space" and that's why I was getting that error. How the hell on the earth that has to do with the error message above? &lt;/p&gt;

&lt;p&gt;Why can't SQL management studio give better (correct) error message? Come on, am I asking for too much here?&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6718490" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rachit/archive/tags/SQL/default.aspx">SQL</category></item><item><title>Change Server Url in Email for Reporting Services</title><link>http://weblogs.asp.net/rachit/archive/2008/08/02/change-server-url-in-email-for-reporting-services.aspx</link><pubDate>Sat, 02 Aug 2008 11:24:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6467992</guid><dc:creator>rachitp</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/rsscomments.aspx?PostID=6467992</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/commentapi.aspx?PostID=6467992</wfw:comment><comments>http://weblogs.asp.net/rachit/archive/2008/08/02/change-server-url-in-email-for-reporting-services.aspx#comments</comments><description>&lt;p&gt;When you schedule something to run in the Reporting Services and when the report gets emailed to the requestors, by default, in the email, you'll see http://servername/reportserver/report.... &lt;/p&gt;  &lt;p&gt;So what happens that if you are on the network (which is most likely if the reporting services is used for a corporate), you may get some DNS error that "servername" machine not found.&lt;/p&gt;  &lt;p&gt;You can change the "servername" to full qualified domain name i.e. servername.domain.com &lt;/p&gt;  &lt;p&gt;Go to your Reporting Server machine and do the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open RSWebApplication.config (C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportManager) and change the value for key "ReportServerUrl" to "server.domain.com". Save changes.&lt;/li&gt;    &lt;li&gt;Open RSReportServer.config (C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer) and change the value for key "Services/UrlRoot" to "server.domain.com/reportserver". Save changes.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;That's it. I personally would restart the IIS server and the SQL Server Reporting Services under Administrator Tools/Services. YMMV.&lt;/p&gt;  &lt;p&gt;Hope this helps somebody.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6467992" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rachit/archive/tags/SQL/default.aspx">SQL</category><category domain="http://weblogs.asp.net/rachit/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item><item><title>Learning SQL Server Broker</title><link>http://weblogs.asp.net/rachit/archive/2008/05/16/learning-sql-server-broker.aspx</link><pubDate>Fri, 16 May 2008 23:48:37 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6197224</guid><dc:creator>rachitp</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/rsscomments.aspx?PostID=6197224</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/commentapi.aspx?PostID=6197224</wfw:comment><comments>http://weblogs.asp.net/rachit/archive/2008/05/16/learning-sql-server-broker.aspx#comments</comments><description>&lt;p&gt;Working on some project, I have started delving a lot with Microsoft SQL Server Broker for 2005. I can see that the initial learning curve is very very steep and it's very easy to give up on SSB initially. But if you are like myself, learning SSB, be patient. IMHO, the possible reasons of &amp;quot;not liking&amp;quot; SSB initially are as follows:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Not having a decent GUI to develop it. (We are used to VS.Net, here you have only SSMS (SQL Server Management Studio (you can use Notepad or TextPad) and .sql file)&lt;/li&gt;    &lt;li&gt;No Project template/Wizard available (at least I don't know at the time of writing this) in SSMS.&lt;/li&gt;    &lt;li&gt;Very hard to debug when you try to implement the SSB on the distributed (remote) servers, especially when you deal with stored procs within SSB.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Despite of all above reasons, there are compelling reasons to use SSB if you are looking for performance, queuing (alternative to MSMQ) and scalability.&lt;/p&gt;  &lt;p&gt;I sincerely hope that Microsoft makes the using of SSB easier in the SQL Server 2008. Really...&lt;/p&gt;  &lt;p&gt;In future, I'll write up a few articles about the configuration, security, etc. related to SSB. So, stay tuned.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6197224" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rachit/archive/tags/Software/default.aspx">Software</category><category domain="http://weblogs.asp.net/rachit/archive/tags/SQL/default.aspx">SQL</category><category domain="http://weblogs.asp.net/rachit/archive/tags/Service+Broker/default.aspx">Service Broker</category></item><item><title>Search in All Stored Procedures Views</title><link>http://weblogs.asp.net/rachit/archive/2008/03/27/search-in-all-stored-procedures-views.aspx</link><pubDate>Thu, 27 Mar 2008 12:38:07 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6036985</guid><dc:creator>rachitp</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/rsscomments.aspx?PostID=6036985</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/rachit/commentapi.aspx?PostID=6036985</wfw:comment><comments>http://weblogs.asp.net/rachit/archive/2008/03/27/search-in-all-stored-procedures-views.aspx#comments</comments><description>&lt;p&gt;For me, the following SQL syntax turned out very handy when I wanted to see where either a table or a view or a stored procedure is being referenced. I've so many stored procedures in one of the database(used/created by other users) and it became hard to follow. &lt;/p&gt;  &lt;p&gt;Hope this helps!&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;select&lt;/span&gt; * &lt;span class="kwrd"&gt;from&lt;/span&gt; sys.all_sql_modules&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;where&lt;/span&gt; definition &lt;span class="kwrd"&gt;like&lt;/span&gt; &lt;span class="str"&gt;'%SearchText%'&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6036985" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/rachit/archive/tags/SQL/default.aspx">SQL</category></item></channel></rss>