Course Overview

This two-day, instructor-led course provides students with the knowledge and skills to effectively develop, test, and deliver modern SQL Server databases. Student will experience how to manage changes to database schema, ensure quality through T-SQL unit testing and static code analysis, and automate the building and deploying of SQL Server databases.

Key Learning Areas

  • SQL Server Data Tools (SSDT) overview
  • SSDT vs. SSIS, SSAS, and SSRS development
  • Agile database development
  • SQL Server and Azure SQL version support
  • Connected vs. disconnected development
  • SQL Server Object Explorer (SSOX)
  • T-SQL editor, debugger, and IntelliSense
  • Imperative vs. declarative development
  • Agile database techniques
  • SQL Server database projects
  • Thinking of schema as source code
  • Solution Explorer vs. SQL Server Object Explorer
  • Importing a database schema
  • Importing a data-tier application (.dacpac)
  • Importing T-SQL Script
  • Cross-database dependencies
  • Referencing a database projector .dacpac
  • Database development lifecycle
  • Database project activities and tasks
  • Integration with Azure DevOps (Azure Repos)
  • Creating and configuring a team project
  • Using Git to manage schema changes
  • Creating and cloning a Git repository
  • Commit, pull, push workflow in Visual Studio
  • Comparing and synchronizing schema changes
  • Creating and using a project snapshot (.dacpac)
  • Comparing and synchronizing data changes
  • SQL Server unit testing principles
  • Creating a unit test project
  • Testing Stored procedures, functions, and triggers
  • Using initialize, pre/post-test, and cleanup scripts
  • T-SQL assertions vs. test conditions
  • Automatic test generation
  • Creating negative unit tests
  • Using tSQLt for SQL Server unit testing
  • Generating test data
  • Using static code analysis
  • Configuring, viewing, and suppressing messages
  • Database refactoring overview
  • SSDT refactoring commands
  • Understanding the refactoring log
  • Building the database project
  • Deploying/publishing to SQL Server
  • Using variables and custom scripts
  • Advanced project types
  • Integrating with Azure Pipelines
  • Using build and release pipelines
  • Running SQL Server unit tests in a pipeline
  • Practicing Continuous Integration (CI)
  • Practicing Continuous Delivery (CD)

Course Outline

Agile Database Development

  • Agile database development overview
  • Agility challenges and blockers
  • SQL Server Data Tools overview
  • Connected vs. disconnected development
  • Imperative vs. declarative development
  • Agile database technique

SQL Server Database Projects

  • Creating a SQL Server database project
  • Treating schema as source code
  • Working with SQL Server Object Explorer
  • Importing database schema
  • Importing data-tier applications (.dacpac)
  • Importing scripts
  • Managing cross-database dependencies
  • Referencing a database and .dacpac file

Managing Schema Changes

  • Introduction to Azure DevOps
  • Azure Repos overview
  • Using Git to manage schema changes
  • Cloning, committing, pushing, and pulling
  • Comparing schemas and sync’ing changes
  • Comparing data and sync’ing changes
  • Rolling back changes using Git
  • Rolling back changes using project snapshots

Assuring a High-Quality Design

  • Database unit testing principles
  • Levels of database unit testing
  • SQL Server unit tests
  • Database unit test designer
  • T-SQL assertions vs. test conditions
  • Using tSQLt for SQL Server unit testing
  • Static code analysis
  • Database refactoring tools

Building and Deploying

  • Building the database project
  • Using pre-build and post-build events
  • Including additional build scripts
  • Using script build actions
  • Using the LocalDB isolated sandbox
  • Deploying changes to SQL Server
  • Creating and using publishing profiles
  • Using pre and post deployment scripts
  • Using SQLCMD variables within scripts
  • Building/deploying composite projects
  • Building/deploying SQL CLR objects
  • Azure Pipelines overview
  • Using an automated build pipeline
  • Practicing Continuous Integration (CI)
  • Using an automated release pipeline
  • Running tests in the release pipeline
  • Practicing Continuous Delivery (CD)

Who Benefits

This course is intended for database developers and administrators working with modern versions of SQL Server or SQL Azure. Application developers who are involved with writing and testing T-SQL code and working with test data will also find value from this course. It would also be beneficial if the student has worked on a team-based software development project and is familiar with their organization’s development lifecycle and practices.

This course is intended for practitioners who are comfortable with the concepts of developing, testing, and deploying SQL Server databases.

Prerequisites

SQL Server development experience required.