How do you deploy different logins based on environment in SQL Server Database Project 2017?

433 Views Asked by At

I've read the following question: How to handle users and logins in Visual Studio Database Project?

Basically, I'm looking for a way to easily setup the logins based on the database server that's being deployed to. The additional catch is that this will be deployed as part of an azure-devops release pipeline and therefore will be deploying the dacpac.

The question linked aboved deals with VS 2010 and is rather manual. Has this changed at all? Can this be done using DAC Publish Profiles?

1

There are 1 best solutions below

1
PatrickLu-MSFT On BEST ANSWER

Not much has changed by now, this may be one area in which SSDT lacks. You'll need to build out your permissions and users differently. It's already well documented in Peter Schott's blog.

Besides, it's not hard to deploy on multiple environment/servers with Azure DevOps Release pipeline under a single logins.

There is a concept called Deployment groups in Azure DevOps.

More details about this part, please take a look at here: Build and Deploy to multiple IIS servers and SQL Server using Azure DevOps