Posts
1146
Comments
890
Trackbacks
1
March 2007 Blog Posts
Vista: Windows Installer Error 2869

From https://blogs.conchango.com/pauloreichert/archive/2006/11/21/Windows-Installer-MSI-packages-error-code-2869-on-Windows-Vista.aspx:

“The quick and dirty solution I found to make them install is to create a batch file with the following command:

msiexec /i "path-to-package.msi"

Save the file then right-click it and select "Run as Administrator". That makes it work.”

So, always check for whether you are running as administrator when installing stuff on Vista.

posted @ Saturday, March 31, 2007 4:55 PM | Feedback (0)
T-SQL: What is Halloween Protection?

From http://blogs.msdn.com/ianjo/archive/2006/01/31/521078.aspx:

“ “Halloween protection" in database systems refers to a solution for a problem that can occur in update queries. The problem occurs when an update itself affects the rows selected for update.  For example, imagine a company wants to give every employee a 10% pay increase. If the update query is unlucky enough to walk the salary index then the same row may be selected, updated, the update moves the row ahead in the index, and then the row will be redundantly selected again and again.  This problem is corrected by isolating the rows chosen from the effects of the update itself.  For example, a SPOOL operation which stores all the rows to be updated outside of the context and any index can provide the necessary isolation. SORTs are also sufficient for isolation purposes.“

 
posted @ Friday, March 30, 2007 11:04 AM | Feedback (0)
I AM BLOGCOWARD

Please read the title of this post in the voice of Tom Servo from Mystery Science Theater 3000 as he says "I AM SPARTACUS".

Scott Bellware of CodeBetter.com fame made a series of posts about the upcoming Entity Framework.  They can be found here and here.

As a response to one of these posts, combined with a comment he made to it, I submitted a very sarcastic comment that called him to task for something he said.

Scott not only deleted the comment I made, but started a new post based on the deleted comment.  It was more ironic than funny (though it was funny, I have to admit), but it struck me as insightful.

That post can be found here.

I want to thank him for providing me with the inspiration/motivation for creating this blog because of that.  My previous 'blog' which I used to post syntax reminders, among other things, was based on .Text from some randomly obscure period.  By the time I got around to looking at moving it to a better version of the engine, it was too far gone.  So, I'm trying out SubText.  A few issues, but it seems to work.

I will have much to say about the cause and genesis of our 'conversation' (and how it relates to Babylon 5, USENET moderation, and the Entity Framework), and many other things, but I'm waiting for DNS propagation to occur before I get into the details of it.

And to anyone that's curious, the comment I made that was deleted was:

"It must be nice to be better and smarter and more pure than everyone else."

Pretty rancorous stuff, huh?

posted @ Wednesday, March 21, 2007 10:45 PM | Feedback (0)
SQL Server 2005: Database Engine Tuning Advisor error - "Failed to find IPC port"

I've gotten this every once in a while when trying to launch it from Management Studio.  The 'fix' is to keep trying to launch it (sometimes you just try repeatedly, other times, you wait a couple of minutes and try again).

Something about a 'timing issue' between the IPC communications layer and SQL Server.  Yeah, I don't know what that really means either, but that's what I found on various forums.

Update: if you try to cancel a running analysis or kill it, it seems to go bye-bye for good till the next reboot.

posted @ Thursday, March 01, 2007 1:19 PM | Feedback (0)
T-SQL: Basics of Statistics in SQL Server 2005

http://www.developer.com/db/article.php/3622881

Includes this cool trick:

The STATS_STREAM option, so far as I know, remains undocumented. But we now know what the other two options do, thanks to the new blogging spirit of openness and a blog posting from the SQL Server Query Optimization Team. It turns out that ROWCOUNT and PAGECOUNT can be used to trick the query optimizer by letting you fake the internal metadata about a particular table - specifically the count of rows and count of pages that the table occupies.

If you're going to experiment with this, please do not do so in a production database!

For example, you can vastly increase the apparent rowcount and pagecount of the Sales.SalesOrderDetail table by issuing this command:


UPDATE STATISTICS Sales.SalesOrderDetail 
WITH ROWCOUNT=5000000, PAGECOUNT = 5000000

Why would you want to do this? SQL Server's query optimizer does things differently on small tables and on large tables. During development, you likely don't have a whole lot of data in your tables. Rather than spend time generating huge amounts of sample data, you can use the undocumented options of UPDATE STATISTICS to see how the query optimizer will treat your tables after they've been in production for a while. This can be a quick and dirty method to uncover potential performance issues before they arise, and perhaps point out the need for additional indexes or other schema work. I'd recommend confirming any such changes by retesting with realistic amounts of sample data, though.”

posted @ Thursday, March 01, 2007 12:49 PM | Feedback (0)