<p>You either have to have the login information in order to connect to the database, or, you have to configure your database server to allow access to Azure Services. This means that the SQL Database and server and the Azure DevOps pipelines have to be part of the same account (not necessarily the same login, but Azure AD). I'd lean towards requiring the connection information rather than open up everything broadly between all your Azure services.</p>

CC BY-SA 4.0
2020-03-25T11:40:37.150Z
2020-03-25T11:40:37.150Z
Grant Fritchey
<p>Here is my scenario - </p>

<p>I have access to source Azure SQL Database where i did few changes to schema (eg adding a table). Now I want to deploy this SQL code to prod Azure SQL Database using Azure DevOps dacpac task. </p>

<p>Build pipeline -  I have used MS Build task to generate .dacpac file</p>

<p>Release pipeline - I know Azure SQL server name and Database name but do not know Server admin credentials. How to deploy dacpac to the Prod target server? What are all the tasks required in Release pipeline to achieve this and it should be repeatable process. </p>

<p>Any help would be really appreciated</p>

CC BY-SA 4.0
2020-03-28T17:49:07.780Z
If it's a security thing you could get the credentials put into a KeyVault then the deployment task can pull the credentials from KeyVault. That way you'll never know or need to know what they are.
Simon
CC BY-SA 4.0
2020-03-30T07:45:00.320Z
Thats right but everyday, there are lot of teams deploy into prod server and security team doesnt want to share the admin creds secrets with any one of Dev teams. This option is not possible
DevOps learner
<azure-devops><azure-pipelines><databases>
How to deploy Dev Azure SQL code to Prod Azure SQL using dacpac without knowing the target server credentials
DevOps learner
# How to deploy Dev Azure SQL code to Prod Azure SQL using dacpac without knowing the target server credentials

(Asked by: username_0 on 2020-03-24)

Here is my scenario -

I have access to source Azure SQL Database where i did few changes to schema (eg adding a table). Now I want to deploy this SQL code to prod Azure SQL Database using Azure DevOps dacpac task.

Build pipeline - I have used MS Build task to generate .dacpac file

Release pipeline - I know Azure SQL server name and Database name but do not know Server admin credentials. How to deploy dacpac to the Prod target server? What are all the tasks required in Release pipeline to achieve this and it should be repeatable process.

Any help would be really appreciated

**Tags:** azure-devops, azure-pipelines, databases

> **Comments:**
> **username_1**: If it's a security thing you could get the credentials put into a KeyVault then the deployment task can pull the credentials from KeyVault. That way you'll never know or need to know what they are.  
> **username_0**: Thats right but everyday, there are lot of teams deploy into prod server and security team doesnt want to share the admin creds secrets with any one of Dev teams. This option is not possible  

---

## 1 answers

### Answer by username_2 on 2020-03-25. Score: 1

You either have to have the login information in order to connect to the database, or, you have to configure your database server to allow access to Azure Services. This means that the SQL Database and server and the Azure DevOps pipelines have to be part of the same account (not necessarily the same login, but Azure AD). I'd lean towards requiring the connection information rather than open up everything broadly between all your Azure services.


---

