{"id":15012238,"url":"https://github.com/microsoft/dacfx","last_synced_at":"2025-05-14T07:08:02.718Z","repository":{"id":37815046,"uuid":"277609931","full_name":"microsoft/DacFx","owner":"microsoft","description":"DacFx, SqlPackage, and other SQL development libraries enable declarative database development and database portability across SQL versions and environments. Share feedback here on dacpacs, bacpacs, and SQL projects.","archived":false,"fork":false,"pushed_at":"2025-05-02T17:31:46.000Z","size":244,"stargazers_count":399,"open_issues_count":172,"forks_count":22,"subscribers_count":43,"default_branch":"main","last_synced_at":"2025-05-07T23:46:39.357Z","etag":null,"topics":["azure-sql","dacfx","dotnet","dotnet-core","microsoft","sql","sql-server","sqlpackage","sqlproj","sqlprojects"],"latest_commit_sha":null,"homepage":"https://aka.ms/sqlpackage-ref","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-06T17:44:47.000Z","updated_at":"2025-05-02T17:31:48.000Z","dependencies_parsed_at":"2023-01-28T01:16:27.077Z","dependency_job_id":"8187733b-3937-4c72-b0c2-91aacb4d1733","html_url":"https://github.com/microsoft/DacFx","commit_stats":{"total_commits":98,"total_committers":17,"mean_commits":5.764705882352941,"dds":"0.44897959183673475","last_synced_commit":"510d2e302078508437dfd5baaa424afc4c3929ba"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FDacFx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FDacFx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FDacFx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FDacFx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/DacFx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092776,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-sql","dacfx","dotnet","dotnet-core","microsoft","sql","sql-server","sqlpackage","sqlproj","sqlprojects"],"created_at":"2024-09-24T19:42:18.117Z","updated_at":"2025-05-14T07:08:02.701Z","avatar_url":"https://github.com/microsoft.png","language":"C#","readme":"# DacFx and Related Components\n\n|Component|Links|Summary|\n|:--|:--|:--|\n|SqlPackage|[📦\u0026nbsp;Tool](https://www.nuget.org/packages/Microsoft.SqlPackage)\u003cbr/\u003e[📗\u0026nbsp;Docs](https://aka.ms/sqlpackage-ref)|Microsoft.SqlPackage is a cross-platform command-line utility for creating and deploying .dacpac and .bacpac packages. SqlPackage can be installed as a *dotnet tool*.|\n|DacFx|[📦\u0026nbsp;NuGet](https://www.nuget.org/packages/Microsoft.SqlServer.DacFx)\u003cbr/\u003e[📘\u0026nbsp;API Docs](https://learn.microsoft.com/dotnet/api/microsoft.sqlserver.dac)|The Microsoft SQL Server Data-Tier Application Framework (Microsoft.SqlServer.DacFx) is a .NET library which provides application lifecycle services for database development and management for Microsoft SQL Server and Microsoft Azure SQL Databases. Preview versions of DacFx are frequently released to NuGet.|\n|DacpacVerify|[📦\u0026nbsp;Tool](https://www.nuget.org/packages/Microsoft.DacpacVerify)|Microsoft.DacpacVerify is a cross-platform command-line utility for checking that two .dacpac packages match, including pre/post-deployment scripts and SQLCMD variables.|\n|Dacpacs.(Master,Msdb)|[📦\u0026nbsp;Master](https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs.Master)\u003cbr/\u003e[📦\u0026nbsp;Msdb](https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs.Msdb)|Microsoft.SqlServer.Dacpacs.Master and Microsoft.SqlServer.Dacpacs.Msdb is a set of NuGet packages containing .dacpac files for Microsoft SQL Server system databases (master, msdb) with versions across SQL Server 2008 (100) through SQL Server 2022 (160).|\n|Dacpacs.Azure.Master|[📦\u0026nbsp;NuGet](https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs.Azure.Master)|Microsoft.SqlServer.Dacpacs.Azure.Master is a NuGet package containing a .dacpac file for the Azure SQL Database master database.|\n|Dacpacs.Synapse.Master|[📦\u0026nbsp;NuGet](https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs.Synapse.Master)|Microsoft.SqlServer.Dacpacs.Synapse.Master is a NuGet package containing a .dacpac file for the Azure Synapse Analytics master database.|\n|Dacpacs.SynapseServerless.Master|[📦\u0026nbsp;NuGet](https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs.SynapseServerless.Master)|Microsoft.SqlServer.Dacpacs.SynapseServerless.Master is a NuGet package containing a .dacpac file for the Azure Synapse Analytics serverless SQL pools master database.|\n|ScriptDom|[📦\u0026nbsp;NuGet](https://www.nuget.org/packages/Microsoft.SqlServer.TransactSql.ScriptDom)\u003cbr/\u003e[🛠️\u0026nbsp;Code](https://github.com/microsoft/SqlScriptDOM)\u003cbr/\u003e[📘\u0026nbsp;API Docs](https://learn.microsoft.com/dotnet/api/microsoft.sqlserver.transactsql.scriptdom)|Microsoft.SqlServer.TransactSql.ScriptDom is a NuGet package containing the Transact-SQL parser [ScriptDOM](https://learn.microsoft.com/dotnet/api/microsoft.sqlserver.transactsql.scriptdom). The [source code](https://github.com/microsoft/SqlScriptDOM) is licensed MIT.|\n|Microsoft.Build.Sql|[📦\u0026nbsp;NuGet](https://www.nuget.org/packages/Microsoft.Build.Sql)\u003cbr/\u003e[🛠️\u0026nbsp;Code](/src/Microsoft.Build.Sql/)|Microsoft.Build.Sql (preview) is a [.NET project SDK](https://docs.microsoft.com/dotnet/core/project-sdk/overview) for SQL projects, compiling T-SQL code to a data-tier application package (dacpac). In preview, [source code](/src/Microsoft.Build.Sql/) in this repository.|\n|Project Templates|[📦\u0026nbsp;NuGet](https://www.nuget.org/packages/Microsoft.Build.Sql.Templates)\u003cbr/\u003e[🛠️\u0026nbsp;Code](/src/Microsoft.Build.Sql.Templates/)|Microsoft.Build.Sql.Templates (preview) is a set of [.NET project templates](https://learn.microsoft.com/dotnet/core/tools/custom-templates) for SQL projects. In preview, [source code](/src/Microsoft.Build.Sql.Templates/) in this repository.|\n\n## Microsoft.Build.Sql SDK-style projects documentation\n\n- [Overview](https://aka.ms/sqlprojects)\n- [Release notes](release-notes/Microsoft.Build.Sql/README.md)\n- [Getting Started](https://learn.microsoft.com/sql/tools/sql-database-projects/get-started)\n- [Converting Existing Projects](https://learn.microsoft.com/sql/tools/sql-database-projects/howto/convert-original-sql-project)\n- [Troubleshooting](https://learn.microsoft.com/sql/tools/sql-database-projects/howto/troubleshoot-sql-project-build)\n- [CI/CD Workflow Samples](https://aka.ms/sqlprojects-samples)\n\n## Related tools and libraries\n\n- [GitHub sql-action](https://github.com/azure/sql-action): deploy SQL projects and T-SQL scripts using GitHub Actions\n- [Azure DevOps SQL deployments](https://learn.microsoft.com/azure/devops/pipelines/targets/azure-sqldb): deploy SQL projects and run other SqlPackage commands using Azure DevOps\n- [Azure Data Studio and VS Code extension for SQL projects](https://aka.ms/azuredatastudio-sqlprojects): create and edit SQL projects in Azure Data Studio and Visual Studio Code on Windows, macOS, and Linux\n- [SQL Server Data Tools in Visual Studio](https://learn.microsoft.com/sql/ssdt/): create and edit SQL projects in Visual Studio on Windows\n\n## Quickstart\n\n### 🛠️ Install SqlPackage\n\nSqlPackage is a command line interface to DacFx and is available for Windows, macOS, and Linux. For more about SqlPackage, check out the [reference page on Microsoft Docs](https://learn.microsoft.com/sql/tools/sqlpackage/sqlpackage).\n\nIf you would like to use the command-line utility SqlPackage for creating and deploying .dacpac and .bacpac packages, you can obtain it as a dotnet tool.  The tool is available for Windows, macOS, and Linux.\n\n```bash\ndotnet tool install -g microsoft.sqlpackage\n```\n\nAlternatively, SqlPackage can be downloaded as a zip file from the [SqlPackage documentation](https://learn.microsoft.com/sql/tools/sqlpackage/sqlpackage-download).\n\n### 📁 Create a SQL project\n\nInstall the Microsoft.Build.Sql.Templates NuGet package to get started with a new SQL project.\n\n```bash\ndotnet new install Microsoft.Build.Sql.Templates\n```\n\nCreate a new SQL project using the `sqlproj` [template](src/Microsoft.Build.Sql.Templates/).\n\n```bash\ndotnet new sqlproj -n ProductsTutorial\n```\n\nAdd a new table `dbo.Product` in a *.sql* file alongside the project file.\n\n```sql\nCREATE TABLE [dbo].[Product](\n    [ProductID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,\n    [ProductName] [nvarchar](200) NOT NULL\n);\n```\n\nBuild the project to create a .dacpac file.\n\n```bash\ndotnet build\n```\n\n### 🛳️ Publish a SQL project\n\nPublish a SQL project to a database using the SqlPackage `publish` command. Learn more about the `publish` command in the [SqlPackage documentation](https://learn.microsoft.com/sql/tools/sqlpackage/sqlpackage-publish), where additional examples and details on the parameters are available.\n\n```bash\n# example publish to Azure SQL Database using SQL authentication and a connection string\nsqlpackage /Action:Publish /SourceFile:\"bin/Debug/ProductsTutorial.dacpac\" \\\n    /TargetConnectionString:\"Server=tcp:{yourserver}.database.windows.net,1433;Initial Catalog=ProductsTutorial;User ID=sqladmin;Password={your_password};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;\"\n```\n\n## Repository Focus\n\n### Feedback\n\nThis repository is available for transparently triaging and addressing feedback on DacFx, including the NuGet package and the cross-platform CLI SqlPackage. We welcome community interaction and suggestions! For more information on contributing feedback through interacting with issues see [Contributing](CONTRIBUTING.md).\n\n### Related Open Source Projects\n\nThis repository is available to make related open source components accessible even from their early stages. Feedback and contributions are welcome!\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see [Code of Conduct](CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fdacfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fdacfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fdacfx/lists"}