AI prompts
base on 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. # DacFx and Related Components
|Component|Links|Summary|
|:--|:--|:--|
|SqlPackage|[📦 NuGet](https://www.nuget.org/packages/Microsoft.SqlPackage)<br/>[📗 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*.|
|DacFx|[📦 NuGet](https://www.nuget.org/packages/Microsoft.SqlServer.DacFx)<br/>[📘 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.|
|Dacpacs.(Master,Msdb)|[📦 Master](https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs.Master)<br/>[📦 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).|
|Dacpacs.Azure.Master|[📦 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.|
|Dacpacs.Synapse.Master|[📦 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.|
|Dacpacs.SynapseServerless.Master|[📦 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.|
|ScriptDom|[📦 NuGet](https://www.nuget.org/packages/Microsoft.SqlServer.TransactSql.ScriptDom)<br/>[🛠️ Code](https://github.com/microsoft/SqlScriptDOM)<br/>[📘 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.|
|Microsoft.Build.Sql|[📦 NuGet](https://www.nuget.org/packages/Microsoft.Build.Sql)<br/>[🛠️ 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.|
|Project Templates|[📦 NuGet](https://www.nuget.org/packages/Microsoft.Build.Sql.Templates)<br/>[🛠️ 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.|
## Microsoft.Build.Sql SDK-style projects documentation
- [Converting Existing Projects](src/Microsoft.Build.Sql/docs/Converting-Existing.md)
- [Functionality](src/Microsoft.Build.Sql/docs/Functionality.md)
- [Troubleshooting](src/Microsoft.Build.Sql/docs/Troubleshooting.md)
- [Tutorial](src/Microsoft.Build.Sql/docs/Tutorial.md)
## Related tools and libraries
- [GitHub sql-action](https://github.com/azure/sql-action): deploy SQL projects and T-SQL scripts using GitHub Actions
- [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
- [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
- [SQL Server Data Tools in Visual Studio](https://learn.microsoft.com/sql/ssdt/): create and edit SQL projects in Visual Studio on Windows
## Quickstart
### 🛠️ Install SqlPackage
SqlPackage 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).
If 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.
```bash
dotnet tool install -g microsoft.sqlpackage
```
Alternatively, SqlPackage can be downloaded as a zip file from the [SqlPackage documentation](https://learn.microsoft.com/sql/tools/sqlpackage/sqlpackage-download).
### 📁 Create a SQL project
Install the Microsoft.Build.Sql.Templates NuGet package to get started with a new SQL project.
```bash
dotnet new -i Microsoft.Build.Sql.Templates
```
Create a new SQL project using the `sqlproj` [template](src/Microsoft.Build.Sql.Templates/).
```bash
dotnet new sqlproj -n ProductsTutorial
```
Add a new table `dbo.Product` in a *.sql* file alongside the project file.
```sql
CREATE TABLE [dbo].[Product](
[ProductID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
[ProductName] [nvarchar](200) NOT NULL
);
```
Build the project to create a .dacpac file.
```bash
dotnet build
```
### 🛳️ Publish a SQL project
Publish 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.
```bash
# example publish to Azure SQL Database using SQL authentication and a connection string
sqlpackage /Action:Publish /SourceFile:"bin/Debug/ProductsTutorial.dacpac" \
/TargetConnectionString:"Server=tcp:{yourserver}.database.windows.net,1433;Initial Catalog=ProductsTutorial;User ID=sqladmin;Password={your_password};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
```
## Repository Focus
### Feedback
This 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).
### Related Open Source Projects
This repository is available to make related open source components accessible even from their early stages. Feedback and contributions are welcome!
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see [Code of Conduct](CODE_OF_CONDUCT.md).
", Assign "at most 3 tags" to the expected json: {"id":"11942","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"