Using SSDT, we can create a database project and implement schema changes by adding, modifying or deleting the definitions of objects (represented by scripts) in the project. This makes your database code, procedures to be under source controlled and can be managed to deploy through CI/CD pipeline.
Output of the SSDT project is a DACPAC file. DACPAC is Data Tier Application Package. Its a logical database management entity that contains database model like tables, views, and instance objects. Generated DACPAC file can be deployed to multiple environments.
I will explain the continuous integration and continuous delivery of the database project.
Creating the Project
- Create a new SQL Server Database project in Visual Studio
- Import the existing database.
- Provide the database server details
- Leave the other settings as they are and click start.
- After a few seconds the import should be complete.
- The database tables and procedures are successfully imported.
- Once you build the project, you will able to see .dacpac file created in bin folder.