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
4
votes
2 answers

Version control of .sqlproj files

Our .sqlproj contains a lot of statements like this one for every object existing in the project: Whenever an object…
4
votes
4 answers

Generate multiple DACPACs targeting multiple target platforms

I have an SSDT sql server database project of which I want to deploy to both an on premise SQL Server 2016 and SQL Azure. It appears I can only set the project to target one platform I want to be able to build this project (using VSTS build agents)…
BozoJoe
  • 6,117
  • 4
  • 44
  • 66
4
votes
2 answers

Renaming columns in a system versioned table Visual Studio SQL Project

I'm looking to have Visual Studio's SQL Schema Compare generate the delta SQL to update a production database, including a column rename on a table with system versioning on (temporal table). Using refactoring within Visual Studio SQL Project will…
4
votes
1 answer

Include SQL Server PostDeployment from DB Project reference

We are splitting up one of our SQL Server DB Projects into two separate projects. Core.DB Tables PostDeployment PreDeployment Core.Seed (Reference to Core.DB) PostDeployment PreDeployment I have the general "table" publish working…
Nix
  • 57,072
  • 29
  • 149
  • 198
4
votes
2 answers

How can we extended SQLProj code analysis rules by adding our own custom rule?

Currently .sqlproj files have 15 code analysis rules (SR0001 to SR0015). I would like to create my own code analysis rule to make sure that columns used in where clauses are indexed. How would I extended the current .sqlproj code analysis so that I…
Andrew Thompson
  • 2,396
  • 1
  • 21
  • 23
3
votes
2 answers

how do I target azure v12 database for sqlproj from the build command

We have a sqlproj that targets SQL 2014 locally. The build and publish work as expected from Visual Studio. Now we are trying to build and deploy the database project to Azure Database v12 using VS Online. We are getting errors stating the SSDT…
Jason Meckley
  • 7,589
  • 1
  • 24
  • 45
3
votes
1 answer

Error "database compatibility level is not supported." while import MSSQL db

I try to import db schema (MSSQL2008) by Visual Studio 2015 using SqlProj. There are two database to do. DevDb ver. 10.50.4000 <- I log with Windows Credentials TestDb ver. 10.50.6000 <- I log with sql's user Compability level 100 for both dbs is…
Jacek
  • 11,661
  • 23
  • 69
  • 123
3
votes
0 answers

Exclude a post deployment script in Visual Studio 2013 SQL Server project

Exclude a post deployment script in Visual studio 2013 SQL Server project. I am not explaining the whole requirement why I have to do this. I am explaining part of my issue; please bear it. I have the following script: CREATE SCHEMA…
Manjay_TBAG
  • 2,176
  • 3
  • 23
  • 43
3
votes
2 answers

Sqlproj: Which solution to deploy a database in command line?

I am currently deploying a website to a server by using the Microsoft Web Deployment technologies (msbuild and msdeploy commands). The website requires the deployment of a database and both will be in the same server. I am searching the best…
JM89
  • 149
  • 1
  • 1
  • 11
3
votes
1 answer

Specify a connection string when building sqlproj

We have started using local SQL Servers (SQL 2012) for development. We have a tool that calls MSBUILD to deploy a SQL Project (.sqproj) to either our local, dev & test databases. A requirement has come up where we want to use that tool to deploy to…
Greg
  • 3,442
  • 3
  • 29
  • 50
3
votes
1 answer

Deploying SSDT with Web Deployment

I have a VS 2012 solution that includes both an SSDT project (sqlproj) and an MVC Web Application. I've setup numerous profiles for deploying the web app and would now like to use dbdacfx (or something else?) to deploy the dacpac produced by the…
sp00kyDude
  • 33
  • 6
2
votes
1 answer

Missing toolbar in SSDT SQL Server Database Project sql file

In Visual Studio 2019, when i create a new sql query file, i can see a toolbar inside the tab like this: With SQL Server Data Tools i have created a new SQL Server Database Project with .sql files of stored procedure and functions where this…
2
votes
0 answers

Installing a Nuget Package in an .sqlproj

I want to install a nuget package (ReportGenerator) to help collate coverage reports across various projects in a solution in Azure. Some of these projects are SQL projects with unit tests undertaken with TsqlT. However I need to add a refernce to…
James Cooke
  • 1,221
  • 1
  • 14
  • 27
2
votes
1 answer

How do I include a non-dll file from build output (dacpac) in a dotnet pack nuget package?

I currently have a .NET Standard 2.0 library that is a repository against a sql database. I also have a .sqlproj project in the same solution for that particular database. The repository library gets built, packed, and pushed to our nuget…
Kyle J V
  • 563
  • 5
  • 21
2
votes
0 answers

sqlpackage publish fails if sqlcmd variable is not provided

I have an SQL project where I need to run certain scripts depending on the value of an SQLCMD variable When I pass the variable on sqlpackage.exe (i.e. /v:var=value) it works as expected, but when I don't pass the variable it fails instead of using…
Mickey Cohen
  • 997
  • 7
  • 23