After using Laplink’s PCMover software to move all my software and computer setup to a new machine, I could not run SQL Server Express or SQL Server Management Studio on the new machine. I decided to do a reinstall but I would get the error ‘Failed to retrieve data for this request’ whenever I tried to do the install. My original version of SQL Server Express was 2012 so that’s what I tried to reinstall. When that didn’t work I tried SQL Server Express 2014 with the same results.
I did a lot of online searching to try and solve this and I found a lot of different suggestions on how to fix it but none seemed to work. I finally found where the install log for SQL Server was being created.
C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20170531_163043\
The 110 directory is for SQL Server 2012. For SQL Server 2014 this will be 120. The last subdirectory in the path will change as it is a time stamp of when the install was done. The log filename has the machine name as well as the time stamp as part of the name. It is in the format:
Summary_MachineName_Datestamp_Timestamp_GlobalRules.txt
Here is some of what was in the error log (I have highlighted important information):
Exception type: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException Message: Failed to retrieve data for this request. HResult : 0x80131500 Data: HelpLink.ProdName = Microsoft SQL Server HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink HelpLink.LinkId = 20476 HelpLink.EvtType = 0x48BB60BC@0xBB814387 DisableWatson = true Stack: at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.ProcessDTbl(DataTable dt, Int32 level) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.ProcessDTbl(DataTable dt, Int32 level) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectSqlDiscoveryData(String machineName) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectDiscoveryData(String machineName) at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath, String clusterDiscoveryDocRootPath) at Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction.ExecuteAction(String actionId) at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer context) Inner exception type: Microsoft.SqlServer.Configuration.Sco.ScoException Message: Attempted to perform an unauthorized operation. HResult : 0x84bb0001 FacilityCode : 1211 (4bb) ErrorCode : 1 (0001) Data: WatsonData = HKEY_LOCAL_MACHINE@SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SQLEXPRESS\Setup Stack: at Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.OpenSubKey(String subkey, RegistryAccess requestedAccess) at Microsoft.SqlServer.Configuration.Sco.SqlRegistryKey.OpenSubKey(String subkey, RegistryAccess requestedAccess) at Microsoft.SqlServer.Discovery.DiscoveryUtils.GetLocalMachineSubKey(ServiceContainer ctx, String machineName, RegistryView regView, String regPath, RegistryAccess registryAccess) at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetInstanceMapObject(String machineName, RegistryView registryView, String instanceId, String instanceName, String instanceType, String instanceSuffix, UpgradedInstanceStateEnum instanceState) at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetInstanceMapCollectionInHive(String machineName, RegistryView regView, List`1 subKeys) at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetInstanceMapCollection() at Microsoft.SqlServer.Discovery.Instance.GetData(EnumResult erParent) at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData() at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci) at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request) at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request) Inner exception type: System.UnauthorizedAccessException Message: Attempted to perform an unauthorized operation. HResult : 0x80070005 Stack: at Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.OpenSubKey(String subkey, RegistryAccess requestedAccess)
Based on this log, it seemed that there was some problem with reading registry subkeys. I ran regedit.exe to check out this specific registry location and found that I could not access many of the subkeys under HKEY_LOCAL_MACHINE@SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SQLEXPRESS.
I had found a web page that suggested running the setup under the LOCAL SYSTEM account. Rather than do that, I decided to try and run the registry editor using the LOCAL SYSTEM account to update the permissions for the subkeys that I could not access during the install. To do this, I opened a command line prompt as admin and went to the Windows\System32 directory. I started another command prompt by using the program psexec.exe with the following command:
Psexec.exe -s -i cmd.exe
In this new command prompt session you will be running as the LOCAL SYSTEM account. I then went to the Windows\SysWOW64 directory and ran regedt32.exe. I navigated to the key HKEY_LOCAL_MACHINE@SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SQLEXPRESS and right-clicked and selected Permissions. I added a group for which I was a member and gave it full permissions.
Once I did this I was able to run the SQL Server install (SQL Server Express 2014) without getting the error.
However, when I subsequently ran SQL Server Management Studio, I would get another error saying Invalid license data. Reinstall is required. I tried various re-installs and kept getting this error. Then I found a website with the solution:
- Uninstall Visual Studio 2010 Shell (Isolated) ENU (or equiv)
- Repair SQL Server 2014 (if repair doesn’t work from Add/Remove Programs then rerun SETUP.EXE from the installation source and choose the repair option – you can redownload and unpack if you don’t have this)
After this, I was able to run SSMS and connect to the local SQL Server on my machine.
Hello,
Your post has literally saved my day !
Thank you very, very much
Saved my day too! Changing Permissions didnt help me though, I renamed the SQL regisrty keys (in my case they were leftovers and not in use). Thanks for pointing me in the right direction.