if datepart(dw, getdate()) in (6, 7)use pubs;

Uninstalling Reporting Server 2008 on Windows Server 2008

Ha. I had quite disputable pleasure of installing and reinstalling and reinstalling and reinstalling – I think about 5 times before it worked – Reporting Server 2008 on Windows Server with the same year number in name.

During my struggle I came across an error which seems to be not quite unfamiliar to some more unfortunate developers and admins who happen to uninstall SSRS 2008 from the server. I had the SSRS 2008 installed as named instance, SQL2008. I wanted to uninstall the server and install it to default instance. And this is when it bit me – not the first time and not the last that day . The setup complained that it couldn’t access a DLL:

When you try to uninstall Microsoft SQL Server 2008 Reporting Services from the server, you may receive the following error message:

An error has occurred:
Access to the path 'Drive_Letter:\WINDOWS\system32\perf-ReportServer-rsctr.dll' is denied.

Note Drive_Letter refers to the disc drive into which the SQL Server installation media is inserted.

In my case, the Note was not true; the error pointed to a dll that was located in Windows folder on C:\, not where the installation media were.

Despite this difference I tried to identify any processes that might be keeping lock on the dll. I downloaded Sysinternals process explorer and ran it to find any processes I could stop. Unfortunately, there was no such process.

I tried to rerun the installation, but it failed at the same step.

Eventually I decided to remove the dll before the setup was executed. I changed name of the dll to be able to restore it in case of some issues. Interestingly, Windows let me do it, which means that indeed, it was not locked by any process.

I ran the setup and this time it uninstalled the instance without any problems:

To summarize my experience I should say – be very careful, don’t leave any leftovers after uninstallation – remove/rename any folders that are left after setup has finished. For some reason, setup doesn’t remove folders and certain files. Installation on Windows Server 2008 requires more attention than on Windows 2003 because of the changed security model, some actions can be executed only by administrator in elevated execution mode. In general, you have to get used to UAC and a bit different experience than with Windows Server 2003.

Yeah, appreciate the time spent putting this up - this is EXACTLY what happened for me, and renaming the file appears to have allowed the installation to continue. No mention in procmon, and no lock preventing renaming for me either.

It creates a new copy of the file after renaming, so I think the installer is attempting to overwrite instead of modify or reference.