Surendra Sharma

Surendra Sharma

Search This Blog

Friday, January 25, 2019

Sitecore error - You must remove all users with password before setting the containment property to NONE

I was installing Sitecore 9 and received some SOLR CORE errors so I again re-execute the script and this time received new error “You must remove all users with password before setting the containment property to NONE”.
 
I google it and found out that it’s because of users are exist in Sitecore databases.

So I created this handy SQL script where you have to specify database prefix only and it will remove particular users from all necessary databases.

--Specify your Sitecore instance prefix here
DECLARE @prefix NVARCHAR(50) = 'sc9u2com';
DECLARE @query NVARCHAR(MAX);
SET @query = 'Use [' + @prefix + '_MarketingAutomation]; DROP USER [marketingautomationuser];'
SET @query = @query + 'Use [' + @prefix + '_Messaging];DROP USER [messaginguser];'
SET @query = @query + 'Use [' + @prefix + '_Processing.Pools];DROP USER [poolsuser];'
SET @query = @query + 'Use [' + @prefix + '_ReferenceData];DROP USER [referencedatauser];'
Select @query
exec(@query)

I hope this script will help developers who are facing same issues.

No comments:

Post a Comment