How do I set SQL user password while deploying the database project using CI/CD pipeline

0 votes

I am working on database project which is a .sql project in Visual Studio.I am creating user like this:

CREATE USER [MyUser] WITHOUT LOGIN;
GO
ALTER ROLE [db_datareader] ADD MEMBER [MyUser]
GO
ALTER ROLE [db_datawriter] ADD MEMBER [MyUser]
GO
ALTER ROLE [db_executor] ADD MEMBER [MyUser]
I built dacpack in VSTS Build and deployed it to Azure in VSTS Release.
How do I setup the continuous deployment so that it will create user with password? Can anyone help me with this.
Thanks.

image

Apr 10, 2018 in Jenkins by Atul
• 10,200 points
45 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

While you are trying , just try the below option as well.

This plug-in in Azure Marketplace maybe useful.

You can also create logins using PowerShell as it is also an option for you and includes conditional execution.

You can find another alternatives which are explained here.

Hope this helps.

answered Apr 10, 2018 by shubham
• 6,480 points

Related Questions In Jenkins

+4 votes
7 answers

How to set the pipeline name and description for a Jenkinsfile?

You can rename pipeline jobs in jenkins ...READ MORE

answered Oct 11, 2018 in Jenkins by Hannah
• 14,080 points
4,017 views
0 votes
1 answer

How do I pass value from my Fake # script to the host build server (Jenkins)

You can use the EnvInject plugin to pass environment ...READ MORE

answered Jul 11, 2018 in Jenkins by Kalgi
• 2,620 points
41 views
0 votes
1 answer

How do I start jenkins as an admin without having the need of entering credentials?

I found a way around: Go to /Users/Username/.jenkins/ Open config.xml and remove ...READ MORE

answered Aug 22, 2018 in Jenkins by DareDev
• 6,520 points
34 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Error while talking to remote Oracle DB using Jenkins-CI

I installed Oracle XE to talk to ...READ MORE

answered May 1, 2018 in Jenkins by shubham
• 6,480 points
171 views
0 votes
1 answer

Error while communicating with remote Oracle DB through Jenkins-CI

I was also facing the same problem. ...READ MORE

answered Apr 25, 2018 in Jenkins by shubham
• 6,480 points
58 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.