├── .gitignore ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── graphics ├── ads_migrate_after_log_backup_details.png ├── ads_migrate_after_log_backup_details_status.png ├── ads_migrate_complete_cutover.png ├── ads_migrate_completing_cutover.png ├── ads_migrate_cutover_inprogress.png ├── ads_migrate_extension_install.png ├── ads_migrate_initiate_cutover.png ├── ads_migrate_migration_in_progress.png ├── ads_migrate_step1_add_azure.png ├── ads_migrate_step1_source_db.png ├── ads_migration_completed.png ├── ads_migration_completed_top_level.png ├── ads_migration_status.png ├── ads_migration_status_details.png ├── ads_step3_assessment_results.png ├── ads_step3_assessment_warnings.png ├── ads_step3_choose_azure_target.png ├── ads_step3_choose_azure_target2.png ├── ads_step4_migration_mode.png ├── ads_step5_choose_db_backup_location.png ├── ads_step6_dms.png ├── ads_step6_dms_shir.png ├── ads_step6_dms_shir_connected.png ├── ads_step7_summary.png ├── advanced_migration_sku_recommendation_report.png ├── azure_portal_create_vm_main.png ├── azure_portal_create_vm_management.png ├── azure_portal_create_vm_sql_settings.png ├── azure_portal_create_vm_sql_storage.png ├── azure_portal_sqlmi_database_online.png ├── azure_portal_sqlmi_database_resstoring_state.png ├── azuresql_choose_sql_edition.png ├── basic_migration_sku_recommendation_report.png ├── dma_assess_migrate_to_sqlmi.png ├── launch_azure_migrate.png ├── shir_registration.png ├── ssms_back_to_url_new_container.png ├── ssms_backup_to_url_azure_signin.png ├── ssms_backup_to_url_connect_to_azure.png ├── ssms_backup_to_url_menu.png ├── ssms_restore_backup_choose_url_device.png ├── ssms_restore_database_add_storage_container.png ├── ssms_restore_database_choose_backup_file.png ├── ssms_restore_database_menu.png ├── ssms_restore_database_progress.png ├── tpch_backup_in_azure_storage.png └── tpch_create_azure_storage.png ├── migratesqltoazureworkshop ├── 00-Prereqs │ ├── addlogin.sql │ └── readme.md ├── 02-Assess │ ├── advanced │ │ ├── assesssql2019.ps1 │ │ ├── getskurecommendationsql2019.ps1 │ │ └── readme.md │ ├── basic │ │ ├── assesssql2016.ps1 │ │ ├── getrecommendationssql2016.ps1 │ │ └── readme.md │ ├── discover │ │ └── readme.md │ └── readme.md ├── 03-MigrateToAzureVM │ ├── deploy │ │ └── readme.md │ ├── offlinemigrate │ │ └── readme.md │ └── readme.md ├── 04-OptimizeAzureVM │ ├── explore │ │ └── readme.md │ ├── powerofazure │ │ └── readme.md │ ├── readme.md │ └── verifyworkload │ │ └── readme.md ├── 05-MigrateToSQLMI │ ├── deploy │ │ └── readme.md │ ├── onlinemigrate │ │ └── readme.md │ └── readme.md ├── 06-OptimizeSQLMI │ ├── azureservices │ │ └── readme.md │ ├── bestpractices │ │ └── readme.md │ ├── explore │ │ └── readme.md │ ├── hadr │ │ └── readme.md │ ├── readme.md │ └── verifyworkload │ │ └── readme.md └── 07-MigrateVMToSQLMI │ ├── onlinemigration │ └── readme.md │ └── readme.md └── slides └── MigrateSQLServertoAzureWorkshop.pptx /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "markdownlint.config": { 3 | "MD028": false, 4 | "MD025": { 5 | "front_matter_title": "" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Migrate SQL Server to Azure Workshop (Under Construction) 2 | 3 | Welcome to the Migrate SQL Server to Azure Workshop. This is a free workshop that includes content and exercises to learn how to migrate SQL Server to SQL Server in Azure Virtual Machine and Azure SQL Managed Instance. 4 | 5 | This workshop is currently under construction. No ETA is available when it will be available for preview. The slides folder contains a preview slide deck you are free to use for getting a visual look at what will be in the workshop. 6 | 7 | The folders listed for the modules of the workshop include some instructional files along with some scripts but it is all still under constructions. 8 | 9 | This workshop is currently being designed to have the following modules: 10 | 11 | 1. Migrate SQL Server to Azure Fundamentals 12 | 2. Assess SQL Server 13 | 1. Migrate to Azure Virtual Machine 14 | 1. Optimize and manage SQL Server in Azure Virtual Machine 15 | 1. Migrate to Azure SQL Managed Instance 16 | 1. Optimize and manage Azure SQL Managed Instance 17 | 1. Migrate from Azure Virtual Machine to Managed Instance 18 | 19 | # Project 20 | 21 | > This repo has been populated by an initial template to help get you started. Please 22 | > make sure to update the content to build a great experience for community-building. 23 | 24 | As the maintainer of this project, please make a few updates: 25 | 26 | - Improving this README.MD file to provide a great experience 27 | - Updating SUPPORT.MD with content about this project's support experience 28 | - Understanding the security reporting process in SECURITY.MD 29 | - Remove this section from the README 30 | 31 | ## Contributing 32 | 33 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 34 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 35 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 36 | 37 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 38 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 39 | provided by the bot. You will only need to do this once across all repos using our CLA. 40 | 41 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 42 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 43 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 44 | 45 | ## Trademarks 46 | 47 | This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft 48 | trademarks or logos is subject to and must follow 49 | [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). 50 | Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. 51 | Any use of third-party trademarks or logos are subject to those third-party's policies. 52 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). 40 | 41 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # TODO: The maintainer of this repo has not yet edited this file 2 | 3 | **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? 4 | 5 | - **No CSS support:** Fill out this template with information about how to file issues and get help. 6 | - **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). 7 | - **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. 8 | 9 | *Then remove this first heading from this SUPPORT.MD file before publishing your repo.* 10 | 11 | # Support 12 | 13 | ## How to file issues and get help 14 | 15 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 16 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 17 | feature request as a new Issue. 18 | 19 | For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE 20 | FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER 21 | CHANNEL. WHERE WILL YOU HELP PEOPLE?**. 22 | 23 | ## Microsoft Support Policy 24 | 25 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 26 | -------------------------------------------------------------------------------- /graphics/ads_migrate_after_log_backup_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_after_log_backup_details.png -------------------------------------------------------------------------------- /graphics/ads_migrate_after_log_backup_details_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_after_log_backup_details_status.png -------------------------------------------------------------------------------- /graphics/ads_migrate_complete_cutover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_complete_cutover.png -------------------------------------------------------------------------------- /graphics/ads_migrate_completing_cutover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_completing_cutover.png -------------------------------------------------------------------------------- /graphics/ads_migrate_cutover_inprogress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_cutover_inprogress.png -------------------------------------------------------------------------------- /graphics/ads_migrate_extension_install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_extension_install.png -------------------------------------------------------------------------------- /graphics/ads_migrate_initiate_cutover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_initiate_cutover.png -------------------------------------------------------------------------------- /graphics/ads_migrate_migration_in_progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_migration_in_progress.png -------------------------------------------------------------------------------- /graphics/ads_migrate_step1_add_azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_step1_add_azure.png -------------------------------------------------------------------------------- /graphics/ads_migrate_step1_source_db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migrate_step1_source_db.png -------------------------------------------------------------------------------- /graphics/ads_migration_completed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migration_completed.png -------------------------------------------------------------------------------- /graphics/ads_migration_completed_top_level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migration_completed_top_level.png -------------------------------------------------------------------------------- /graphics/ads_migration_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migration_status.png -------------------------------------------------------------------------------- /graphics/ads_migration_status_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_migration_status_details.png -------------------------------------------------------------------------------- /graphics/ads_step3_assessment_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step3_assessment_results.png -------------------------------------------------------------------------------- /graphics/ads_step3_assessment_warnings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step3_assessment_warnings.png -------------------------------------------------------------------------------- /graphics/ads_step3_choose_azure_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step3_choose_azure_target.png -------------------------------------------------------------------------------- /graphics/ads_step3_choose_azure_target2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step3_choose_azure_target2.png -------------------------------------------------------------------------------- /graphics/ads_step4_migration_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step4_migration_mode.png -------------------------------------------------------------------------------- /graphics/ads_step5_choose_db_backup_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step5_choose_db_backup_location.png -------------------------------------------------------------------------------- /graphics/ads_step6_dms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step6_dms.png -------------------------------------------------------------------------------- /graphics/ads_step6_dms_shir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step6_dms_shir.png -------------------------------------------------------------------------------- /graphics/ads_step6_dms_shir_connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step6_dms_shir_connected.png -------------------------------------------------------------------------------- /graphics/ads_step7_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ads_step7_summary.png -------------------------------------------------------------------------------- /graphics/advanced_migration_sku_recommendation_report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/advanced_migration_sku_recommendation_report.png -------------------------------------------------------------------------------- /graphics/azure_portal_create_vm_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/azure_portal_create_vm_main.png -------------------------------------------------------------------------------- /graphics/azure_portal_create_vm_management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/azure_portal_create_vm_management.png -------------------------------------------------------------------------------- /graphics/azure_portal_create_vm_sql_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/azure_portal_create_vm_sql_settings.png -------------------------------------------------------------------------------- /graphics/azure_portal_create_vm_sql_storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/azure_portal_create_vm_sql_storage.png -------------------------------------------------------------------------------- /graphics/azure_portal_sqlmi_database_online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/azure_portal_sqlmi_database_online.png -------------------------------------------------------------------------------- /graphics/azure_portal_sqlmi_database_resstoring_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/azure_portal_sqlmi_database_resstoring_state.png -------------------------------------------------------------------------------- /graphics/azuresql_choose_sql_edition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/azuresql_choose_sql_edition.png -------------------------------------------------------------------------------- /graphics/basic_migration_sku_recommendation_report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/basic_migration_sku_recommendation_report.png -------------------------------------------------------------------------------- /graphics/dma_assess_migrate_to_sqlmi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/dma_assess_migrate_to_sqlmi.png -------------------------------------------------------------------------------- /graphics/launch_azure_migrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/launch_azure_migrate.png -------------------------------------------------------------------------------- /graphics/shir_registration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/shir_registration.png -------------------------------------------------------------------------------- /graphics/ssms_back_to_url_new_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_back_to_url_new_container.png -------------------------------------------------------------------------------- /graphics/ssms_backup_to_url_azure_signin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_backup_to_url_azure_signin.png -------------------------------------------------------------------------------- /graphics/ssms_backup_to_url_connect_to_azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_backup_to_url_connect_to_azure.png -------------------------------------------------------------------------------- /graphics/ssms_backup_to_url_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_backup_to_url_menu.png -------------------------------------------------------------------------------- /graphics/ssms_restore_backup_choose_url_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_restore_backup_choose_url_device.png -------------------------------------------------------------------------------- /graphics/ssms_restore_database_add_storage_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_restore_database_add_storage_container.png -------------------------------------------------------------------------------- /graphics/ssms_restore_database_choose_backup_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_restore_database_choose_backup_file.png -------------------------------------------------------------------------------- /graphics/ssms_restore_database_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_restore_database_menu.png -------------------------------------------------------------------------------- /graphics/ssms_restore_database_progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/ssms_restore_database_progress.png -------------------------------------------------------------------------------- /graphics/tpch_backup_in_azure_storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/tpch_backup_in_azure_storage.png -------------------------------------------------------------------------------- /graphics/tpch_create_azure_storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/graphics/tpch_create_azure_storage.png -------------------------------------------------------------------------------- /migratesqltoazureworkshop/00-Prereqs/addlogin.sql: -------------------------------------------------------------------------------- 1 | DROP LOGIN sqladmin; 2 | GO 3 | CREATE LOGIN sqladmin WITH PASSWORD = 'ComplexPassw0rd#'; 4 | GO 5 | EXEC sp_addsrvrolemember @loginame = 'sqladmin', @rolename = 'sysadmin'; 6 | GO -------------------------------------------------------------------------------- /migratesqltoazureworkshop/00-Prereqs/readme.md: -------------------------------------------------------------------------------- 1 | # Prereqs for Migrate SQL Server to Azure Workshop 2 | 3 | ## Basic migration scenario - SQL Server 2016 4 | 5 | 1. Deploy a VM with Windows Server 2016 Datacenter and SQL Server 2016 SP2 6 | 7 | - I used Azure to simulate an on-premises VM 8 | - 16 VCPUs with 64Gb ram (In Azure this is Standard D16as_v4) 9 | - OS disk 127Gb 10 | - Data drive is 2TB for data, log 11 | - Tempdb is on the OS drive 12 | - Backup drive is 500Gb 13 | - Install latest SSMS 14 | - Install latest DMA version 15 | - Put this folder in the system path 16 | - C:\Program Files\Microsoft Data Migration Assistant\SqlAssessmentConsole 17 | 18 | - Deploy HammerDB for Windows from https://github.com/TPC-Council/HammerDB/releases/download/v4.2/HammerDB-4.2-Win-x64-Setup.exe 19 | - Enabled locked pages in memory and IFI 20 | - Create a SQL Server login called sqladmin (complex password of your choice) and make it a member of the sysadmin system role. 21 | - Get an account with an Azure subscription. Being a member of the Contributor role will give you the necessary permissions to complete the exercises. 22 | 23 | 2. Use HammerDB to deploy a 10 scale db for TPC-H 24 | 25 | This can take a few hours to build the db. Because the log can grow fairly large when you use the tool to build the db, I recommend you shrink the database after the build completes. I then went back and modified the log size to 1Gb. Database should be around 50Gb. 26 | 27 | 4. Setup SQL Agent jobs to maintain stats and manage backups. These are based on maintenance plans. To simplify the example I created three maintenance plans all setup for on-demand (normally they would be scheduled) 28 | 29 | a. One executes a full backup to backup drive 30 | b. The 2nd one goes a log backup to backup drive 31 | c. The 3rd update stats (fullscan) on all tables 32 | 33 | ## Advanced migration scenario SQL Server 2019 34 | 35 | Install SQL Server 2019 Enterprise Edition 36 | Joined to Windows domain 37 | Deploy a failover cluster with 2 nodes. 38 | SQL installed on both nodes and a SQL failover cluster installed 39 | 40 | enable ifi and locked pages 41 | 42 | HammerDB to create TPCC 43 | I used 500 warehouses with 16 virtual users to build the db. I first created a database called tpcc with 50Gb data and 12gb log that is empty before I built the db with HammerDB 44 | Ran DBCC SHIRNKDATABASE which put the tlog back to 10Gb 45 | 46 | Create an availability group with the tpcc database in it. Setup the 2nd node as a sync secondary replica. 47 | 48 | TSQL Agent job to reorg all indexes of db 49 | 50 | Full db backup SQL Agent job to a separate storage drive run weekly 51 | Log backup SQL Agent job to a separate storage drive to run every 30 mins 52 | 53 | XEvent trace to a file target on data drive run on-demand to perform 54 | "profile" queries 55 | 56 | SSMS used to run Query Store reports. 57 | 58 | Live profiling used 59 | 60 | dbcompat 150 -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/advanced/assesssql2019.ps1: -------------------------------------------------------------------------------- 1 | SqlAssessment.exe PerfDataCollection --sqlConnectionStrings "Data Source=.;Initial Catalog=master;Integrated Security=True;" --outputFolder c:\migrate --perfQueryIntervalInSec 5 --numberOfIterations 24 -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/advanced/getskurecommendationsql2019.ps1: -------------------------------------------------------------------------------- 1 | SqlAssessment.exe GetSkuRecommendation --targetPlatform AzureSqlManagedInstance --outputFolder c:\migrate --scalingFactor 200 -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/advanced/readme.md: -------------------------------------------------------------------------------- 1 | # Discover and Assess SQL Server 2 | 3 | All prereqs must be complete 4 | 5 | 1. Assess aspects of the current SQL Server 2019 installation: 6 | 7 | - Show number of cores through Task Manager 8 | - Show in SSMS the size of the database and transaction log for the tpch database and that they are on different drives 9 | - Show tempdb is on a separate drive with 12 files 10 | - Show @@VERSION including edition 11 | - Show windows login from the domain 12 | - Show SQL Agent jobs to backup db, log, reorg indexes, and run CHECKDB in the form of maintenance plans 13 | - Show maxdop is set 1 14 | - Show there is an extended event session with a file target 15 | - Show there is a separate drive for backups 16 | - Show the database is part of an Always On Availability Group 17 | 18 | ## Assessing a more complex migration for SQL Server 2019 19 | 20 | 1. Run DMA to assess your SQL Server to migrate for Azure SQL Managed Instance 21 | 22 | Create an assessment project for a target of Azure SQL Managed Instance 23 | 24 | The assessment doesn't find any issues with database compatibility. It does find an issue for feature parity because I'm using trace flags 1117 and 1118. Azure SQL Managed Instance doesn't support these two trace flags. Fortunately these trace flags are holdovers from older versions of SQL Server are not needed any further. They were probably turned on for tempdb but the functionality for these trace flags are enabled by default for tempdb in Azure SQL Managed Instance (and have been since SQL Server 2016). 25 | 26 | You can read more details on the rules DMA uses for assessments for migrations to Azure SQL Managed Instance at: https://docs.microsoft.com/en-us/azure/azure-sql/migration-guides/managed-instance/sql-server-to-sql-managed-instance-assessment-rules 27 | 28 | 2. To perform a SKU assessment run the workload using HammerDB with TPCC 29 | 30 | 32 virtual users. Timed test for 2 minutes no ramp up. The average TPS was between 300-400K 31 | 32 | 3. Run the SKU assessment tool using the script **assesssql2019.ps1** which runs the following command: 33 | 34 | `SqlAssessment.exe PerfDataCollection --sqlConnectionStrings "Data Source=.;Initial Catalog=master;Integrated Security=True;" --outputFolder c:\migrate --perfQueryIntervalInSec 5 --numberOfIterations 24` 35 | 36 | Normally you would let the tool run longer to asses your workload but for purposes of this exercise I will only run the workload for a few minutes. The perfQueryIntervalInSec indicates how often performance information will be collected. The numberOfIterations determine how many iterations before performance data is persisted. So after 120 seconds, performance data is persisted to be used for the assessment. 37 | 38 | 4. Look at the disk seconds/transfer on the drive with the tlog. Notice this a very low ms latency which matches our requirements for a low-latency OLTP application. 39 | 40 | 5. Show Task Manager and Performance Dashboard reports for core usage. 41 | 42 | 6. When all users for HammerDB are done (about 2mins), hit enter in the powershell window to finish the collection. 43 | 44 | 7. Now Run SQL Assessment to get sku recommendations from the script **getrecommendationssql2019.ps1** which runs the following command: 45 | 46 | `SqlAssessment.exe GetSkuRecommendation --targetPlatform AzureSqlManagedInstance --outputFolder c:\migrate --scalingFactor 200` 47 | 48 | We know we want the assessment to target SQL Server in Azure SQL Managed Instance which matches the targetPlatform parameter. We also use the scalingFactor parameter which tells the tool to "scale up" the recommendation because we know the workload test isn't completely representative of the required vCores. In this advanced scenario we know the HammerDB workload for 2 minutes doesn't fully represent the needed resources of the application. 49 | 50 | 7. The results will be displayed in the console but also available in an HTML file in the same directory where you ran the migration (in this case c:\migrate). The name of the HTML file is SkuRecommendationReport.html 51 | 52 | The results for this execution should look similar to the following 53 | 54 | :::image type="content" source="../../../graphics/advanced_migration_sku_recommendation_report.png" alt-text="advanced_migration_sku_recommendation_report"::: 55 | 56 | The report recommends a Service Tier of General Purpose but that may not line up with requirements of the Advanced migration scenario. This is due to the following reasons: 57 | 58 | - The tool currently doesn't look at HA requirements such as the existence of an Always On Availability Group 59 | - The tool currently doesn't offer a way to look at low latency transaction log requirements which is part of this workload. 60 | 61 | Because of these requirements our plan will be to use the Business Critical Service Tier. The compute size seems accurate based on our workload and scaling factor. The Storage Size is not accurate because it only accounts for the size of the current workload sample database. Our requirements call for larger sizes so we will use those when deploying the Azure SQL Managed Instance. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/basic/assesssql2016.ps1: -------------------------------------------------------------------------------- 1 | SqlAssessment.exe PerfDataCollection --sqlConnectionStrings "Data Source=.;Initial Catalog=master;Integrated Security=True;" --outputFolder c:\migrate --perfQueryIntervalInSec 5 --numberOfIterations 24 -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/basic/getrecommendationssql2016.ps1: -------------------------------------------------------------------------------- 1 | SqlAssessment.exe GetSkuRecommendation --targetPlatform AzureSqlVirtualMachine --outputFolder c:\migrate -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/basic/readme.md: -------------------------------------------------------------------------------- 1 | # Discover and Assess SQL Server 2 | 3 | All prereqs must be complete 4 | 5 | ## Assessing a basic migration for SQL Server 2016 6 | 7 | 1. Assess aspects of the current SQL Server 2016 installation: 8 | 9 | - Show number of cores through Task Manager 10 | - Show in SSMS the size of the database and transaction log for the tpch database and that they are on the same drive. 11 | - Show tempdb on the same drive as data and log 12 | - Show @@VERSION including edition 13 | - Show the SQL login sqladmin 14 | - Show SQL Agent jobs to backup db, log, and update stats in the form of maintenance plans 15 | 16 | 2. Since this is a lift and shift to Azure VM there is no reason to run DMA to assess for any compat issues. But we can use DMA to assess a workload and configuration to get recommendations on the right VM size and storage. 17 | 18 | 3. Run HammerDB with 16 virtual users. Leave all other defaults. Turn on Transactions and you will see the test takes about mins with an avg of 10000 QpH. 19 | 20 | You can read more about using this assessment tool at https://docs.microsoft.com/en-us/sql/dma/dma-sku-recommend-sql-db?view=sql-server-ver15 21 | 22 | 4. In a new powershell command window run **assesssql2016.ps1** which runs these commands: 23 | 24 | `SqlAssessment.exe PerfDataCollection --sqlConnectionStrings "Data Source=.;Initial Catalog=master;Integrated Security=True;" --outputFolder c:\migrate --perfQueryIntervalInSec 5 --numberOfIterations 24` 25 | 26 | Normally you would let the tool run longer to asses your workload but for purposes of this exercise I will only run the workload for a few minutes. The perfQueryIntervalInSec indicates how often performance information will be collected. The numberOfIterations determine how many iterations before performance data is persisted. So after 120 seconds, performance data is persisted to be used for the assessment. 27 | 28 | 5. Check Task Manager and Performance Dashboard for core usage 29 | 30 | 6. When all users for HammerDB are done (about 2mins), hit enter in the powershell window to finish the collection. 31 | 32 | 5. Now Run SQL Assessment to get sku recommendations from the script **getrecommendationssql2016.ps1** which runs the following command: 33 | 34 | `SqlAssessment.exe GetSkuRecommendation --targetPlatform AzureSqlVirtualMachine --outputFolder c:\migrate` 35 | 36 | We know we want the assessment to target SQL Server in Azure Virtual Machine which matches the targetPlatform parameter. 37 | 38 | 7. The results will be displayed in the console but also available in an HTML file in the same directory where you ran the migration (in this case c:\migrate). The name of the HTML file is SkuRecommendationReport.html 39 | 40 | The results for this execution should look similar to the following 41 | 42 | :::image type="content" source="../../../graphics/basic_migration_sku_recommendation_report.png" alt-text="basic_migration_sku_recommendation_report"::: 43 | 44 | The report shows Compute Sizing as the VM size choice based on a minimum recommended 1:8 core/memory ratio. Storage sizing shows how to configure Azure Premium Storage for data, log, and tempdb. The Justification and Requirements View buttons give more details on the recommendations. 45 | 46 | The Requirements detail give information about how large Azure storage is needed for data and log but it doesn't accurately reflect our requirements which are larger than the workload sample db size. 47 | 48 | In this case the SKU tool recommended a Standard_E16as_v4 which falls in line with our recommendations of using the E series. One of the sizes we typically recommend because of its better I/O performance and local storage is the Standard_E16ds_v4 VM sizes. We have recently released E5 series of VMs so our tools will be updated to reflect recommending these new sizes. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/discover/readme.md: -------------------------------------------------------------------------------- 1 | # Discover SQL Server 2 | 3 | If you know exactly where your SQL Server is located to migrate there is not discovery step. However, some customers need to discover and assess many SQL Server installations to migrate to Azure at scale. Azure Migrate provides new capabilities to help achieve this. 4 | 5 | ## Using Azure Migrate to discover SQL Server 6 | 7 | Today Azure Migrate includes an appliance in Public Preview to discover and assess a large number of SQL Server installations for VMWare. 8 | 9 | The exercises to show this capability is not available at this time. 10 | 11 | For a demonstration of this capability please see this video at 12 | 13 | https://docs.microsoft.com/en-us/events/ignite-mar-2021/azure/featured-sessions/fs177/ 14 | 15 | Starting at about minute 28. 16 | -------------------------------------------------------------------------------- /migratesqltoazureworkshop/02-Assess/readme.md: -------------------------------------------------------------------------------- 1 | # Discover and Assess SQL Server for migration to Azure 2 | 3 | In this module you will perform exercises to discover and assess SQL Server installations for migration to Azure. 4 | 5 | ## Discover 6 | 7 | In this exercise you will learn how to use Azure Migrate to discover SQL Server installations and get fundamental assessments for migration. 8 | 9 | ## Basic Migration 10 | 11 | In this exercise you will assess a basic SQL Server 2016 installation for migration. The requirements for this migration are listed in Module 1 of this workshop. 12 | 13 | You will analyze the SQL Server 2016 installation per the requirements. 14 | 15 | You will then use the DMA SKU Assessment tool while running your workload to determine the target Azure environment and deployment resource requirements. 16 | 17 | ## Advanced Migration 18 | 19 | In this exercise you will assess an advanced SQL Server 2019 installation for migration. The requirements for this migration are listed in Module 1 of this workshop. 20 | 21 | You will analyze the SQL Server 2019 installation per the requirements. 22 | 23 | You will then use the DMA SKU Assessment tool while running your workload to determine the target Azure environment and deployment resource requirements. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/03-MigrateToAzureVM/deploy/readme.md: -------------------------------------------------------------------------------- 1 | # Deploy the target Azure Virtual Machine for migration 2 | 3 | In this exercise you will deploy an Azure Virtual Machine that comes with SQL Server from the Azure Marketplace. You will then perform some basic verification of the deployment. 4 | 5 | ## Deploy the target Azure VM 6 | 7 | Note: The instructor may have the VM already deployed since it can take 10 minutes or longer to deploy the VM 8 | 9 | 1. Use the marketplace to deploy the SQL Server in Azure Virtual Machine with SQL Server 2016 Standard Edition with Windows Server 2016 using the size of Standard E16as_v4 and other requirements from the assessment in Module 2 10 | 11 | 2. Main deploy blade choices 12 | 13 | - Use a new RG called tpchrg 14 | - Pick a VM name. It can be the same name as your current server or another one. This becomes the computer name of the Windows Server and @@SERVERNAME. 15 | - Choose a region closest to your on-premises deployment. 16 | - No infrastructure because we are not going to setup HA for this VM (like clustering or AGs) 17 | - Image preselected since we chose this in the previous screen. BUG FIX: Change this to choose Engine only option. 18 | - Don't pick Spot Instance 19 | - For size, we should choose the size recommended during Assessment which is E16as_v4 - 16 Available vCPU. Note the cost is ~1200/month. 20 | - Fill out an admin. This will be a local Windows admin account for the VM and will be auto added as a sysadmin to SQL Server. 21 | - Leave the RDP port public (we will secure the VM in the next module) 22 | - Note the option for Licensing for AHB. Since you already have a license for Windows Server for your VM and are migrating you can select this. Notice in the portal option for Size the price changed to ~$700/month) 23 | - Select Next:Disks at the bottom of the screen 24 | 25 | 3. VM Disks and Networking 26 | 27 | - Leave the defaults and select Networking 28 | 29 | - Leave all the defaults for this screen. Notice a new virtual network will be created as part of creating the VM. If you had an existing vnet in Azure and wanted to include this VM in that vnet you could specify that here. 30 | 31 | 4. VM Management and Advanced 32 | 33 | - Select Next: Management 34 | - Leave all the defaults but talk about some options here 35 | - Select Next: Advanced 36 | - Leave the defaults 37 | 38 | 5. SQL Server settings 39 | 40 | - Select Next: SQL Server settings 41 | - Leave security and Networking along. Talk about enabling mixed mode auth in tbe next module. 42 | - For storage, select Change configuration 43 | - Getting storage as the best as possible will save you time later. This is where we will do some optimization while migrating 44 | - Using Data Warehousing option will separate data and log, put tempdb on separate local storage, and enable trace flag 610 to help optimize any bulk loading operations. 45 | - Even though we had a 4TB drive, after examining the size of db and log, anticipated growth, and the fact that we separate drives now, we can provision a 2TB drive for data and 1TB for log. 46 | - If these sizes later are not correct, you can always expand with no migration. Or you can reduce the size by creating new azure disks and moving the database files over to the new disk. 47 | - SQL Server license 48 | - Leave this alone for now. We will talk more in the optimizing module about it and how it can save you money 49 | - Leave automated patching enabled which is for SQL Server security updates. 50 | - Leave Automated backup and R Services disabled. We will talk about Automated backups in the next module. 51 | 52 | 6. Tags, Review, and Create 53 | 54 | - Mention Tags but don't use them. 55 | - Select Review+Create. A final validation of your options is then executed. If that passes you will get a screen where you can select Create to start a deployment of the VM. 56 | - The deployment time can vary but usually 10-15 minutes. 57 | 58 | ## Verify deployment 59 | 60 | 1. Show the main properties after the VM is deployed (or with the one already deployed) 61 | 62 | - Show other resources that are created with the VM including the virtual network and storage 63 | - Show the Export Template under automation as a way to use Azure templates to automate the building of another VM just like this one. 64 | - We will explore later more options including setting SQL Server options 65 | 66 | **Tip**: If you want to communicate with this VM using its private IP create your resource inside the same virtual network. 67 | 68 | 2. After deployment, use RDP to verify the deployment 69 | 70 | - Check SSMS is installed and connect locally to the instance 71 | - Check disk drives are setup as deployed from the portal 72 | - Check SQL 2016 SP2 is installed SP2 CU17 is actually installed which is the latest CU that includes all security updates. By the time you use this workshop it could be SP3 (which was just released in sept 2021) 73 | - Check trace flag 610 is set 74 | - Apply latest windows updates. They may require a VM restart -------------------------------------------------------------------------------- /migratesqltoazureworkshop/03-MigrateToAzureVM/offlinemigrate/readme.md: -------------------------------------------------------------------------------- 1 | # Offline migration of SQL Server to Azure Virtual Machine 2 | 3 | In this exercise you will perform an offline migration of SQL Server to Azure Virtual Machine. 4 | 5 | - You will backup your database from the source SQL Server to Azure Blob Storage 6 | - You will then connect to the new deployed Azure Virtual Machine and restore that backup from the same Azure Blob Storage container. 7 | - You will migrate any other objects such as logins or SQL Agent jobs. 8 | 9 | ## Backup the SQL Server 2016 database to Azure Storage 10 | 11 | 1. Login in to your VM with SQL Server 2016 12 | 13 | 2. Setup a backup location in Azure 14 | 15 | - Create an Azure storage account 16 | - Using the Azure portal Create a new resource. 17 | - Choose Storage account 18 | - Choose your subscription 19 | - Create a new resource group if you have not done so. You will use this again when creating the target VM to migrate to 20 | - Choose a storage account name 21 | - Pick an appropriate region where you have access rights and quota 22 | - Choose Standard storage. Standard storage is required for SQL backup to URL 23 | - Choose the redundancy option based on your compliant needs. Most customers can choose geo-redundant. 24 | - Select Review+Create and then Create 25 | - Your storage account is complete when the portal screen says "Your deployment is complete" 26 | - Go to the storage account and create a new Container called sqlbackups. You can leave public access level to private. 27 | 28 | 3. Use the SSMS wizard to backup a full db to Azure storage 29 | 30 | - Right-click the tpch database and select Backup as a task. 31 | 32 | - Select Destination as URL and select Add. Then select New to choose a new container as the destination. 33 | 34 | - Select Sign-in to sign into your Azure account. Your account may require additional authentication methods to sign-in. 35 | 36 | - Click on the Create button to create a SAS key which gives SQL Server permissions to access the Azure Storage account container. The SAS key is specific to the container not the entire storage account. 37 | 38 | - After the "connect to Azure" dialog box. the Azure storage container will be filled in with a proposed backup file name based on the current date and time. Select OK. 39 | 40 | - You are now back to the main Backup Up Database screen where the URL filename is filled in. Select OK to backup the database. The Progress of the backup is displayed in the lower left hand side of the screen. It should take around 10mins or so to backup the db to Azure. 41 | 42 | 4. Verify the backup file is in Azure storage using the portal. 43 | 44 | Using the Azure portal you can look at your sqlbackups container and verify the backup file exists. 45 | 46 | ## Restore the database from Azure Storage 47 | 48 | 1. Using our *optimize while migrating* strategy let's enable Instant File Initialization with local policies and restart SQL Server. 49 | 50 | 2. Disconnect from SSMS and log in with the sqladmin account 51 | 52 | 3. Use SSMS to restore the db from Azure Storage. 53 | 54 | Select Restore Database from SSMS Object Explorer 55 | 56 | b. Choose the database backup file from Azure Storage via URL 57 | 58 | c. Click Add to be able to select the Azure Storage container location and file 59 | 60 | d. Connect to your Azure subscription and select the storage account and container. 61 | 62 | Sign-in to your Azure subscription. Your organization may have certain requirements to sign-in like MFA. 63 | 64 | Choose the storage account you used to backup the database from your source VM and the container. Choose Create for a SAS key to be used to access the backup file. Then click OK. 65 | 66 | You can then click OK on the dialog box titles Select a Backup location at the storage container and key are now filled in 67 | 68 | e. Choose the backup file 69 | 70 | You will now be put into an "explorer" experience to choose your backup file. Select Containers and your container name. Your backup file should be listed in the right-hand pane. 71 | 72 | Select it and click OK. 73 | 74 | f. Your backup file will be filled in for the Backup media on the screen Select backup device. Click OK. 75 | 76 | g. Your backup details are now filled in on the Restore Database screen. Click OK to restore the backup. 77 | 78 | You should see a progress bar and % at the top of the screen. 79 | 80 | Use ssms_restore_database_progress.png as the image 81 | 82 | When done you will see a dialog box that says Database 'tpch' restored successfully. Click OK. 83 | 84 | 4. Verify the database has been restored 85 | 86 | There are many ways to do this. Two quick things to check 87 | 88 | The size of the files. 89 | 90 | F:\data\tpch.mdf should be around 17,272,832 kb 91 | G:\log\tpch_log.ldf should be around 1,024,000 kb 92 | 93 | 5. SSMS Object Explorer should have customer, lineitem, nation, orders, part, partsupp, region, and supplier tables. 94 | 95 | ## Migrate other objects 96 | 97 | ### Generate scripts 98 | 99 | 1. Generate script for SQL login 100 | 101 | You should already have the script to recreate the SQL login from the pre-reqs 102 | 103 | 2. Save these files on your local drive and "copy and paste" them into the c:\scripts folder of the new VM. 104 | 105 | ### Migrate SQL logins 106 | 107 | 1. Use SSMS to allow mixed mode auth and restart SQL Server 108 | 109 | 2. connect to SSMS with Windows auth 110 | 111 | 3. Execute the sql login script 112 | 113 | ### Add SQL Agent job for automatic backups 114 | 115 | We will use SQL IaaS ext for auto backups in the next module so you don't need to export those backup jobs. 116 | 117 | ### Add SQL Agent job for auto update stats 118 | 119 | This is a full SQL Server so you can either recreate your new maintenance plan to update stats or script out from the source SQL Server and apply it. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/03-MigrateToAzureVM/readme.md: -------------------------------------------------------------------------------- 1 | # Migrate SQL Server to Azure Virtual Machine 2 | 3 | Because of app compat issues we must use SQL Server 2016 but want to move to Azure. So we will deploy a lift and shift method to move to a SQL Server 2016 instance deployed in Azure Virtual Machine. 4 | 5 | Since our business allows some down time we will migrate "offline" to Azure by taking a full backup of the SQL Server 2016 user database and restore it in Azure Virtual Machine. 6 | 7 | However, we also need to migrate SQL Server instance objects including the SQL Server agent jobs in the prereqs and the SQL Server admin login called sqladmin. 8 | 9 | DBA need access to ERRORLOGs which works in the VM just like SQL Server. 10 | 11 | Once the migration is complete, in the next module we will optimize and manage the SQL Server 2016 deployment. 12 | 13 | In this module you will do the following: 14 | 15 | ## Deploy an Azure Virtual Machine 16 | 17 | Follow the readme.md instructions in the **deploy** folder. 18 | 19 | ## Perform an offline migration of SQL Server to Azure Virtual Machine 20 | 21 | Follow the readme.me instructions in the **offlinemigrate** folder 22 | -------------------------------------------------------------------------------- /migratesqltoazureworkshop/04-OptimizeAzureVM/explore/readme.md: -------------------------------------------------------------------------------- 1 | # Explore Azure Virtual Machine and the SQL IaaS Agent extension 2 | 3 | 1. Show the SQL Virtual Machine in the portal and show the main page and then configure, patching, and backups. 4 | 5 | 2. Show automatic updates 6 | 7 | 3. Show automatic backups. Use the predefined same storage as where did the migrate backup but use a different container called backupcontainer. 8 | 9 | 4. Use Azure Hybrid Benefit option 10 | 11 | 5. Go into the pricing calculator to show the difference it will save in this situation. 12 | 13 | https://azure.microsoft.com/en-us/pricing/calculator/ -------------------------------------------------------------------------------- /migratesqltoazureworkshop/04-OptimizeAzureVM/powerofazure/readme.md: -------------------------------------------------------------------------------- 1 | # Use of the power of Azure 2 | 3 | 1. Go to tpchsql2016 VM from the SQL Virtual Machine portal with Microsoft Defender for Cloud. Browse through the recommendations. Show the overall Defender in the portal using the link at the top of the page 4 | 5 | 2. Show basics of Azure Monitor 6 | 7 | 3. Use SQL Assessments from the SQL Virtual Machine configuration. Talk about how to run and schedule it. View the assessment results -------------------------------------------------------------------------------- /migratesqltoazureworkshop/04-OptimizeAzureVM/readme.md: -------------------------------------------------------------------------------- 1 | # Optimize and manage SQL Server in Azure Virtual Machine 2 | 3 | This module includes exercises to explore Azure, use the SQL Agent IaaS Agent extension, explore how to execute backups for SQL Server databases, verify workload execution after migration, and use the power of Azure with services like Microsoft Defender for SQL. 4 | 5 | ## Explore Azure Virtual Machine and the SQL IaaS Agent extension 6 | 7 | Follow the readme.md file in the **explore** folder 8 | 9 | ## Backups for SQL Server in Azure Virtual Machine 10 | 11 | Follow the readme.md file in the **backups** folder 12 | 13 | ## Verify workload 14 | 15 | Follow the readme.md file in the **verifyworkload** folder 16 | 17 | ## Use the power of Azure 18 | 19 | Follow the readme.md file in the **powerofazure** folder -------------------------------------------------------------------------------- /migratesqltoazureworkshop/04-OptimizeAzureVM/verifyworkload/readme.md: -------------------------------------------------------------------------------- 1 | # Verify workload after migration 2 | 3 | 1. Bring up Task Manager to monitor the workload. Note more memory if we need to scale further. 4 | 5 | 2. Run HammerDB TPC-H and look at the results. Should be similar or better than before. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/05-MigrateToSQLMI/deploy/readme.md: -------------------------------------------------------------------------------- 1 | # Deploy an Azure SQL Managed Instance 2 | 3 | In this exercise you will learn how to deploy an Azure SQL Managed Instance using the requirements as found in Module 2 from the assessment of the advanced migration scenario. 4 | 5 | 1. Use Azure marketplace to deploy an Azure SQL Managed Instance in the same RG as the one I've already deployed. Use tpccsqlmiprod as the one I've deployed 6 | 7 | 2. Go through all the options including showing the new Premium series 8 | 9 | Show how an azure template could be generated for these options 10 | 11 | 3. Use the original source SQL Server, tpccsql2019-0, and connect to the Azure SQL MI from SSMS side by side of the original SQL Server 2019 instance. Show @@VERSION and few basics to see it has been deployed correctly. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/05-MigrateToSQLMI/onlinemigrate/readme.md: -------------------------------------------------------------------------------- 1 | # Online migration to Azure SQL Managed Instance 2 | 3 | ## Migrate the database online with Azure Data Studio 4 | 5 | 2. Backup your db on the source SQL Server 6 | 7 | Setup a locally shared folder 8 | Execute a full db backup 9 | You MUST use the WITH CHECKSUM option 10 | Make sure the MSSQLSERVER service has read/write access to the share 11 | 12 | BACKUP DATABASE tpcc TO DISK = 'c:\sqlbackups\tpcc.bak' WITH INIT, CHECKSUM; 13 | GO 14 | 15 | 3. Verify you can connect to SQLMI with SSMS on your source machine 16 | 17 | Setup SSMS to connect to SQLMI 18 | Use either vnet or public endpoint 19 | 20 | 4. Create an Azure storage account for online backups 21 | 22 | I created an azure storage account in the same RG as my azure sql mi 23 | 24 | 2. Migrate online with ADS 25 | 26 | a. Deploy ADS on the source SQL Server 27 | b. Install the Azure SQL migration extension 28 | c. Connect to the source SQL server and select Migrate to Azure SQL 29 | d. Go through the screens to setup and access the full backup 30 | 31 | shir has to be installed as part of this 32 | Also if you use a domain account you must connect to the local server with the server name and not . 33 | 34 | If this fails for any reason and you need to clear the status you must delete local files at c:\users\\appdata\roaming\azuredatastudio. 35 | 36 | 3. Backup the transaction log on the source SQL Server 37 | 38 | BACKUP LOG tpcc TO DISK = 'c:\sqlbackups\tpcc_log.bak' WITH INIT, CHECKSUM; 39 | GO 40 | 41 | 4. Monitor the log backup was restored and applied 42 | 43 | Our services poll for backups so there can be a delay of a few minutes to see the log appear as restoring. 44 | 45 | Look at the portal and the Migrate extension 46 | 47 | 5. See the db is restoring from SSMS 48 | 49 | ## Perform cutover to Managed Instance 50 | 51 | 1. Use extension to do a cutover 52 | 53 | 2. Backup tail of the log 54 | 55 | BACKUP LOG tpcc TO DISK = 'c:\sqlbackups\tpcc_tail_log.bak' WITH INIT, CHECKSUM; 56 | GO 57 | 58 | 3. Perform cutover 59 | 60 | 4. Mpnitor cutover sucessful 61 | 62 | 5. Use SSMS to monitor db now online 63 | 64 | ## Migrate other objects 65 | 66 | 1. Migrate Windows logins to AAD 67 | 68 | 2. Migrate SQL Agent job for index reorg 69 | 70 | 3. Migrate XEvent session to use Azure Blob Storage 71 | -------------------------------------------------------------------------------- /migratesqltoazureworkshop/05-MigrateToSQLMI/readme.md: -------------------------------------------------------------------------------- 1 | # Migrate SQL Server to Azure SQL Managed Instance 2 | 3 | In this module you will perform exercises to migrate the advanced scenario from SQL Server 2019 to Azure SQL Managed Instance. 4 | 5 | From the requirements and assessment in Module 2, Azure SQL Managed Instance is the right target for the migration. 6 | 7 | There are two aspects for the migration that are required for the migration: 8 | 9 | - The Business Critical service tier is required for the Azure SQL Managed Instance deployment because the current SQL Server 2019 installation uses an Always On Availability Group. 10 | - An online migration required which is supported using Azure Data Studio. 11 | 12 | ## Deploy an Azure SQL Managed Instance 13 | 14 | Follow the readme.md in the **deploy** folder. 15 | 16 | ## Online migration to Azure SQL Managed Instance 17 | 18 | Follow the readme.md in the **onlinemigation** folder 19 | 20 | **Tip**: If your databases use TDE before the migration, you should first migrate certificates. See more at https://docs.microsoft.com/en-us/azure/azure-sql/managed-instance/tde-certificate-migrate?tabs=azure-powershell 21 | 22 | -------------------------------------------------------------------------------- /migratesqltoazureworkshop/06-OptimizeSQLMI/azureservices/readme.md: -------------------------------------------------------------------------------- 1 | # Explore Azure services with Azure SQL Managed Instance 2 | 3 | 1. Show Microsoft Defender for Cloud findings for tpccsqlmiprod. 4 | -------------------------------------------------------------------------------- /migratesqltoazureworkshop/06-OptimizeSQLMI/bestpractices/readme.md: -------------------------------------------------------------------------------- 1 | # Implement and ensure best practices for Azure SQL Managed Instance 2 | 3 | 1. Under compute+storage show Azure Hybrid Benefit 4 | 2. Under maintenance show how you can choose a custom maintenance window 5 | 3. Look at resource health from the menu 6 | 4. Show Access Control with RBAC 7 | 5. Show Networking options. Show the jumpbox VM connected without using the public endpoint 8 | 6. Show AAD from tpccsqlmi and how my AAD is there and I could choose AAD only -------------------------------------------------------------------------------- /migratesqltoazureworkshop/06-OptimizeSQLMI/explore/readme.md: -------------------------------------------------------------------------------- 1 | # Explore Azure SQL Managed Instance 2 | 3 | 1. Use the Azure portal to show all the various options including: 4 | 5 | The main portal page 6 | Compute+storage options = We could use Premium tier to get the original memory we had 7 | Metrics 8 | Export template 9 | 10 | 2. How do you use command line options 11 | 12 | Bring up the cloud shell 13 | 14 | Run az sql mi --help 15 | 16 | Then show what the options are 17 | 18 | 3. Connect to SSMS and look at the sql config and admin tasks 19 | 20 | Look at tempdb files 21 | Set 'max degree of parallelism' to 1 22 | Show the dbcompat of our db 23 | Show the query store 24 | Show sys.dm_exec_requests and sys.dm_os_memory_clerks 25 | Run DBCC CHECKDB(tpcc) 26 | Show system health session exists 27 | 28 | 4. Show a jumpbox 29 | 30 | Show you can connect without using the public endpoint using an Azure VM "jumpbox" -------------------------------------------------------------------------------- /migratesqltoazureworkshop/06-OptimizeSQLMI/hadr/readme.md: -------------------------------------------------------------------------------- 1 | # Investigate buit-in HADR with Azure SQL Managed Instance 2 | 3 | 1. Show backup retention policies and how to customize in the portal 4 | 2. Show a read-only connection in SSMS is built-in and free 5 | 3. Show how to configure an auto-failover group 6 | 4. Show a failover with connectmi.ps1 and failover.ps1. Show agent jobs are part of the failover. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/06-OptimizeSQLMI/readme.md: -------------------------------------------------------------------------------- 1 | # Optimize and manage Azure SQL Managed Instance 2 | 3 | After the migration you will want to optimize and manage the Azure SQL Managed Instance. 4 | 5 | In this module you will go through exercises to: 6 | 7 | - Explore details of the Azure SQL Managed Instance after the migration 8 | - Implement and ensure best practices for Azure SQL Managed instance 9 | - Verify the workload after migration 10 | - Explore Azure services such as Microsoft Defender and SQL Insights 11 | 12 | ## Explore Azure SQL Managed Instance 13 | 14 | Follow the readme.md in the **explore** folder 15 | 16 | ## Implement and ensure best practices 17 | 18 | Follow the readme.md in the **bestpractices** folder 19 | 20 | ## Verify the workload 21 | 22 | Follow the readme.md in the **verifyworkload** folder 23 | 24 | ## Investigate built-in HADR 25 | 26 | Follow the readme.md in the **hadr** folder 27 | 28 | ## Explore Azure services 29 | 30 | Follow the readme.md in the **azureservices** folder -------------------------------------------------------------------------------- /migratesqltoazureworkshop/06-OptimizeSQLMI/verifyworkload/readme.md: -------------------------------------------------------------------------------- 1 | # Verify workload after migration 2 | 3 | Bring up HammerDB for TPCC-C and connect to SQL MI and see the brief performance is similar to the SQL Server 2019 installation. It is important to call out that Managed Instance support the same replica environment as the SQL Server 2019 Always-On Availability Group but it is completely managed. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/07-MigrateVMToSQLMI/onlinemigration/readme.md: -------------------------------------------------------------------------------- 1 | # Perform an online migration from IaaS to PaaS 2 | 3 | In this exercise you will perform an online migration for SQL Server in Azure Virtual Machine to Azure SQL Managed Instance. 4 | 5 | The exact steps for this exercise are under construction. The concept is to use the backups that have been created from configuring Automatic Backups in Module 4 for an online migration. Since the backups already exist in Azure Storage you can use Azure Data Studio (ADS) without having to install the Self-hosted Integration Runtime. 6 | 7 | ADS can support restoring a full backup to Azure SQL Managed Instance from existing Azure Storage and then restore transaction log backups as they are created. 8 | 9 | The cutover process is very similar to the process as in Module 5 which included an online migration from SQL Server to Azure SQL Managed Instance. -------------------------------------------------------------------------------- /migratesqltoazureworkshop/07-MigrateVMToSQLMI/readme.md: -------------------------------------------------------------------------------- 1 | ## Migrate from Azure Virtual Machine to Azure SQL Managed Instance 2 | 3 | For the basic migration scenario, the customer would like to use Platform as a Service (PaaS). While the ISV application vendor has approved the use of Azure SQL Managed Instance, you need the migration to be online to minimize downtime. 4 | 5 | ## Online migration from Azure Virtual Machine to Azure SQL Managed Instance 6 | 7 | Follow the readme.md in the **onlinemigration** folder -------------------------------------------------------------------------------- /slides/MigrateSQLServertoAzureWorkshop.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/sqlworkshops-migratesqltoazure/888a09ba7a8353e42349b279d55cea76e056652a/slides/MigrateSQLServertoAzureWorkshop.pptx --------------------------------------------------------------------------------