Using RDS to host Sitecore databases can be a good option when you want to deploy Sitecore 9 in AWS. RDS is a database service so you do not need to setup and maintain VMs or SQL Server. However you might run into a few issues when trying to do so, which are related to contained database authentication.
Enabling contained database authentication
Sitecore 9 uses contained database authentication by default. This avoids needing to manage logins outside the database. However this is turned off by default in RDS and trying to enable it through SQL like below will throw an error saying you do not have permission to run the RECONFIGURE statement.
--this will not work in RDS sp_configure 'contained database authentication', 1; GO RECONFIGURE; GO
Instead you will have to go to the database instance’s parameter group and set enable contained database authentication, see screenshot below. The instance might need to be restarted for this change to take effect.
Fix errors with SIF
The Sitecore Installation Framework might throw some errors as well because some of the Sitecore web deploy packages (.scwdp) try to enable contained database authentication through the above SQL code. This can be fixed by:
- renaming the package to .zip
- unzipping
- remove SQL code
- zip again, make sure to keep original folder structure
- rename to .scwdp and deploy
Pingback: Fit Sitecore 9 databases in Aliyun RDS – Klauth Wang's Tech Blog
Do you have anyting for sitecore 10 we are trying to deploy on RDS and its not working.
LikeLike
There is a post for Sitecore 10 here https://jeroen-de-groot.com/2021/06/19/setup-sitecore-databases-in-aws-rds/ What issue are you running into?
LikeLike
I’m trying to install sitecore 9.1. I have enabled “contained database authentication” as suggested above. When I try to install, I get the below error. My IT admin says, on RDS database mirroring will be running which we cannot turn it off. He told to find and remove that code. But I couldn’t locate the file which has those line. Any suggestion or workaround on this?
Error count: 1.
Error Code: ERROR_EXECUTING_METHOD
More Information: Could not deploy package.
Error SQL72014: .Net SqlClient Data Provider: Msg 1468, Level 16, State 2, Line 5 The operation cannot be performed on database “Baptist_Core” because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.
Error SQL72045: Script execution error. The executed script:
IF EXISTS (SELECT 1
FROM [master].[dbo].[sysdatabases]
WHERE [name] = N’$(DatabaseName)’)
BEGIN
ALTER DATABASE [$(DatabaseName)]
SET RECOVERY SIMPLE
WITH ROLLBACK IMMEDIATE;
END
Error SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.
Error SQL72045: Script execution error. The executed script:
IF EXISTS (SELECT 1
FROM [master].[dbo].[sysdatabases]
WHERE [name] = N’$(DatabaseName)’)
BEGIN
ALTER DATABASE [$(DatabaseName)]
SET RECOVERY SIMPLE
WITH ROLLBACK IMMEDIATE;
END
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.
LikeLike
I had similar issues and followed the steps under “Fix errors with SIF” to update SQL code. Sometimes this can be time consuming and it might take less effort to backup the databases from somewhere else and restore them in RDS. This approach is described here: https://jeroen-de-groot.com/2021/06/19/setup-sitecore-databases-in-aws-rds/
LikeLike