Questions tagged [sql-server-data-project]
24 questions
0
votes
0 answers
How to reference the default SQL instance instead of a linked server for local environment?
At the moment we have multiple databases hosted on the same SQL Server instance, but we want to separate them on a different servers and use them as linked servers (there are views and SPs that are joining tables from different DBs). Locally, for…

amanev
- 1
- 1
0
votes
0 answers
Sharing common SQL tables across different SQL Server Database projects / git repos
What would be the best solution/design for sharing common SQL tables definitions between different projects whilst using SQL Server Database projects deployed as DacPacs?
For example:
Master Project sqlproj
- CommonTable1.sql
Sub Project 1…

Dave Hogan
- 3,201
- 6
- 29
- 54
0
votes
0 answers
How to show detailed diagnostic information when publishing dacpac with dacservices object?
How to show detailed diagnostic information when publishing dacpac with dacservices object?
SqlPackage.exe has a Diagnostics switch for detailed output of the publish operation.
/Diagnostics: /d {True|False} Specifies whether diagnostic…

user5855178
- 567
- 1
- 7
- 17
0
votes
1 answer
Variable History_Retention_Period for SQL Server System Versioned Tables
I want to be able to setup different retention periods for different environments without having a separate script for each environment. I am currently using the SQL Server Database project in Visual Studio and creating a post deployment script to…

The Pax Bisonica
- 2,154
- 2
- 26
- 45
0
votes
0 answers
Visual Studio database project - has an unresolved reference to object
I have imported a database "db_test" from SQL Server to my visual studio database project.
But when I compile this project, there is a lot of warning shown, saying procedure [sp_xxx] has an unresolved reference to object [db_test].[dbo].[table_1].…

indigo indigo
- 11
- 2
0
votes
1 answer
SQL Server Database Project in Visual Studio - how to structure for new database
I want to create a SQL Server database project where a new database is created. Here is the structure of my project :
SQL Server Database Project Structure
Basically, I want 4 tables, so I have added 4 .sql scripts for them.
CREATE TABLE…

GameFromScratch
- 65
- 1
- 9
0
votes
1 answer
Type or namespace definition, or end-of-file expected : in my Data Project - stored procedure
I am updating my VS 2015, ASP.NET MVC project to have a Data Project that holds all my data models/tables, stored procedures, etc.
When I build (or rebuild), I have 1755 errors in this project, all referring to problems I see as "class problems".…

swallis1
- 99
- 1
- 13
0
votes
0 answers
SSDT Generate Script Producing Syntax Error on SET AUTO_CREATE_STATISTICS
I'm using the "Generate Script" feature in SSDT to create a database script. However, the script that is generated has a syntax error, according to SSMS when I execute the script. The code with the error is:
IF EXISTS (SELECT 1
FROM …

Wylice
- 73
- 1
- 4
-1
votes
2 answers
How to run raw SQL to deploy database changes
We intend to create DACPAC files using SQL database projects and distribute them automatically to several environments, DEV/QA/PROD, using Azure Pipeline. I can make changes to the schema for a table, view, function, or procedure, but I'm not sure…

Alvin
- 290
- 5
- 25