Questions tagged [sqlproj]

Database development project extension created by Visual Studio, a Windows software development IDE; stores the schema of the database and can include SQL source code; used for creating databases for SQL Server, Microsoft's relational database management system (RDBMS) software.

Database development project extension created by Visual Studio, a Windows software development IDE; stores the schema of the database and can include SQL source code; used for creating databases for SQL Server, Microsoft's relational database management system (RDBMS) software.

Older .DBPROJ files can be migrated to the newer SQLPROJ format in Visual Studio 2012.

Information from: http://www.fileinfo.com/extension/sqlproj

101 questions
1
vote
2 answers

Conditionally build Post-Deploy in SSDT SQLPROJ

I want to conditionally build the post-deploy script in my SSDT project, but i don't understand how to do that. So normally the post-deploy script is built, but I want a way to NOT build or run the post-deploy script when doing a Debug build. I am…
Tyler Jones
  • 1,283
  • 4
  • 18
  • 38
1
vote
1 answer

Building a database project is not generating a dbschema file

I'm trying to use the vsdbcmd.exe command to deploy a SQL DB Project. However, when I try to build said project using MSBuild, or even in VS (2013), it is not generating a dbschema file (as documented here). Can anyone offer any suggestions as to…
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
1
vote
0 answers

SQLProj Code Coverage in VS 2012

In Visual Studio 2012 I have a .SQLProj to control our SPs and functions. We have a Unit Testing project with test methods as illustrated below. The Unit Tests are wired into our CI server successfully. My question is, how can we go about generating…
1
vote
1 answer

Why can't Sql Server Data Tools understand Drop statements when importing scripts?

I'm currently loading up a new sqlproj with custom scripts that were generated with RedGate SqlCompare during the course of a project as we adopt SSDT. However I find, rather annoyingly, that SSDT spits quite a lot of stuff into the…
bwerks
  • 8,651
  • 14
  • 68
  • 100
0
votes
1 answer

mass import FOREIGN KEY same table

I have scripted data from a database and want to import them to another, however, I'm getting a FOREIGN KEY SAME TABLE error. After looking at the data I've noticed that FK the row is expecting is created couple of insert statements below. Is there…
Branislav B.
  • 509
  • 7
  • 21
0
votes
0 answers

SQL project in visual studio getting failed

SQL project in visual studio getting failed. with below error. SQL72003: The value 160 for property CompatibilityMode was not valid. Don't have any idea about it. Could anyone from community guide me to fix this one. Thanks
AstroBoy
  • 337
  • 3
  • 16
0
votes
0 answers

Sql Dacpac Deployment - Azure devops

I have a strange issue, when I run locally the publish script works fine and when run through pipeline it gives me an error: Incorrect syntax near the keyword 'with'. this statement is a common table expression, an xml namespaces clause or a change…
0
votes
0 answers

SQL Dacpac Deployment Yaml devops pipeline

I am deploying dacpac to azure sql db using SqlAzureDacpacDeployment@1 and it is giving me an error in a predeployment script. This is my predeployment sql in database project PRINT 'Something'; GO PRINT 'Execute delete script'; GO DELETE FROM…
0
votes
0 answers

In Visual Studio - when creating new solution, is there an option to not create a nested folder? (SQL Database Project)

I'm trying to create a SQL Database Project in VS 2022, but it keeps creating a nested folder that I don't want. I have the following folder cloned from a github repo... /repos/ClonedRepo I go to create a SQL Database project And I end up with…
0
votes
2 answers

Avoiding "schema drift detected" errors in SSDT comparisons

I'm trying to update a SQL Server project in Visual Studio 2019 by using the SSDT schema comparison. My source is a running database server, the destination is the VS SQL Server project. When the comparison is done and I click "Update", I get the…
0
votes
1 answer

Add Primary Key Constraint keeps appearing in schema compare but won't commit to the database project

I am working on a database project in azure data studio. I added a primary key constraint to an existing table. When I update the project from the database, the schema compare picks up on the change. +ALTER TABLE [dbo].[tableName] +…
0
votes
0 answers

Dacpac to sqlproj - programmatically

I am trying to automate the following steps: We currently try to keep our database project (.sqlproj) up to date with out database, but this is currently a manual procedure. We open Visual Studio, put our database as source, put our sqlproj as…
Eviler
  • 39
  • 6
0
votes
1 answer

Issue with Building .sqlproj from Azure Data Studio Project with dotnet

Im following this github repo for setting up ci-cd pipeline for synapse using dacpac : https://github.com/santiagxf/synapse-cicd In the github workflow for CI , AT BUILD DACPAC step , im getting following error : Build…
ASHISH M.G
  • 522
  • 2
  • 7
  • 23
0
votes
1 answer

No column in target database, but getting "The schema update is terminating because data loss might occur"

I had been getting the error when publishing a SQL project. I was testing on a database made from the production schema with some test data. When I looked at the error from the Data Tools Operations tab in Visual Studio, I saw this: /* The column…
Becca Dee
  • 1,530
  • 1
  • 24
  • 51
0
votes
2 answers

SQL Server database project different configuration for Debug and Release

I have a SQL Server database project (.sqlproj) which I am using as part of a CI/CD pipeline to deploy database changes. I would like to deploy the same code to two databases (Dev and Production) but each with a slightly different configuration: In…
Nick
  • 685
  • 12
  • 27