"login failed for collectionuser" errors appear after migrating our Sitecore 10.1.1 databases from self-hosted SQL Server on VM to Azure SQL Database. The site itself is working, but anything connected to XConnect is not.
Mitigation attempts:
- Validated all Connection Strings worked in all three sites
- identity
- sc
- xconnect
- Created individual collectionuser users and used the same password for each.
- Xdb.Collection.ShardMapManager
- Xdb.Collection.Shard0
- Xdb.Collection.Shard1
- Executed
EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = '$(CollectionDbUserName)'
on each shard - Updated the ServerName and DatabaseName fields to match the new server and database names
[__ShardManagement].[ShardsGlobal]
[__ShardManagement].[ShardsLocal]
- Recycled AppPools and Services
If I revert only the collection connectionString the errors stop, so I know that it is the connection to those databases is the problem, but of course, we want the databases in Azure.... Anyone have any recommendations?
EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = '$(CollectionDbUserName)'
and execute the output of the first script.Xdb.Collection.ShardMapManager
there are tables which have references to database names, e.g.ShardsGlobal
has aServerName
andDatabaseName
field. Is this all set correctly? More info can be found here doc.sitecore.com/en/developers/101/…