While building a Virtual Machine tonight to do some testing and screenshots for a future article/blog post, and possibly for a presentation, I ran into a problem installing SQL Server 2008 on Windows Server 2008. For whatever reason, during installation the Powershell components for SQL Server 2008 failed to install correctly, but SQL Setup completed successfully and SQL Server was installed and running as expected (at least I never used powershell so it seemed that way). To be current I went to apply Service Pack 1 (SP1) and the latest Cumulative Updates to my Virtual Machine and I encountered a failed Setup message:
A failure was detected for a previous installation, patch, or repair during configuration for features [SQL_PowerShell_Engine_CNS,SQL_PowerShell_Tools_ANS,]. In order to apply this patch package (KB968369), you must resolve any issues with the previous operation that failed. View the summary.txt log to determine why the previous operation failed.
I figured maybe a reboot would solve the problem but no dice. Not sure what exactly to do in this case I hit the search engines and ran across a couple of posts that didn’t solve the problems. I tried adding another component, Reporting Services in this case, which didn’t solve the problem, and I was just short of removing SQL Server 2008 and attempting to reinstall fresh when I tried the Repair option under Maintenance. This fixed the problem and I was able to successfully install Service Pack 1 and the Cumulative Update 4 to the Virtual Machine.
A quick warning here, the Repair option will take the SQL Server Services offline, so if you catch yourself in this scenario, you need to plan for the outage which was about 15 minutes in my case.