In today’s post I will share with you an interesting issue I ran into while reinstalling Sitecore Commerce Server and what I did to address it. For your reference I have been following the official Sitecore Commerce installation guideline.
So here is my scenario:
I had previously installed Sitecore Commerce and for reasons that don’t really matter for this post I deleted the existing Sitecore instance and decided to reinstall it again.
And so I did. I setup Sitecore and when I got to the step of Installing the Sitecore update packages, more specifically the package Sitecore.Reference.Storefront.Powered.by.SitecoreCommerce.10.0.xxx.update
I got the following error message:
“Cannot open database “CFSolutionStorefrontSite_productcatalog” requested by the login. The login failed for user ‘DESKTOP-I0Q0N04\CSFndRuntimeUser’.”
And so I started double checking permissions for the CSFndRuntimeUser user which by the way, was an administrator on the Windows instance. I was able to authenticate on SQL Server using this same user. With that in mind I thought that this user should not have any sort of permissions issues so I knew was missing something.
As I kept investigating it I noticed that when you install Sitecore Commerce Server it will install on SQL Server the database MSCS_Admin. And looking further I noticed that on the Sites table there was the name of the Site I was reinstalling there(remember I am reinstalling an instance so I’m using the same name). To check that just open Sql Server Management Studio and run the following query on the MSCS_Admin database:
SELECT TOP 1000 * FROM [MSCS_Admin].[dbo].[Sites]
When I saw that record I decided to delete the MSCS_Admin database altogether since this was a local installation and I could do that and reinstall Sitecore Commerce Server.
After deleting it, reinstalling Sitecore Commerce Server and trying again the installation of the update package I mentioned earlier it got rid of this error. If deleting it is not an option you know where to look for 🙂
So I decided to write this post as the error message I was getting was somewhat misleading so hoping to save whoever reads this some time 🙂