<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>La bodeguita de Nacho</title><link>http://blogs.msdn.com/ialonso/default.aspx</link><description>SQL Server Troubleshooting Stories - "y una ración de bravas"</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>TMP/TEMP/USERPROFILE environment variables: the closer they point to, the better</title><link>http://blogs.msdn.com/ialonso/archive/2008/05/29/tmp-temp-userprofile-environment-variables-the-closer-they-point-to-the-better.aspx</link><pubDate>Thu, 29 May 2008 20:56:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8560129</guid><dc:creator>ialonso</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/8560129.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=8560129</wfw:commentRss><description>One recent discovery I wanted to eventually share here. Many more programs than you would expect, store information in temporary files. If you configure your environment so that those temporary files get created in a remote location, you will suffer the...(&lt;a href="http://blogs.msdn.com/ialonso/archive/2008/05/29/tmp-temp-userprofile-environment-variables-the-closer-they-point-to-the-better.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8560129" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/Management+Studio/default.aspx">Management Studio</category></item><item><title>Next week (Tue 26th/Wed 27th), you cannot miss it! See you at Microsoft TechDays {The Evolution Show} in Madrid</title><link>http://blogs.msdn.com/ialonso/archive/2008/02/22/next-week-tue-26th-wed-27th-you-cannot-miss-it-see-you-at-microsoft-techdays-the-evolution-show-in-madrid.aspx</link><pubDate>Thu, 21 Feb 2008 23:09:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7842818</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7842818.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7842818</wfw:commentRss><description>&lt;p&gt;I'll be there, morning to evening, both days (26th and 27th) responsible for an area we have called &amp;quot;Rinc&amp;#243;n t&amp;#233;cnico de SQL Server&amp;quot; (SQL Server Technical Corner) where &amp;quot;Ask The Expert&amp;quot; sessions will be running virtually non-stop.&lt;/p&gt;  &lt;p&gt;I'll also be participating in a few sessions. One of them (26th @ 12:30 AM in the Expo Autitorium) where a panel of SQL Server technology experts will be answering all those interesting questions which I'm sure you, the audience, will bring with and ask that day. A second session (26th @ 4:00 PM in the Expo Auditorium) I'll be delivering about how can you accomplish a painless upgrade to SQL Server 2008. The last formal session I'll be presenting (26th @ 4:25 PM in the Expo Auditorium) is about performance optimization and improvements introduced with SQL Server 2008.&lt;/p&gt;  &lt;p&gt;For the remaining of the event, I'll spend most of the time around the SQL Server Ask The Experts zone, where my co-workers from SQL Server support will be delivering in-depth chat talks on very interesting and specific topics like: backup compression, table/index partitioning, Reporting Services improvements, Performance Data Collector, Best Design Practices for RS reports, troubleshooting most typical Kerberos authentication/delegation issues, learning from accumulated experience on the top 10 issues encountered when using VS TFS (Visual Studio Team Foundation Server), etc.&lt;/p&gt;  &lt;p&gt;So, whether you want to come and join us in these pre-defined sessions or simply want to approach us to and bring us your experience with the product and invaluable feedback, you'll be more than welcome.&lt;/p&gt;  &lt;p&gt;Further information about this fantastic event you can find on this &lt;a href="http://www.microsoft.com/spain/lanzamiento2008/default.mspx" target="_blank"&gt;page&lt;/a&gt; (content only available in Spanish).&lt;/p&gt;  &lt;p&gt;I'm looking forward to meet you all next week!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7842818" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/General+Info/default.aspx">General Info</category></item><item><title>What does it mean that BACKUP TABLE / RESTORE TABLE are not "yet" implemented?</title><link>http://blogs.msdn.com/ialonso/archive/2008/02/20/what-does-it-mean-that-backup-table-restore-table-are-not-yet-implemented.aspx</link><pubDate>Wed, 20 Feb 2008 22:56:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7816347</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7816347.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7816347</wfw:commentRss><description>&lt;p&gt;Say you are one of those users who have been using SQL Server since 6.x days. And say you remember that in those versions there was the possibility to backup or restore a single table. Let's try hard to imagine your memory is good enough to be able to recall the exact syntax you used to accomplish that task. And finally, let's also imagine you're a perseverant person who has been testing it on every new major version of SQL Server released since 7.0, to only confirm whether it was supported again, finally dropped off or still in &amp;quot;not yet implemented&amp;quot; status. :-)&lt;/p&gt;  &lt;p&gt;Well, coincidentally I know somebody who is a &lt;a href="http://mvp.support.microsoft.com/" target="_blank"&gt;Microsoft MVP&lt;/a&gt; and works in &lt;a href="http://www.solidq.com" target="_blank"&gt;Solid&lt;/a&gt; and accumulates all those attributes, and this person asked me to investigate why SQL Server continues raising a 3015 exception, after nine years since those four major releases (7.0, 8.0, 9.0 and almost 10.0) have seen the light.&lt;/p&gt;  &lt;p&gt;The point is that if you attempt running either of the following two TSQL statements:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;BACKUP TABLE ThisTable TO DISK = 'c:\dummy.bak'&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;GO&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;RESTORE TABLE ThisTable FROM DISK = 'c:\dummy.bak'&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;you get the following errors, respectively, back from the server:&lt;/p&gt; &lt;font face="Courier New"&gt;Msg 3015, Level 16, State 4, Line 1    &lt;br /&gt;BACKUP TABLE is not yet implemented.&lt;/font&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;Msg 3015, Level 16, State 3, Line 1      &lt;br /&gt;RESTORE TABLE is not yet implemented.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;It happens that starting with SQL Server 7.0 SQL Server's T-SQL syntactic parser/analyzer continues accepting the BACKUP TABLE / RESTORE TABLE syntax, and we create specific command nodes in the query tree for those two statements, which we even compile to specialized compiled statement classes. But, in the end, when the relational engine invokes the actual execution of the compiled statement, there is no code implementation in there apart from the raising of the 3015 exception.&lt;/p&gt;  &lt;p&gt;I approached the PMs in the Relational Engine team to see what were the future plans around this area, and it happens there are no plans to implement this. In fact, I've just filed a Work Item for somebody to finally remove that code in a future release and simply consider those two constructs syntactically incorrect.&lt;/p&gt;  &lt;p&gt;Was this post helpful, I'm hundred percent positive it was not, but I hope it was, at least, entertaining. :-)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7816347" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>I just had to re-publish a previous post because I had made an important mistake</title><link>http://blogs.msdn.com/ialonso/archive/2008/02/20/i-just-had-to-re-publish-a-previous-post-because-i-had-made-an-important-mistake.aspx</link><pubDate>Wed, 20 Feb 2008 21:57:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7824239</guid><dc:creator>ialonso</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7824239.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7824239</wfw:commentRss><description>&lt;p&gt;In red I highlighted the changes I've introduced to explain what was wrong in the original version of &lt;a href="http://blogs.msdn.com/ialonso/archive/2008/02/19/a-tale-about-solving-cannot-generate-sspi-context-followed-by-the-resolution-of-dbnetlib-connectionread-recv-general-network-error-check-your-network-documentation.aspx"&gt;A tale about solving &amp;quot;Cannot generate SSPI context&amp;quot; and later &amp;quot;[DBNETLIB][ConnectionRead(recv()).] General network error. Check your network documentation&amp;quot; in a shot&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Sorry for any inconveniences this mistake could have caused.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7824239" width="1" height="1"&gt;</description></item><item><title>A tale about solving "Cannot generate SSPI context" and later "[DBNETLIB][ConnectionRead(recv()).] General network error. Check your network documentation" in a shot</title><link>http://blogs.msdn.com/ialonso/archive/2008/02/19/a-tale-about-solving-cannot-generate-sspi-context-followed-by-the-resolution-of-dbnetlib-connectionread-recv-general-network-error-check-your-network-documentation.aspx</link><pubDate>Tue, 19 Feb 2008 21:28:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7802904</guid><dc:creator>ialonso</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7802904.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7802904</wfw:commentRss><description>&lt;p&gt;I had a customer who was receiving the &amp;quot;Cannot generate SSPI context error&amp;quot; when one, and only one, of his users with a specific domain account tried to log into a SQL Server 2005 using TCP network library and Windows Authentication. It ended up being caused by the fact that the default MaxTokenSize of 12,000 set in the workstation from where he was trying to connect to SQL wasn't big enough to hold the kerberos token generated during authentication because he belonged to many Windows security groups, as explained in &lt;a title="New resolution for problems with Kerberos authentication when users belong to many groups" href="http://support.microsoft.com/kb/327825/en-us" target="_blank"&gt;KB327825&lt;/a&gt;. We solved that one out by finding (with the help of &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=4A303FA5-CF20-43FB-9483-0F0B0DAE265C&amp;amp;displaylang=en" target="_blank"&gt;tokensz.exe&lt;/a&gt;) what was the minimum size we needed to set MaxTokenSize so that the preallocated buffer could hold the complete token of this particular user account.&lt;/p&gt;  &lt;p&gt;After we created the MaxTokenSize DWORD under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters and we set it to 13,500 (our user token was 13,336 bytes long), we rebooted the client machine for the change to take effect, and on the next connection attempt after reboot, it began failing with &amp;quot;[DBNETLIB][ConnectionRead(recv()).] General network error. Check your network documentation&amp;quot;.&lt;/p&gt;  &lt;p&gt;This time, we went to the server searching for any information that could be related to this error on the client side, and found the following error reported in ERRORLOG, every time the client had tried to connect:&lt;/p&gt;  &lt;p&gt;17828 - The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library.%.*ls&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Re-publishing this blog to correct a mistake I made here. We don't report error 17828 mentioned above, but this one instead:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;17832 - The login packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library.%.*ls&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;After further code analysis on the server side, I discovered the server network library was limiting the maximum token size that would be accepted from a client to the MaxTokenSize set in the server box where SQL Server was running. Since it was a Windows Server 2003 + SP2 and it hadn't been explicitly specified, it was using the default value of 12,000. Since, during the PreLoginHandshake phase, this particular client was presenting us with a token larger than that size, SQL Server considers the packet is invalid and reports that error mentioned above.&lt;/p&gt;  &lt;p&gt;So, to solve this second issue, we had to explicitly set the MaxTokenSize setting on the server to 13,500 and reboot the box as well. Why 13,500, because we knew SQL Server could now receive login attempts from clients which could present him a token as big as that.&lt;/p&gt;  &lt;p&gt;Hope it helps somebody to solve these two issues.&lt;/p&gt;  &lt;p&gt;While troubleshooting this issue, I also found interesting reading &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=22DD9251-0781-42E6-9346-89D577A3E74A&amp;amp;displaylang=en" target="_blank"&gt;Addressing Problems Due To Access Token Limitation&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7802904" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/ialonso/archive/tags/Connectivity/default.aspx">Connectivity</category></item><item><title>How an apparently innocent antivirus could kill your SSIS package performance?</title><link>http://blogs.msdn.com/ialonso/archive/2008/02/19/how-an-apparently-innocent-antivirus-could-kill-your-ssis-package-performance.aspx</link><pubDate>Tue, 19 Feb 2008 19:30:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7800449</guid><dc:creator>ialonso</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7800449.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7800449</wfw:commentRss><description>&lt;p&gt;Interesting story this one. I've been working with a customer who had a very simple package which consisted of a Sequence Container including an Execute SQL Task (which truncates the destination table) followed by a Data Flow Task. The Data Flow Task contained an OLE DB Source (a SQL Server 2000) and an OLE DB Destination (a SQL Server 2005). When the package was run from either of the two 64-bit boxes which were part of a cluster they had, it took over 80 minutes for the package to complete, while when it was run from other boxes in their infrastructure (no matter whether they were 32-bit or 64-bit boxes) it finished moving the same data across the two OLE DB endpoints in no more than 300 seconds.&lt;/p&gt;  &lt;p&gt;It happened that an internal component of SSIS execution pipeline which is the Buffer Manager, allocates memory where it will later copy the input rows, but when it comes to storing BLOB (image, text or ntext) columns in those buffers, it normally ends up spooling those BLOBs to external temporary files, which then releases (i.e. close the file and automatically delete it since it was created with the FILE_FLAG_DELETE_ON_CLOSE flag) when the buffer containing the rows is also released.&lt;/p&gt;  &lt;p&gt;The point here was that this customer had installed a well known antivirus software and he had enabled the On Access Scan feature (sort of real time scanning) which was introduce the huge delay that in the end summed up the big resulting difference.&lt;/p&gt;  &lt;p&gt;The typical stack you would see in a case like this, every time you break DTEXEC.exe execution would look like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;0:017&amp;gt; kL      &lt;br /&gt;Child-SP&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RetAddr&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Call Site       &lt;br /&gt;00000000`1e34fc68 00000000`77d6e314 ntdll!NtClose+0xa       &lt;br /&gt;00000000`1e34fc70 00000000`2359d623 kernel32!CloseHandle+0x5f       &lt;br /&gt;00000000`1e34fca0 00000000`2359bfe9 DTSPipeline!CInMemBuffer::ReleaseBLOBDescriptors+0xd3       &lt;br /&gt;00000000`1e34fcf0 00000000`23591357 DTSPipeline!CInMemBuffer::ReleaseMemory+0x69       &lt;br /&gt;00000000`1e34fd20 00000000`2359c2b1 DTSPipeline!CDTSBufferManager::RemoveBuffer+0xf7       &lt;br /&gt;00000000`1e34fdc0 00000000`235c37a4 DTSPipeline!CInMemBuffer::Release+0x31       &lt;br /&gt;00000000`1e34fdf0 00000000`235be7b0 DTSPipeline!CWorkThread::DoInputLoop+0x424       &lt;br /&gt;00000000`1e34fef0 00000000`781337a7 DTSPipeline!CWorkThread::ThreadProcedure+0x70       &lt;br /&gt;00000000`1e34ff20 00000000`78133864 msvcr80!_callthreadstartex+0x17       &lt;br /&gt;00000000`1e34ff50 00000000`77d6b6da msvcr80!_threadstartex+0x84       &lt;br /&gt;00000000`1e34ff80 00000000`00000000 kernel32!BaseThreadStart+0x3a&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;As you can see, it's stuck trying to close the handle to the temporary file used to spool the BLOB data for a given row.&lt;/p&gt;  &lt;p&gt;So, we tested it after having disabled On Access Scan and it worked like a champ. Customer had heard this was a known issue with that particular build of the antivirus in x64. Meanwhile, before the AV manufacturer could provide them with a long term solution, they could exclude from the AV realtime analysis the directory where these files were created, which you can specify by using the BLOBTempStoragePath property.&lt;/p&gt;  &lt;p&gt;That was it, after a long time not having showed around here.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7800449" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SQL Server performance counters' library improvement</title><link>http://blogs.msdn.com/ialonso/archive/2008/02/07/sql-server-performance-counters-library-improvement.aspx</link><pubDate>Thu, 07 Feb 2008 08:43:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7510082</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7510082.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7510082</wfw:commentRss><description>&lt;p&gt;It seems Cumulative Update 6 (due in mid Feb 08) for SQL Server 2005 Service Pack 2 will include a code change so that performance counters show current performance values while the service is running, no matter what the service state was when perfmon was initially started up. The effect of that original design I explained in this &lt;a title="Why my SQL Server performance counters are showing zeroes when current values are higher?" href="http://blogs.msdn.com/ialonso/archive/2007/12/20/why-my-sql-server-performance-counters-are-showing-zeroes-when-current-values-are-higher.aspx"&gt;previous&lt;/a&gt; post.    &lt;br /&gt;    &lt;br /&gt;SQL Server performance counters DLL works in two modes: static and server interaction. Static meaning that the DLL cannot communicate with SQL Server (because the service is stopped). In this mode, we only show counter names but all counter values are set to zero. Server interaction mode is the mode where the library can communicate with SQL Server (because it is up and running). In build before CU6, the DLL behaved so that in static mode it wasn't able to recover and switch to server interaction mode. The workaround, as explained in the previous post described above, was to restart Perfmon. Hopefully, starting with CU6, that workaround won't be required any longer, since it will be able to dynamically switch between static and server mode.    &lt;br /&gt;    &lt;br /&gt;Cheers,    &lt;br /&gt;Nacho&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7510082" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Good News!</title><link>http://blogs.msdn.com/ialonso/archive/2008/01/17/good-news.aspx</link><pubDate>Wed, 16 Jan 2008 23:31:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7136405</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7136405.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7136405</wfw:commentRss><description>&lt;p&gt;I've just discovered that Cumulative Update 6 (due in mid Feb 08) for SQL Server 2005 Service Pack 2 will include a fix for the Analysis Services Redirector reliability issue I explained in my &lt;a href="http://blogs.msdn.com/ialonso/archive/2007/11/15/are-you-suffering-from-random-adomdconnectionexception-thrown-when-trying-to-connect-to-a-named-instance.aspx"&gt;previous&lt;/a&gt; post.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7136405" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>How to rebuild your master database in MSDE when it became corrupted?</title><link>http://blogs.msdn.com/ialonso/archive/2008/01/16/how-to-rebuild-your-master-database-in-msde-when-it-became-corrupted.aspx</link><pubDate>Wed, 16 Jan 2008 22:54:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7135929</guid><dc:creator>ialonso</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7135929.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7135929</wfw:commentRss><description>&lt;p&gt;Let's imagine that your instance of MSDE cannot be brought online because of any reason, like when your master database became corrupted or the their files are unavailable. Under such circumstances, if you try to rebuild the master database with a command line similar to this one&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;setup INSTANCENAME=&amp;quot;MYINSTANCE&amp;quot; SAPWD=&amp;quot;mySAPWd&amp;quot; REINSTALL=ALL REINSTALLMODE=a /I Setup\SqlRun01.msi /L*v c:\FailingAttempt.log&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;the setup it will appear to be hung for a while, you will notice that the ERRORLOG files for that instance cycles twice and that it shows some sort of severe error which prevented the SQL Server service to come online:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;2008-01-16 14:26:34.53 server&amp;#160;&amp;#160;&amp;#160; Microsoft SQL Server&amp;#160; 2000 - 8.00.760 (Intel X86)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Dec 17 2002 14:22:05       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Copyright (c) 1988-2003 Microsoft Corporation      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Desktop Engine on Windows NT 5.2 (Build 3790: Service Pack 2) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;2008-01-16 14:26:34.55 server&amp;#160;&amp;#160;&amp;#160; Copyright (C) 1988-2002 Microsoft Corporation.     &lt;br /&gt;2008-01-16 14:26:34.55 server&amp;#160;&amp;#160;&amp;#160; All rights reserved.      &lt;br /&gt;2008-01-16 14:26:34.55 server&amp;#160;&amp;#160;&amp;#160; Server Process ID is 900.      &lt;br /&gt;2008-01-16 14:26:34.55 server&amp;#160;&amp;#160;&amp;#160; Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL$MYINSTANCE\LOG\ERRORLOG'.      &lt;br /&gt;2008-01-16 14:26:34.55 server&amp;#160;&amp;#160;&amp;#160; initconfig: Error 2(The system cannot find the file specified.) opening 'C:\Program Files\Microsoft SQL Server\MSSQL$MYINSTANCE\Data\master.mdf' for configuration information.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If, after the installation finally fails, you open the Windows Installer log (c:\FailingAttempt.log) you specified in the previous command line you wanted to obtain, you will notice that setup tried to run one Windows Installer Custom Action called UpgDetectBlankSaLogin and it failed to connect because SQL service wasn't running (&lt;font color="#ff0000"&gt;see the information marked in red below&lt;/font&gt;):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;=== Verbose logging started: 1/16/2008&amp;#160; 14:26:18&amp;#160; Build type: SHIP UNICODE 3.01.4000.4042&amp;#160; Calling process: C:\WINDOWS\system32\msiexec.exe ===     &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:785]: Resetting cached policy values      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:785]: Machine policy value 'Debug' is 0      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:785]: ******* RunEngine:      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ******* Product: Setup\SqlRun01.msi      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ******* Action:       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ******* CommandLine: **********      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:815]: Machine policy value 'DisableUserInstalls' is 0      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:875]: Cloaking enabled.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:875]: Attempting to enable all disabled priveleges before calling Install on Server      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:875]: End dialog not enabled      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:875]: Original package ==&amp;gt; D:\MSDERelA\Setup\SqlRun01.msi      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:875]: Package we're running from ==&amp;gt; C:\WINDOWS\Installer\7ee98.msi      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:885]: APPCOMPAT: looking for appcompat database entry with ProductCode '{E09B48B5-E141-427A-AB0C-D3605127224A}'.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:885]: APPCOMPAT: no matching ProductCode found in database.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:895]: MSCOREE not loaded loading copy from system32      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Note: 1: 2205 2:&amp;#160; 3: MsiFileHash       &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Machine policy value 'DisablePatch' is 0      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Machine policy value 'AllowLockdownPatch' is 0      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Machine policy value 'DisableLUAPatching' is 0      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Machine policy value 'DisableFlyWeightPatching' is 0      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: APPCOMPAT: looking for appcompat database entry with ProductCode '{E09B48B5-E141-427A-AB0C-D3605127224A}'.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: APPCOMPAT: no matching ProductCode found in database.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Transforms are not secure.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Note: 1: 2262 2: Control 3: -2147287038       &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Command Line: INSTANCENAME=MYINSTANCE SA...      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{D29DCF7A-8199-4373-BA0D-2F3635EC940C}'.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Product Code passed to Engine.Initialize:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; '{E09B48B5-E141-427A-AB0C-D3605127224A}'      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Product Code from property table before transforms: '{E09B48B5-E141-427A-AB0C-D3605127224A}'      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Product Code from property table after transforms:&amp;#160; '{E09B48B5-E141-427A-AB0C-D3605127224A}'      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: Product registered: entering maintenance mode      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'.      &lt;br /&gt;MSI (c) (5C:F4) [14:26:18:925]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'.      &lt;br /&gt;.      &lt;br /&gt;.      &lt;br /&gt;.      &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Starting custom action UpgDetectBlankSaLogin()         &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;Entering Function MyMsiEvaluateCondition      &lt;br /&gt;MsiEvaluateCondition for VersionNT returned TRUE      &lt;br /&gt;End Function MyMsiEvaluateCondition      &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Unable to connect as the SQL service is not running.         &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;.      &lt;br /&gt;.      &lt;br /&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="tre"&gt;It happens that since SP3, the MSDE setup incorporated that custom action which would try to detect if the password for the SA login was blank and if that would be the case, then it would fail straight away. So, in order to rebuild your system database setup had to detect if the password for SA was blank, and to be able to complete such check the service had to be healthy enough as to come online. Then, how could you leave this endless loop?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="tre"&gt;Well, it happens that another Windows Installer property was also implemented to make this possible. Its external name is BLANKSAPWD and you must set it to 1 if you want that detection to be skipped. Therefore, the following command line would allow you to successfully rebuild the system database when it was corrupted or unavailable:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;setup &lt;font color="#ff0000"&gt;BlankSAPwd=1&lt;/font&gt; INSTANCENAME=&amp;quot;MYINSTANCE&amp;quot; SAPWD=&amp;quot;mySAPWd&amp;quot; REINSTALL=ALL REINSTALLMODE=a /I Setup\SqlRun01.msi /L*v c:\WorkingAttempt.log&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="tre"&gt;And the newly generated Windows Installer log would show this new information in it:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;=== Verbose logging started: 1/16/2008&amp;#160; 14:38:53&amp;#160; Build type: SHIP UNICODE 3.01.4000.4042&amp;#160; Calling process: C:\WINDOWS\system32\msiexec.exe ===     &lt;br /&gt;MSI (c) (90:D0) [14:38:53:971]: Resetting cached policy values      &lt;br /&gt;MSI (c) (90:D0) [14:38:53:971]: Machine policy value 'Debug' is 0      &lt;br /&gt;MSI (c) (90:D0) [14:38:53:971]: ******* RunEngine:      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ******* Product: Setup\SqlRun01.msi      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ******* Action:       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ******* CommandLine: **********      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:001]: Machine policy value 'DisableUserInstalls' is 0      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:011]: Cloaking enabled.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:011]: Attempting to enable all disabled priveleges before calling Install on Server      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:021]: End dialog not enabled      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:021]: Original package ==&amp;gt; D:\MSDERelA\Setup\SqlRun01.msi      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:021]: Package we're running from ==&amp;gt; C:\WINDOWS\Installer\7ee98.msi      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:041]: APPCOMPAT: looking for appcompat database entry with ProductCode '{E09B48B5-E141-427A-AB0C-D3605127224A}'.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:041]: APPCOMPAT: no matching ProductCode found in database.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:051]: MSCOREE not loaded loading copy from system32      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Note: 1: 2205 2:&amp;#160; 3: MsiFileHash       &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Machine policy value 'DisablePatch' is 0      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Machine policy value 'AllowLockdownPatch' is 0      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Machine policy value 'DisableLUAPatching' is 0      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Machine policy value 'DisableFlyWeightPatching' is 0      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: APPCOMPAT: looking for appcompat database entry with ProductCode '{E09B48B5-E141-427A-AB0C-D3605127224A}'.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: APPCOMPAT: no matching ProductCode found in database.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Transforms are not secure.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Note: 1: 2262 2: Control 3: -2147287038       &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Command Line: BlankSA...      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{D29DCF7A-8199-4373-BA0D-2F3635EC940C}'.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Product Code passed to Engine.Initialize:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; '{E09B48B5-E141-427A-AB0C-D3605127224A}'      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Product Code from property table before transforms: '{E09B48B5-E141-427A-AB0C-D3605127224A}'      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Product Code from property table after transforms:&amp;#160; '{E09B48B5-E141-427A-AB0C-D3605127224A}'      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: Product registered: entering maintenance mode      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'.      &lt;br /&gt;MSI (c) (90:D0) [14:38:54:081]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'.      &lt;br /&gt;.      &lt;br /&gt;.      &lt;br /&gt;.      &lt;br /&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;MSI (s) (44:10) [14:40:21:306]: Skipping action: UpgDetectBlankSaLogin.2D02443E_7002_4C0B_ABC9_EAB2C064397B (condition is false)         &lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;.      &lt;br /&gt;.      &lt;br /&gt;.      &lt;br /&gt;=== Logging stopped: 1/16/2008&amp;#160; 14:41:02 ===      &lt;br /&gt;MSI (c) (90:D0) [14:41:02:776]: Note: 1: 1728       &lt;br /&gt;MSI (c) (90:D0) [14:41:02:796]: Product: Microsoft SQL Server Desktop Engine -- Configuration completed successfully. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;MSI (c) (90:D0) [14:41:02:806]: Grabbed execution mutex.     &lt;br /&gt;MSI (c) (90:D0) [14:41:02:806]: Cleaning up uninstalled install packages, if any exist      &lt;br /&gt;MSI (c) (90:D0) [14:41:02:806]: MainEngineThread is returning 0      &lt;br /&gt;=== Verbose logging stopped: 1/16/2008&amp;#160; 14:41:02 ===&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And that's all about it. Hope it's useful for somebody.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7135929" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Setup/default.aspx">SQL Setup</category></item><item><title>Scared because SQL Server seems to be running a DBCC CHECKDB on some of your databases on every startup?</title><link>http://blogs.msdn.com/ialonso/archive/2008/01/16/scared-because-sql-server-seems-to-be-running-a-dbcc-checkdb-on-some-of-your-databases-on-every-startup.aspx</link><pubDate>Wed, 16 Jan 2008 11:02:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7129392</guid><dc:creator>ialonso</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7129392.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7129392</wfw:commentRss><description>&lt;p&gt;A colleague approached me yesterday because he was finding the following entry (&lt;font color="#ff0000"&gt;&lt;strong&gt;marked in red below&lt;/strong&gt;&lt;/font&gt;) in his ERRORLOG, and he was worried because he thought the recovery of the ABC database was taking longer because a CHECKDB was run on it during the recovery process:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="2"&gt;2008-01-15 13:13:04.97 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Microsoft SQL Server 2005 - 9.00.3200.00 (X64)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Oct&amp;#160; 2 2007 12:23:02       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Copyright (c) 1988-2005 Microsoft Corporation       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="2"&gt;2008-01-15 13:13:04.97 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (c) 2005 Microsoft Corporation.      &lt;br /&gt;2008-01-15 13:13:04.97 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; All rights reserved.       &lt;br /&gt;2008-01-15 13:13:04.97 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Server process ID is 5720.       &lt;br /&gt;.       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;.      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;.      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;2008-01-15 13:13:10.56 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'master'.      &lt;br /&gt;2008-01-15 13:13:10.65 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.       &lt;br /&gt;2008-01-15 13:13:10.75 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; SQL Trace ID 1 was started by login &amp;quot;sa&amp;quot;.       &lt;br /&gt;2008-01-15 13:13:10.80 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'mssqlsystemresource'.       &lt;br /&gt;2008-01-15 13:13:10.80 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; The resource database build version is 9.00.3200. This is an informational message only. No user action is required.       &lt;br /&gt;2008-01-15 13:13:11.00 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Server name is 'MYSERVER\MYINSTANCE'. This is an informational message only. No user action is required.       &lt;br /&gt;2008-01-15 13:13:11.00 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; The NETBIOS name of the local node that is running the server is 'MYSERVER'. This is an informational message only. No user action is required.       &lt;br /&gt;2008-01-15 13:13:11.00 spid22s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'model'.       &lt;br /&gt;2008-01-15 13:13:11.09 spid22s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Clearing tempdb database.       &lt;br /&gt;.       &lt;br /&gt;.       &lt;br /&gt;.       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;2008-01-15 13:13:11.23 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SQL Server is now ready for client connections. This is an informational message; no user action is required.      &lt;br /&gt;2008-01-15 13:13:11.25 spid26s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'msdb'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid22s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'tempdb'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid25s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'ABC'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid30s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'XYZ'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid29s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'CAT'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid31s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'DataWarehouse'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid33s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'Recording'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid36s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'FIMD'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid28s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'FWCDG'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid34s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'Safe'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid35s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'General'.       &lt;br /&gt;2008-01-15 13:13:11.25 spid27s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'AdministrationDB'.       &lt;br /&gt;2008-01-15 13:13:11.26 spid32s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'MKTMaps'.       &lt;br /&gt;2008-01-15 13:13:11.28 spid22s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Analysis of database 'tempdb' (2) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.       &lt;br /&gt;2008-01-15 13:13:11.36 spid37s&amp;#160;&amp;#160;&amp;#160;&amp;#160; The Service Broker protocol transport is disabled or not configured.       &lt;br /&gt;2008-01-15 13:13:11.36 spid37s&amp;#160;&amp;#160;&amp;#160;&amp;#160; The Database Mirroring protocol transport is disabled or not configured.       &lt;br /&gt;2008-01-15 13:13:11.36 spid37s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Service Broker manager has started.       &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;2008-01-15 13:14:47.94 spid25s&amp;#160;&amp;#160;&amp;#160;&amp;#160; CHECKDB for database 'ABC' finished without errors on 2008-01-15 12:09:50.173 (local time). This is an informational message only; no user action is required.          &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;2008-01-15 13:17:08.97 spid16s&amp;#160;&amp;#160;&amp;#160;&amp;#160; Recovery is complete. This is an informational message only. No user action is required.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the header of the primary data file, SQL Server stores a structure containing information about the database. This has been the case in previous versions of the product as well (at least 7.0 and 2000). In SQL Server 2005, that structure extended its fields to include, among others, the date and time of the last time a DBCC CHECKDB was successfully completed against that database.&lt;/p&gt;  &lt;p&gt;During database startup, if that field contains a valid date and is not the default construction date ('1900-01-01 00:00:00.000'), then we write informational message 17573 (from sys.messages &amp;quot;CHECKDB for database '%ls' finished without errors on %ls (local time). This is an informational message only; no user action is required.&amp;quot;) into ERRORLOG.&lt;/p&gt;  &lt;p&gt;If your database is has its autoclose option enabled, the you would see this message every time the database is brought online. Just like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;2008-01-16 11:39:49.740&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; spid51&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'ABC'.      &lt;br /&gt;2008-01-16 11:39:49.980&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; spid51&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CHECKDB for database 'ABC' finished without errors on 2008-01-16 11:38:56.793 (local time). This is an informational message only; no user action is required.       &lt;br /&gt;2008-01-16 11:44:11.770&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; spid92&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'ABC'.       &lt;br /&gt;2008-01-16 11:44:12.010&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; spid92&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CHECKDB for database 'ABC' finished without errors on 2008-01-16 11:38:56.793 (local time). This is an informational message only; no user action is required.       &lt;br /&gt;2008-01-16 11:44:38.320&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; spid65&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Starting up database 'ABC'.       &lt;br /&gt;2008-01-16 11:44:38.490&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; spid65&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CHECKDB for database 'ABC' finished without errors on 2008-01-16 11:38:56.793 (local time). This is an informational message only; no user action is required.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This is not the case in Express or Desktop editions. Those editions won't show this message.&lt;/p&gt;  &lt;p&gt;That was it for now.&lt;/p&gt;  &lt;p&gt;Have a good day!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7129392" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Conocer el valor de la Edición Enterprise a través de sencillos ejemplos</title><link>http://blogs.msdn.com/ialonso/archive/2008/01/08/conocer-el-valor-de-la-edici-n-enterprise-a-trav-s-de-sencillos-ejemplos.aspx</link><pubDate>Tue, 08 Jan 2008 11:18:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7026909</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/7026909.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=7026909</wfw:commentRss><description>&lt;p&gt;&lt;font color="#ff0000"&gt;&lt;em&gt;This is the Spanish version of &lt;/em&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;&lt;em&gt;&lt;a href="http://blogs.msdn.com/ialonso/archive/2007/12/28/understanding-the-value-of-the-enterprise-edition-with-simple-examples.aspx"&gt;this&lt;/a&gt;&lt;/em&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;&lt;em&gt; other post.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Esta vez s&amp;#243;lo deseo anunciar que mi compa&amp;#241;ero &lt;a href="http://blogs.msdn.com/jorgepc/" target="_blank"&gt;Jorge &amp;quot;George&amp;quot; P&amp;#233;rez Campo&lt;/a&gt; y yo mismo tenemos planes para comenzar una serie de art&amp;#237;culos con ejemplos simples que demuestren, desde un punto de vista pr&amp;#225;ctico, los enormes beneficios proporcionados por aquellas funciones que est&amp;#225;n s&amp;#243;lo disponible en la Edici&amp;#243;n Enterprise de SQL Server 2005.&lt;/p&gt;  &lt;p&gt;&amp;#218;ltimamente, hemos escuchado con m&amp;#225;s frecuencia a los usuarios decir: &amp;#8220;&amp;#191;Por qu&amp;#233; habr&amp;#237;a de elegir la Edici&amp;#243;n Enterprise de SQL Server 2005? Por lo que recuerdo de versiones anteriores, el &amp;#250;nico beneficio de la Edici&amp;#243;n Enterprise, en comparaci&amp;#243;n con la Est&amp;#225;ndar, era la posibilidad de instalaci&amp;#243;n en cl&amp;#250;ster y ahora, con SQL Server 2005, la edici&amp;#243;n Est&amp;#225;ndar ya incorpora esta funcionalidad; no necesito &amp;#8220;gastar&amp;#8221; un dinero extra adquiriendo una licencia de la Edici&amp;#243;n Enterprise.&amp;#8221;&lt;/p&gt;  &lt;p&gt;Sinceramente, esta afirmaci&amp;#243;n me deja un tanto descolocado. :-P&lt;/p&gt;  &lt;p&gt;En primer lugar, no es cierto que el soporte de cl&amp;#250;ster fuese la &amp;#250;nica diferencia entre la versi&amp;#243;n Est&amp;#225;ndar y la Enterprise en versiones anteriores. Hab&amp;#237;a mucho m&amp;#225;s que eso. Pero no comentaremos cuestiones sobre SQL Server 2000 ahora, m&amp;#225;s de 7 a&amp;#241;os despu&amp;#233;s de que fuese publicado. Esto no te aportar&amp;#237;a demasiado valor. En su lugar, preferimos centrarnos inicialmente en SQL Server 2005 y posiblemente extender el estudio a SQL server 2008 m&amp;#225;s adelante.&lt;/p&gt;  &lt;p&gt;En 2005 hay tanto valor a&amp;#241;adido en la Edici&amp;#243;n Enterprise que preferimos creer que aquellos usuarios que est&amp;#225;n de acuerdo con el enunciado anterior lo est&amp;#225;n porque no han recibido la informaci&amp;#243;n suficiente acerca del valor del producto, cu&amp;#225;les son sus implicaciones y como pueden ellos beneficiarse realmente de las mismas.&lt;/p&gt;  &lt;p&gt;Por esa raz&amp;#243;n, nos sentimos en la obligaci&amp;#243;n de mostrarte todos estos beneficios, usando ejemplos sencillos y claros, con el &amp;#225;nimo de ayudarte a tomar mejores decisiones en el momento de elegir la edici&amp;#243;n de SQL Server m&amp;#225;s apropiada para satisfacer las necesidades de tu negocio.&lt;/p&gt;  &lt;p&gt;Permanece atento y no pierdas ninguna de estas entregas si quieres tomar las mejores decisiones. ;-)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7026909" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/ialonso/archive/tags/Enterprise+Edition/default.aspx">Enterprise Edition</category></item><item><title>Understanding the value of the Enterprise Edition with simple examples</title><link>http://blogs.msdn.com/ialonso/archive/2007/12/28/understanding-the-value-of-the-enterprise-edition-with-simple-examples.aspx</link><pubDate>Fri, 28 Dec 2007 19:32:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6887926</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/6887926.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=6887926</wfw:commentRss><description>&lt;p&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;&amp;#201;sta es la versi&amp;#243;n en ingl&amp;#233;s de &lt;/font&gt;&lt;font color="#ff0000"&gt;&lt;a href="http://blogs.msdn.com/ialonso/archive/2008/01/08/conocer-el-valor-de-la-edici-n-enterprise-a-trav-s-de-sencillos-ejemplos.aspx"&gt;este&lt;/a&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt; otro art&amp;#237;culo&lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This time I just wanted to announce that my colleague &lt;a href="http://blogs.msdn.com/jorgepc" target="_blank"&gt;Jorge &amp;quot;George&amp;quot; P&amp;#233;rez Campo&lt;/a&gt; and myself have plans to start posting some simple examples to demonstrate, from a practical standpoint, the huge benefits provided by all the features which are only available with the Enterprise Edition of SQL Server 2005.&lt;/p&gt;  &lt;p&gt;Recently, we have been, more and more, hearing SQL Server users saying: &amp;quot;Why would I want to choose the Enterprise Edition in SQL Server 2005? It sounds to me that from previous versions of the product, the only benefit I got from the Enterprise edition, compared to the Standard, was that it was cluster aware, and now in SQL Server 2005, the Standard edition also supports failover clustering, therefore I don't need to &amp;quot;waste&amp;quot; any extra money in buying an Enterprise edition license.&amp;quot;&lt;/p&gt;  &lt;p&gt;To be honest, that assertion knocks me out. :-P&lt;/p&gt;  &lt;p&gt;First of all, it isn't true that failover clustering support was the only difference between Standard and Enterprise editions in previous versions. There was much more than that. But we won't touch the SQL Server 2000 topic nowadays, after over seven years since it was released. That wouldn't be of too much value for you. Instead, we prefer to focus in SQL Server 2005 initially, and will possibly extend it to cover SQL Server 2008 as well.&lt;/p&gt;  &lt;p&gt;In 2005, there is so much extra value in the Enterprise Edition, that we prefer to believe that those users who agree with the statement above, is just because they haven't really been explained what all that value is, which form it adopts within the product, and how they can actually benefit from it.&lt;/p&gt;  &lt;p&gt;For that reason, we feel it's our obligation to show you all these benefits, using simple and clear examples, with the aim of helping you to take better decisions when it comes to choosing the most appropriate edition of SQL Server to satisfy your business requirements.&lt;/p&gt;  &lt;p&gt;So, keep tuned and don't miss any of those deliveries if you want to make the best decisions. ;-)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6887926" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/ialonso/archive/tags/Enterprise+Edition/default.aspx">Enterprise Edition</category></item><item><title>What's special with the BULK provider when loading LOB character columns using OPENROWSET?</title><link>http://blogs.msdn.com/ialonso/archive/2007/12/26/what-s-special-with-the-bulk-provider-when-loading-lob-character-columns-using-openrowset.aspx</link><pubDate>Wed, 26 Dec 2007 17:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6871231</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/6871231.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=6871231</wfw:commentRss><description>&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;This is another problem I've been working on recently, whose resolution I felt could be interesting to share here.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Let's first reproduce the errors, before trying to explain anything. So, please, connect to your instance of SQL Server 2005 and run this:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#000080" size="2"&gt;CREATE DATABASE TestDatabase     &lt;br /&gt;GO      &lt;br /&gt;USE TestDatabase      &lt;br /&gt;GO      &lt;br /&gt;CREATE TABLE [dbo].[TestTable] ([TestColumn] nvarchar(max) NULL)      &lt;br /&gt;GO&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Now, using the DataFile.dat and FormatFile.fmt files &lt;a href="http://blogs.msdn.com/ialonso/attachment/6871231.ashx" target="_blank"&gt;compressed in a single zip&lt;/a&gt; and attached to this post, run this statement and notice how it works with no error, and it inserts the data available in the .dat file, without any truncation or any error.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;font color="#000080"&gt;BULK INSERT dbo.TestTable FROM 'c:\DataFile.dat'       &lt;br /&gt;WITH        &lt;br /&gt;(        &lt;br /&gt;FORMATFILE = 'c:\FormatFile.fmt'        &lt;br /&gt;)&lt;/font&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="trebu" size="2"&gt;Finally, run the following statement and see how it doesn't work:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;font face="Courier New" color="#000080" size="2"&gt;INSERT INTO dbo.TestTable      &lt;br /&gt;SELECT [TestColumn]      &lt;br /&gt;FROM OPENROWSET (BULK 'c:\DataFile.dat',       &lt;br /&gt;FORMATFILE = 'c:\FormatFile.fmt')       &lt;br /&gt;AS c([TestColumn])&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="trebu" size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="trebu" size="2"&gt;instead of completing successfully, it throws the following errors:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#0000a0" size="2"&gt;Server: Msg 4866, Level 16, State 7, Line 1     &lt;br /&gt;The bulk load failed. The column is too long in the data file for row 1, column 1. Verify that the field terminator and row terminator are specified correctly.      &lt;br /&gt;Server: Msg 7399, Level 16, State 1, Line 1      &lt;br /&gt;The OLE DB provider &amp;quot;BULK&amp;quot; for linked server &amp;quot;(null)&amp;quot; reported an error. The provider did not give any information about the error.      &lt;br /&gt;Server: Msg 7330, Level 16, State 1, Line 1      &lt;br /&gt;Cannot fetch a row from OLE DB provider &amp;quot;BULK&amp;quot; for linked server &amp;quot;(null)&amp;quot;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;You might also try to import the data using the bcp utility (%programfiles%\Microsoft SQL Server\90\Tools\Binn\bcp.exe) and you will also see that it works fine, as you would expect:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#000080" size="2"&gt;bcp TestDatabase.dbo.TestTable in c:\DataFile.dat -S.\yukon -T -f c:\FormatFile.fmt&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;My FormatFile.fmt looks like this:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#0000a0" size="2"&gt;9.0     &lt;br /&gt;1      &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160; SQLNVARCHAR&amp;#160;&amp;#160;&amp;#160; 8&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0&amp;#160;&amp;#160;&amp;#160; &amp;quot;~R~&amp;quot;&amp;#160;&amp;#160;&amp;#160; 1&amp;#160;&amp;#160;&amp;#160; TestColumn&amp;#160;&amp;#160;&amp;#160; SQL_Latin1_General_CP1_CI_AS&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;So, what's the reason why it only fails when using the OPENROWSET clause?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Well, it happens to be caused by the way our syntactic parser is implemented (and its relationship with the relational engine). Let me give you more details about it.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;When you issue a BULK INSERT, at parse time, we know what's the name of the table/view where you plan to bulk insert your data into. So, we pass the name of that table to into the constructor of the class which takes care of all the bulk load functionality (i.e. parsing the format file, reading the data from the data file, converting the data if required, etc.) With that information (i.e. the name of the target object), the relational engine can infer the data type, length, scale, precission and the like, of the target columns (all that information is stored by the relational engine - sys.columns). This way, in our example, SQL can infer our target column TestTable.dbo.TestColumn is a wide char BLOB column (nvarchar(max)), and therefore, it assumes that what is being loaded from the data file is a blob and can exceed the limit of 8000 bytes.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;With the bcp utility, it's a similar story, but it uses the bcp APIs implemented in the ODBC native driver available in our SQL Native Client library. But, in the end, a similar thing happens: it retrieves the metadata of the target object and based on that information, it accepts source strings that exceed the 8KB limit.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;On the other hand, when you issue the INSERT INTO ... SELECT ... FROM OPENROWSET, and the syntactic parser is parsing the OPENROWSET, it doesn't even know, in that context, that the results of the OPENROWSET will be used as the input source of an INSERT, so it cannot infer any metadata from any target object, and it ends up assuming the max length is 8000 bytes (4000 characters for wide char data types like SQLNCHAR and 8000 characters for single byte characters like SQLCHAR).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;So... Is there any way around this? Of course there is. :-)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;You can specify in your format file max length column any value bigger than 8000 bytes, like this:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#000080" size="2"&gt;9.0     &lt;br /&gt;1      &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160; SQLNVARCHAR&amp;#160;&amp;#160;&amp;#160; 8&amp;#160;&amp;#160;&amp;#160; &lt;font color="#ff0000"&gt;8001&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; &amp;quot;~R~&amp;quot;&amp;#160;&amp;#160;&amp;#160; 1&amp;#160;&amp;#160;&amp;#160; TestColumn&amp;#160;&amp;#160;&amp;#160; SQL_Latin1_General_CP1_CI_AS&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;It's also worth reminding you that, in case you are still using the old-style format files, you should start familiarizing with the new XML format. Sooner than later, the old-style format files will be deprecated and will be replaced by this new format introduced with SQL Server 2005. Using this new format, the format file I used in my previous examples, would look like this:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#000080" size="2"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;     &lt;br /&gt;&amp;lt;BCPFORMAT xmlns=&amp;quot;http://schemas.microsoft.com/sqlserver/2004/bulkload/format&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;gt;      &lt;br /&gt; &amp;lt;RECORD&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;FIELD ID=&amp;quot;1&amp;quot; xsi:type=&amp;quot;NCharPrefix&amp;quot; PREFIX_LENGTH=&amp;quot;8&amp;quot; COLLATION=&amp;quot;SQL_Latin1_General_CP1_CI_AS&amp;quot;/&amp;gt;      &lt;br /&gt; &amp;lt;/RECORD&amp;gt;      &lt;br /&gt; &amp;lt;ROW&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;COLUMN SOURCE=&amp;quot;1&amp;quot; NAME=&amp;quot;TestColumn&amp;quot; xsi:type=&amp;quot;SQLNVARCHAR&amp;quot;/&amp;gt;      &lt;br /&gt; &amp;lt;/ROW&amp;gt;      &lt;br /&gt;&amp;lt;/BCPFORMAT&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;And this one would be the variation which explicitly defines the max length attribute so that it works when used with OPENROWSET:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#000080" size="2"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;     &lt;br /&gt;&amp;lt;BCPFORMAT xmlns=&amp;quot;http://schemas.microsoft.com/sqlserver/2004/bulkload/format&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;gt;      &lt;br /&gt; &amp;lt;RECORD&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;FIELD ID=&amp;quot;1&amp;quot; xsi:type=&amp;quot;NCharPrefix&amp;quot; &lt;font color="#ff0000"&gt;MAX_LENGTH=&amp;quot;8001&amp;quot;&lt;/font&gt; PREFIX_LENGTH=&amp;quot;8&amp;quot; COLLATION=&amp;quot;SQL_Latin1_General_CP1_CI_AS&amp;quot;/&amp;gt;      &lt;br /&gt; &amp;lt;/RECORD&amp;gt;      &lt;br /&gt; &amp;lt;ROW&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;COLUMN SOURCE=&amp;quot;1&amp;quot; NAME=&amp;quot;TestColumn&amp;quot; xsi:type=&amp;quot;SQLNVARCHAR&amp;quot;/&amp;gt;      &lt;br /&gt; &amp;lt;/ROW&amp;gt;      &lt;br /&gt;&amp;lt;/BCPFORMAT&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Hopes this saved you some time.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6871231" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/ialonso/attachment/6871231.ashx" length="379" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>SQL Server 2005 Service Pack 2 failing to install due to an error in Do_sqlGroupMember custom action</title><link>http://blogs.msdn.com/ialonso/archive/2007/12/21/sql-server-2005-service-pack-2-failing-to-install-due-to-an-error-in-do-sqlgroupmember-custom-action.aspx</link><pubDate>Fri, 21 Dec 2007 17:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6828514</guid><dc:creator>ialonso</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/6828514.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=6828514</wfw:commentRss><description>&lt;p&gt;One colleague reported to me that one of his customers was getting the following error message when trying to install SQL Server 2005 Service Pack 2:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Func Name='RestoreSetupParams'&amp;gt;      &lt;br /&gt;Failed to find installation media path due to datastore exception       &lt;br /&gt;in FindSetupFolder()       &lt;br /&gt;MSI (s) (C0!C0) [12:50:39:060]: Note: 1: 2203 2: C:\WINDOWS\system32\Setup\SqlRun.msi 3: -2147287038       &lt;br /&gt;Loaded DLL:       &lt;br /&gt;C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\xmlrw.dll       &lt;br /&gt;Version:       &lt;br /&gt;2.0.3609.0       &lt;br /&gt;Failed to find installation media path due to datastore exception       &lt;br /&gt;in FindSetupFolder()       &lt;br /&gt;Loaded DLL:       &lt;br /&gt;C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\sqlsval.dll       &lt;br /&gt;Version:       &lt;br /&gt;2005.90.3042.0       &lt;br /&gt;Failed to find installation media path due to datastore exception       &lt;br /&gt;in FindSetupFolder()       &lt;br /&gt;.       &lt;br /&gt;.       &lt;br /&gt;.       &lt;br /&gt;Doing Action: Do_sqlGroupMember       &lt;br /&gt;PerfTime Start: Do_sqlGroupMember : Sat Dec 15 12:51:43 2007       &lt;br /&gt;&amp;lt;Func Name='Do_sqlGroupMember'&amp;gt;       &lt;br /&gt;&lt;font color="#ff0000"&gt;Local group CLOGIC\SQL Services doesn't exist        &lt;br /&gt;Failure adding user &lt;/font&gt;&lt;/font&gt;&lt;a href="mailto:_svcSQL@cl.prvopen.mycorporation.com" mce_href="mailto:_svcSQL@cl.prvopen.mycorporation.com"&gt;&lt;font face="Courier New" color="#ff0000"&gt;_svcSQL@cl.prvopen.mycorporation.com&lt;/font&gt;&lt;/a&gt;&lt;font face="Courier New"&gt;&lt;font color="#ff0000"&gt; to local group CLOGIC\SQL Services (2221)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Error Code: 0x800708ad (2221)         &lt;br /&gt;Windows Error Text: The user name could not be found.         &lt;br /&gt;&amp;#160; Source File Name: sqlca\sqlsecurityca.cpp         &lt;br /&gt;&lt;/font&gt;Compiler Timestamp: Sat Oct&amp;#160; 7 09:43:41 2006       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Function Name: Do_sqlGroupMember       &lt;br /&gt;Source Line Number: 1132&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;So I went to the source code of our Do_sqlGroupMember custom action, and found that this part of code does the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;If the computer from where setup is running is not a Domain Controller, it calls &lt;a href="http://msdn2.microsoft.com/en-us/library/aa370419.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/aa370419.aspx"&gt;NetGetAnyDCName&lt;/a&gt;, to try to find the name of one DC on which the security group exists. If none is found, or if the node itself is a DC, one local variable which stores the name of the DC is set to NULL. &lt;/li&gt;    &lt;li&gt;Later, we call &lt;a href="http://msdn2.microsoft.com/en-us/library/aa370436.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/aa370436.aspx"&gt;NetLocalGroupAddMembers&lt;/a&gt; API passing it the DC Name we obtained in previous step, the group name (having removed everything that was before the backslash, so it would be &amp;quot;&lt;strong&gt;SQL Services&lt;/strong&gt;&amp;quot; in your case), and the user name you're trying to add to that hypothetically existing local group (&lt;strong&gt;_svcSQL@cl.prvopen.mycorporation.com&lt;/strong&gt; in your case). If this call to &lt;a href="http://msdn2.microsoft.com/en-us/library/aa370436.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/aa370436.aspx"&gt;NetLocalGroupAddMembers&lt;/a&gt; fails with ERROR_NO_SUCH_ALIAS, it means there's no Local group with such name, so we log the following in the setup log file &amp;quot;Local group %s doesn't exist&amp;quot; (which in your case looks like &amp;quot;Local group CLOGIC\SQL Services doesn't exist&amp;quot;). But this message is not really an error, rather it's an informational message. &lt;/li&gt;    &lt;li&gt;If the call to &lt;a href="http://msdn2.microsoft.com/en-us/library/aa370436.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/aa370436.aspx"&gt;NetLocalGroupAddMembers&lt;/a&gt; failed with ERROR_NO_SUCH_ALIAS, then we try to add the user to the group as if the group was Global. To do so, we call the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa370425.aspx" target="_blank" mce_href="http://msdn2.microsoft.com/en-us/library/aa370425.aspx"&gt;NetGroupAddUser&lt;/a&gt; API. And that's the one which is failing with NERR_UserNotFound (2221 == The user name could not be found).&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now, reading through the documentation of that API, it explicitly mentions this:&lt;/p&gt;  &lt;p&gt;User account names are limited to 20 characters and group names are limited to 256 characters. In addition, account names cannot be terminated by a period and they cannot include commas or any of the following printable characters: &amp;quot;, /, \, [, ], :, |, &amp;lt;, &amp;gt;, +, =, ;, ?, *. Names also cannot include characters in the range 1-31, which are nonprintable.&lt;/p&gt;  &lt;p&gt;In your case, _svcSQL@cl.prvopen.mycorporation.com is 36 characters in length, and that's the reason why it fails with that error, because the API is truncating the user name and not finding it.&lt;/p&gt;  &lt;p&gt;The user name is taken from the attributes of the SQL Server Service, from the node from where Service Pack 2 setup is run.&lt;/p&gt;  &lt;p&gt;We've reviewed the account under which the SQL Server Service was running for this instance, and it was actually set as _svcSQL@cl.prvopen.mycorporation.com. But what was more surprising was that on the other node, it was set using the expected format used by SQL Server Setup when it creates the services in the first place (i.e. CLOGIC\_svcSQL).&lt;/p&gt;  &lt;p&gt;I have no way to explain who and when that change was made, but this is definitely something you should investigate, between the people who operates these servers, so that you avoid doing this again in the future.&lt;/p&gt;  &lt;p&gt;So, suggested action plan was: change that service account to its correct/original format and retry the installation of Service Pack 2.&lt;/p&gt;  &lt;p&gt;After following that action plan, the installation of Service Pack 2 went through with no errors. While we tried to change the service account, we kind of found what could have been the cause of that change. In customer environment, when they tried to set the service account from the Services console (services.msc), if they used the AD Object Browser window, and typed CLOGIC\_svcSQL and then clicked on &amp;quot;Check Names&amp;quot;, it resolved it to its fully qualified name, as in _svcSQL@cl.prvopen.mycorporation.com. So, it looks somebody did that operation in the past in customer's environment, and that subtle difference in the format used to name the service account makes SQL Server's Service Pack code fail, because it doesn't expect it to be expressed that way.&lt;/p&gt;  &lt;p&gt;The reason why Windows resolves the account name in one or another format I don't know and didn't have the time during that incident to continue investigating. So this, I leave it open for someone with more experience in Windows AD than me, explains in the comments section.&lt;/p&gt;  &lt;p&gt;Thanks and enjoy your day!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6828514" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SQL+Setup/default.aspx">SQL Setup</category></item><item><title>Is there any way you can execute an SSIS package whose TransactionOption property is set to Required, without having the MSDTC service running?</title><link>http://blogs.msdn.com/ialonso/archive/2007/12/21/is-there-any-way-to-execute-an-ssis-package-whose-transactionoption-proerty-is-set-to-required-without-having-the-msdtc-service-running.aspx</link><pubDate>Fri, 21 Dec 2007 16:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6828369</guid><dc:creator>ialonso</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ialonso/comments/6828369.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ialonso/commentrss.aspx?PostID=6828369</wfw:commentRss><description>&lt;P&gt;That was the question one develepment consultant asked me. My initial answer, was what I typically answer when I'm asked any of these questions: "I dunno, but let me check it for you." :-)&lt;/P&gt;
&lt;P&gt;After reviewing the source code of SSIS runtime in SQL Server 2005, the answer is: "No, it isn't possible." Even in the case where you're working with a single connection manager and are doing nothing else within the package but working with that connection manager only, your MSDTC must be started.&lt;/P&gt;
&lt;P&gt;Once any container has its TransactionOption property set to Required, it either enlists it in an already existing transaction or begins a new distributed transaction, which requires a transaction dispenser object from MSDTC. That&amp;nbsp; explains why DTC must be started.&lt;/P&gt;
&lt;P&gt;Many thanks for reading me!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6828369" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ialonso/archive/tags/SSIS/default.aspx">SSIS</category></item></channel></rss>