My name is Harsh Deep Singh, and I am a SQL Server Premier Field Engineer with Microsoft. I've been working on SQL Server for quite some time, and the intention behind starting this blog is to try and share my knowledge with the SQL Server community. Any feedback or suggestions on the blog are both welcome and solicited. Please feel free to drop me a line on email@example.com anytime.
Disclaimer: The information in this weblog is provided “AS IS” with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) – so keep it polite, please.
Okay, so I woke up one morning and decided that this was a good day to patch my SQL Server 2008 R2 instance (named LPT2) to Service Pack 1. So I just downloaded the Service Pack from the Microsoft website, ran it, and was going through the screens, whistling softly to myself, when….CRASH…!!!! The Service pack setup failed…!!! And even worse, I did not even get the basic error prompt that I feel is the least DBA’s like me deserve. So I just thought to myself, "okay fine, Mr. Service Pack, so you wanna play this the hard way? Let’s see what you got."
I pulled up the C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log folder, selected the folder with the date modified that most closely matched the time of the ill-fated installation attempt, and opened the summary.txt inside it….but alas, no clues there. "No problem," I thought to myself, "lets dive in deeper." So I opened the Detail.txt in the same folder, and searched for the common error strings like “Return value 3” and “at Microsoft.SQLserver”, etc. Surprisingly enough, still nothing…!!! So I just switched to the basic “failed”, and found this "immensely descriptive" error message:
2011-10-19 11:08:50 Slp: Attempting to run patch request for instance: LPT2 2011-10-19 11:08:53 Slp: Error: Failed to run patch request for instance: LPT2 (exit code: -2068774911)
By now I had lost track of the tune which I was whistling, and an uncertain frown had taken over my expression. Upon doing some (okay, a lot of) research, I arrived at the following conclusion:
The root cause of the issue was that my instance name was the same as a windows keyword. You can find a list of the Windows reserved keywords here:
The issue occurs because from SQL 2008 onwards, the service pack installation creates a folder with the instance name inside the respective "date_timestamp" folder in C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log folder. Since the instance name is a windows reserved keyword, the installation is not able to create the folder; hence it is unable to proceed beyond this point.
Yes, I know you're surprised that we're able to install an instance with such a name in the first place, but that's because the instance folder is named MSSQL10.<keyword>, or MSSQL10_50.<keyword>, so Windows allows the folder creation at the time of running the RTM installation.
The bad news is, there is (did I say unfortunately?) no resolution for this situation. The only way to proceed from here is to use a different instance name, i.e. you have to install a new instance and move all the databases over to it.
So if you’re still reading this post, I hope it leaves you with the same lesson that it left me with:-
“Don’t install instances with names that are windows reserved keywords”
Please let me know if you have any questions or concerns regarding the issue mentioned in this post. Or, if you have been unfortunate enough to encounter this issue yourself, and know of a workaround for it, your two cents would be highly appreciated.