Тёмный
No video :(

Databases with SSDT: Deployment in CI/CD process with Azure DevOps 

Kamil Data Geek - Azure explained
Подписаться 2,2 тыс.
Просмотров 25 тыс.
50% 1

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 79   
@entertainment-unlimited007
@entertainment-unlimited007 2 месяца назад
Thank you very much Kamil, you explained every thing in very simple manner, got worth of knowledge from this workshop
@KamilNowinski
@KamilNowinski 2 месяца назад
Thanks
@subhraz
@subhraz 11 месяцев назад
Thank you. Demos were explained very well and simple manner. It was useful and informative.
@KamilNowinski
@KamilNowinski 11 месяцев назад
Thanks buddy!
@dipalinalawade1318
@dipalinalawade1318 Год назад
Thanks for the video. It has resolved all my queries. Explained in simple way and to the point. Very helpful!
@KamilNowinski
@KamilNowinski Год назад
Thanks!
@SumanKmystudio
@SumanKmystudio Год назад
Thank you so much for the video, finally I can able to deploy securely to on premises server.
@KamilNowinski
@KamilNowinski Год назад
Great!
@parry1454
@parry1454 Год назад
Hi @Kamil, your video has saved tons and tons hours of searching , watching and understanding. Wish If I could give you the highest award for this topic :). Its highly recommended and my entire team is referring your videos. Superb and very well explained. @Kamil, Thank you again
@vijaynarra695
@vijaynarra695 3 года назад
Great ! Very informative session 😀 Waiting for more and more videos 😄
@KamilNowinski
@KamilNowinski 3 года назад
Thanks a ton :)
@debbieedwards7267
@debbieedwards7267 3 года назад
So very useful. thank you so much
@KamilNowinski
@KamilNowinski 3 года назад
Thank you, Debbie.
@rafapixels
@rafapixels 2 года назад
Thanks for the session!
@KamilNowinski
@KamilNowinski 2 года назад
Any time!
@hras13
@hras13 2 года назад
Hi @Kamil. Thanks for the wonderful presentation. Is there a particular approach you would suggest to deploy changes only for a couple of tables/objects? I'm still to understand how current data doesn't get affected by new builds and releases. Any light you can share would be great. Again. Thank you!
@KamilNowinski
@KamilNowinski 2 года назад
Hi @Mr Ant. You can apply one trick, but generally, you should aim to deploy the entire database project (the latest, master version). Please make sure you understand the whole concept of SSDT and its deployment - it does deploy only differences, so one step before it happens is the process of comparing source to target. Check out the following free lesson in my course: learn.sqlplayer.net/view/courses/ssdt-essentials/981098-module-4/2932061-introduction
@janamyugender3432
@janamyugender3432 Год назад
Very good information and session thanks a lot. I am looking for the same using Jenkins could you please have the one using Jenkins will be greatly helpful for me. Thanks in advance .
@KamilNowinski
@KamilNowinski Год назад
Janam, one of my friends, Gavin, wrote this article a few years ago which might help: gavincampbell.dev/post/jenkins-windows-git-ssdt-profit/ However, if there is no ready-to-go task for publishing DACPAC, you can use PowerShell task to execute SQLPackage.exe to do this. I explained this in the following lesson of my course: learn.azureplayer.net/view/courses/database-projects-with-ssdt-dacpac/734805-module-6/2417631-publishing-with-sqlpackage-powershell The above lesson is free! HTH. Enjoy!
@clodola1
@clodola1 Год назад
Great explanation , Thanks for taking to time put in all the remedial steps, generally where I get frustrated. I got as far as generating the script in VS I want to publish(59 min) , Repo version has a view with a comment --TEST, I have an existing DB in Azure I want to update with the change (Alter view with a comment --TEST,) , when I generate the script, no code is generated to make the update but if I was to create a new DB all object code is created, what am I doing wrong? I want to update existing DB's with new or altered objects
@KamilNowinski
@KamilNowinski Год назад
Comment is not a real change to database's object, so likely due to that you see no changes in migration script generated.
@MrMatheusneris
@MrMatheusneris 2 года назад
Thanks!!
@KamilNowinski
@KamilNowinski 2 года назад
Welcome!
@ryanshannon6963
@ryanshannon6963 2 года назад
Hi @Kamil. Is it possible to use YAML (I'm using Azure Data Studio as my source control/branch manager into an Azure DevOps remote repo, along with build/deployment pipes) for those builds and deployments? I set up a lower environment with Red-Gate SQL Source Control and SQL Change Automation, but I want to try out SSDT using ADS and try to build an automated build/deployment pipe to compare workflows. I'm kinda liking ADS more than the red-gate solution, even if not as intuitive as the RG solution, but was hoping you'd have used YAML for your demo. I guess for POC purposes the Classic is enough to get started. Which would you recommend and why? Thanks so much for your presentation!
@KamilNowinski
@KamilNowinski 2 года назад
Hi Ryan, Classic UI for POC is absolutely enough. The differences between state-based vs migration-based approaches are huge, hence I'm not going to describe them here. My friend, Alex Yates, made an excellent comparison though which you can read here: github.com/NowinskiK/ssdt-training/blob/master/docs/Redgate-vs-SSDT-4.pdf I hope this will help.
@ravivobilli
@ravivobilli Год назад
Can we include system views in the sql solution file? As some of my views are referring the system views..
@KamilNowinski
@KamilNowinski Год назад
In such case you just need to add "master" (system) database to references and that's it. All references to any system views will be found.
@codecolon
@codecolon 5 месяцев назад
How do we manage logins and users permission when deploying multiple environments? For example: if we have users User1 & User2, User1 should not be present on Dev and User2 should not exists on UAT?
@KamilNowinski
@KamilNowinski 5 месяцев назад
Check these two examples from my commercial course (code is free): github.com/NowinskiK/ssdt-training/blob/master/src/Variables/ContosoRetailDW/Deployment/Environment-specific.sql github.com/NowinskiK/ssdt-training/blob/master/src/PrePostDeployment/ContosoRetailDW/Scripts/CreateUsers.sql If you interested in the whole course: learn.azureplayer.net/ssdt-essentials
@konoplja666
@konoplja666 7 дней назад
Thank you, but Visual Studio build not working with SSDT project, prefer use MSbuild I think
@KamilNowinski
@KamilNowinski 7 дней назад
It should works as presented in the video. Do verify whether you have SSDT extension installed in Visual Studio (18:40)
@konoplja666
@konoplja666 7 дней назад
​@@KamilNowinski yes, it builds fine locally, but via agent it can't find the path "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found" So i use msbuild and it works fine. Maybe it's related to the enterprise version or something else, visual studio is not the most stable product, hehe
@sambera8366
@sambera8366 2 года назад
Kamil, Very informative and thanks for sharing this. I have a solution which has multiple databases in the same solution and as such need separate dacpac files created for each database. How can that be possible in the Azure DevOPs CI portion?
@KamilNowinski
@KamilNowinski 2 года назад
That's absolutely not a problem. Your solution contains a few separate databases and the build of the solution file will build all projects in it. Each project has its own dacpac file, so having 4 databases in solution you'll get 4 dacpac files.
@sambera8366
@sambera8366 2 года назад
@@KamilNowinski Thank you for your prompt response. You are right, when I build my solution manually in VS, it creates separate dacpac files in the respective bin folders. The issue I am facing is that I am using the same Azure DevOps CI as your video. The process uses system variable, and in my case root folder solution and as a result one dacpac called root-folder. How do I publish 4 dacpac files from CI pipeline in Azure DevOps for this one solution? Thanks in advance.
@sparshforu
@sparshforu 8 месяцев назад
Hi @kamil, getting error "A project which specifies SQL Server 2016 as the target platform cannot be published to Microsoft Azure SQL Database v12." I tried solution provided by you but still getting same error can you please suggest
@KamilNowinski
@KamilNowinski 8 месяцев назад
You must change target platform: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4N_fv6d3KQY.html It should help. If not - create a question in GitHub with more details: github.com/NowinskiK/ssdt-training/discussions
@kothahemanth4065
@kothahemanth4065 Год назад
If I create a new view and pushed the update to repo and pipeline deployed that changes to target DB and if I revert that new view commit, will the release pipeline will delete that view or else need to create a new script in ssdt for droping that view.
@KamilNowinski
@KamilNowinski Год назад
It depends on the publish options. Check this out (free): learn.azureplayer.net/ssdt-tips
@MrTeendaba
@MrTeendaba 3 года назад
Is there anywhere I can view a log of database changes that occurred when a DACPAC was published? I mean to generate post-deployment report what change are published on target Database
@KamilNowinski
@KamilNowinski 2 года назад
You can generate script or report before the deployment.
@timur2887
@timur2887 Год назад
it is possible to make a step in a pipeline with manual call of SqlPackage.exe from command line with parameters for both publishing and reporting and scripting at the same time in one step
@plusvision100
@plusvision100 10 месяцев назад
How can we implement a ci/cd pipeline for multi tenant db
@KamilNowinski
@KamilNowinski 8 месяцев назад
Yes. Do you mean multi-databases (one per tenant) or different Azure Directory tenants?
@plusvision100
@plusvision100 8 месяцев назад
@@KamilNowinski muti-databases(one per tenant), can you please do a tutorial on this?
@KamilNowinski
@KamilNowinski 8 месяцев назад
The concept is exactly the same, but you need to repeat to against n databases: 1) build (generates DACPAC) 2) generate migration script (against target database), 3) Execute migration script 4) Repeat for next database. Did I miss something?
@SloMoShort
@SloMoShort 3 года назад
How do you perform delta changes using SSDT. Changes to the schema of tables, views etc?
@KamilNowinski
@KamilNowinski 3 года назад
Keyser, sqlpackage.exe generates delta script by comparing DACPAC file to target database. I'm explaining the process in this video - starts at 46:30
@devopsbharatiya5418
@devopsbharatiya5418 3 года назад
Also kamil how do we handle rollbacks. Is Reverting from git the only option available. Rollback scenarios might occur in real world scenarios right
@KamilNowinski
@KamilNowinski 3 года назад
Thanks for great question. Since I'm collecting all good questions in one place, I hope you don't mind - I copied the question to my publicly open GitHub discussion: github.com/NowinskiK/ssdt-training/discussions/7 It helps me building the knowledge base for the community and will allow us carrying on discussion properly and in better format/UI (YT is slightly limited to do that).
@nageshcl
@nageshcl 2 года назад
Hi Kamil, Thanks for the detailed video on sql deployment. It was really helpful. As mentioned in the video tutorial, I am using the "Azure SQL DacPacTask" task to achieve the goal. On the Deployment Package Action, I chose "Script" just to check and verify the script that is being generated. The pipeline is successful and I can see on the logs the script is generated and stored at a location "D:\a 1\a\GeneratedOutputFiles". But, i cannot Open / See the location. Probably the location belong to DevOps server? Is there a way to configure this script output location to my local machine? Basically I want to verify once the script before really publishing.
@KamilNowinski
@KamilNowinski 2 года назад
You are right. The location is on the agent that executes the task(s). You can send the generated script by email, for instance. But better idea, I guess, would be to print script's content to the agent log. I explain such scenario in my commercial course here: learn.sqlplayer.net/view/courses/database-projects-with-ssdt-dacpac/734805-module-6/2436306-report-in-release-pipeline-cd
@marklobbezoo1464
@marklobbezoo1464 Год назад
@Kamil, thanks for the video really helpful. It works fine, but when I delete a table in DEV it doesn't delete it in prod. I created in VS SSDT a publish.xml which states : True However it still doesn't drop the tables in SQL. I tried to find this .xml file in the Publish Profile in my release pipeline but I can't select it.... Anybody has a clue?
@KamilNowinski
@KamilNowinski 11 месяцев назад
Try to add your problem here: github.com/NowinskiK/ssdt-training/discussions and provide more details about your configuration and what you do.
@ramug2015
@ramug2015 2 года назад
Hi kamil , for azure devops I want deploy my SQL db by uing service principal not for server athantication
@KamilNowinski
@KamilNowinski 2 года назад
I have it on my plans! Stay tuned.
@SandeepSingh-vo3hd
@SandeepSingh-vo3hd Год назад
hi @kamil, thanks for the videos it helps us a lot but getting this error when trying to execute the release SQL72014: .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur. SQL72045: Script execution error. The executed script: RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127) WITH NOWAIT; if you reply it will be appreciated.
@KamilNowinski
@KamilNowinski Год назад
Your target table already contains some data, hence the error. Do check the publish options.
@hma262
@hma262 2 года назад
Thanks for the video! Can I connect to a database with M-FA? I can't see that option when I try it in VS. Thanks
@KamilNowinski
@KamilNowinski 2 года назад
Do you mean connect to database with AAD (Active Directory) authentication with MFA? If so, in Visual Studio it's available as "Active Directory Interactive Authentication".
@hma262
@hma262 2 года назад
@@KamilNowinski thanks sir, I didn't find it because I was using the VS from Microsoft Store. I take this opportunity to ask another question a little out of context : can we make a database with MFA switch the number of vCores automatically following a schedule? Thank you!
@STKT_VLOGS
@STKT_VLOGS Год назад
I am getting this error 2023-02-27T09:39:37.6420094Z ##[error]*** Verification of the deployment plan failed. 2023-02-27T09:39:37.6483928Z ##[error]Error SQL72031: This deployment may encounter errors during execution because changes to [***] are blocked by [db_ddladmin]'s dependency in the target database.
@KamilNowinski
@KamilNowinski Год назад
Raised the issue here: github.com/NowinskiK/ssdt-training/issues I will take a look at spare moment.
@STKT_VLOGS
@STKT_VLOGS Год назад
Hi @Kamil, How can we deploy with user permissions ?
@KamilNowinski
@KamilNowinski Год назад
github.com/NowinskiK/ssdt-training/blob/master/src/PrePostDeployment/ContosoRetailDW/Scripts/CreateUsers.sql
@STKT_VLOGS
@STKT_VLOGS Год назад
@@KamilNowinski Thank you for the update.I will try it
@devopsbharatiya5418
@devopsbharatiya5418 3 года назад
Hi Kamil, would you be able to cover pre and post deployment scenarios in a real world application wherein you would have multiple prod releases. In this case how are we gonna manage pre and post sql scripts as there would be only 1 pre and post sql file. How would we manage different releases through that file. Also i had asked a question on one of your previous videos, would you mind checking that please.
@KamilNowinski
@KamilNowinski 3 года назад
What do you exactly mean by "multiple prod releases"? If you mean "multiple databases on prod" then each database project (even in the same solution) can have its own pre and post-deployment script. Each database has to be deployed separately. One database project = one DACPAC file = one database on a physical server. Feel free to carry on the discussion here: github.com/NowinskiK/ssdt-training/discussions/8
@devopsbharatiya5418
@devopsbharatiya5418 3 года назад
@@KamilNowinski when i say multiple prod releases i am referring to multiple releases versions of the same db but on different release dates. So my question is how do we handle different prod releases for the same db for pre and post deployment script scenarios. Should we use the same pre/post deployment script for upcoming and future prod releases. If we use the same, Will the devs have to delete the entries for the upcoming prod releases in the future releases.
@KamilNowinski
@KamilNowinski 3 года назад
@@devopsbharatiya5418 , I answered on the thread above.
@stephen8086
@stephen8086 2 года назад
I can hear you
@KamilNowinski
@KamilNowinski 2 года назад
Cool. I hope the video was helpful.
@seananderson9346
@seananderson9346 2 года назад
introduction @ 6:48 "okay, so let's get started" @ 10:36
@KamilNowinski
@KamilNowinski 2 года назад
Sean, have you seen time table in the description? :)
@seananderson9346
@seananderson9346 2 года назад
@@KamilNowinski apparently not. :-)
@rtzzzzzz
@rtzzzzzz 2 года назад
1 hour wasted for telling me what others do in 10 min
@KamilNowinski
@KamilNowinski 2 года назад
That was intentional for people who are not fluent with this technology and want to learn slowly step by step.
@dariuszspiewak5624
@dariuszspiewak5624 2 года назад
Mate, not everyone is doing what you do in 10 mins. Some do it in 5 secs, so don't be cocky.
@ryanshannon6963
@ryanshannon6963 2 года назад
@@dariuszspiewak5624 if he/she/that so gangster, why did he/she/that "waste" its 1 hour rather than 10 minutes into the video? I guess it takes him/her/it 6x's as long to know something is a "waste of time"?
Далее
A couple flavors of Azure Data Factory deployments
1:07:08
Microsoft Fabric: Understanding Capacity
51:43
Просмотров 1,6 тыс.