Why is Azure Data Studio telling me to use sp_configure if Azure SQL does not have it?

172 views Asked by At

When attempting to publish an Azure SQL Database to a container in Docker Desktop, it fails. Why does the error mention the sp_configure procedure if Azure SQL does not contain that procedure?

I've created a SQL Project in Azure Data Studio. I've updated the Schema and now I'm trying to publish to a container. My guess is that I need to configure the database user logins -- though, it is confusing to see the error mentioning a procedure that does not exist in Azure SQL.

What is happening behind the scenes during this deployment that is using authentication? What authentication process are taking place when publishing an Azure SQL DACPAC to a container?

The errors are displayed below:

Deploy dacpac: Could not deploy package.
Warning SQL74501: The source contains users that rely on an external authentication 
provider that is not supported by the target. These users will be treated as users 
without logins.
Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 12824, Level 16, State 1, 
Line 5 The sp_configure value 'contained database authentication' must be set to 1 in 
order to alter a contained database. You may need to use RECONFIGURE to set the 
value_in_use.
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 FILESTREAM(NON_TRANSACTED_ACCESS = OFF),
CONTAINMENT = PARTIAL
WITH ROLLBACK IMMEDIATE;
END


Error SQL72014: Core Microsoft 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 FILESTREAM(NON_TRANSACTED_ACCESS = OFF),
CONTAINMENT = PARTIAL
WITH ROLLBACK IMMEDIATE;
END

Image below shows that I am publishing an Azure SQL Database enter image description here

0

There are 0 answers