221 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
70
views
Random Change tracking enabled error when deploying `DACPAC` using `DacFx`
We have a SQL Server Data Tools (SSDT) Visual Studio database project, and we deploy the DACPAC output using DacFx + PowerShell scripts.
In this project, we enable:
Database-level change tracking via ...
0
votes
0
answers
91
views
SqlPackage script with CDC enabled tables
I have a .sqlproj with some CDC enabled tables.
My ADO CD pipeline does a sqlpackage Action:script and then sqlpackage Action:publish.
I had a requirement to add some columns to one of the CDC enabled ...
0
votes
2
answers
422
views
Deployment pipeline for SQL Server 2022 DACPAC file throws an error Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider is not valid
One of my clients has an on-premises SQL Server 2022 database. I'm building a deployment pipeline in Azure DevOps that builds a DACPAC file based on a VS2022 project and deploys this to the server. We ...
0
votes
1
answer
152
views
How can i restore a very large Azure bacpac file?
I am trying to restore a backup of a azure sql database i did using powershell, ie a bacpac file.
The file is 20gig in size.
I am trying to restore using the following:
sqlpackage.exe /Action:Import ...
0
votes
1
answer
162
views
SQLPackage adding REVOKE CONNECT to users - how to remove just the REVOKE CONNECT? (SDK-Style database project)
TLDR: running SQLPACKAGE /action:Scripts against my DACPAC results in users/logins created, but the create script runs a "CREATE USER FOR LOGIN X; REVOKE CONNECT TO X". I need it to not run ...
-1
votes
1
answer
527
views
How can i backup and Azure sql database and save to storage account?
I am trying to backup an Azure sql database using sqlpackage within powershell.
So far i have :
$url = az storage container generate-sas --account-name <storage_account> --name <container&...
0
votes
0
answers
43
views
How can i restore a bacpac file from local drive without transaction locks?
I have a bacpac file for an azure sql database.
I am restoring it via the cmd ,
sqlpackage.exe /a:Import /sf:"c:\test\mydb.bacpac" /tsn:"test.database.windows.net"
/tdn:"...
0
votes
0
answers
66
views
How to order trigger in files while exporting SchemaObjectType using SqlPackage?
I need to control the modification that are done in a SQL Server database.
My solution would be to use a git repo to store every day an export of the database.
So I created this PS script:
Remove-Item ...
0
votes
0
answers
74
views
Does SQLPackage support extract with per table filtering?
I am working on automatically cloning part SQL Server database content.
With SQLPackage extract and publish commands, I can clone the whole database or a subset of its tables.
Now, I want to filter ...
0
votes
1
answer
244
views
How can I update a .sqlproj from database via the command line
This Microsoft article details how to both create and update a sql project from a database when changes are made to the database that don't yet exist in the project. I would like to accomplish this ...
-1
votes
1
answer
239
views
SQL Package extract command is failing in PowerShell script
I wrote a PowerShell script that uses SQL Package to create a dacpac and apply it to my local db. This script worked fine and I was getting ready to share it and it started throwing an error.
An ...
2
votes
1
answer
188
views
How can I exclude a Login's default database setting in DACPAC Publish
I am writing a Powershell script to create a SQL Server dacpac file from our QA database and publish it to the local db. I am using SQLPackage.exe. When I publish, I am getting an error:
Could not ...
0
votes
0
answers
57
views
SQL Package publish property IgnoreDefaultSchema not working
I have .dacpac and want to publish the same with SQL package CLI. However there are some unwanted tables in the .dacpac or from the source database, which I don't want to be created in the targeted ...
0
votes
1
answer
414
views
Github action workflow sqlpackage does not exist
I'm brand new to Github workflows, this is the first one I've properly tried. I'm trying to get the workflow to build my sqlserver project made in Azure on push to master, then deploy it onto my ...
0
votes
0
answers
221
views
DacPac deployment with custom variables to Azure SQL MI
I'm looking to use Azure DevOps to deploy a database via dacpac file to an Azure SQL Managed Instance. We have multiple of the same databases all hosted on the same SQL MI, but for different ...