My team/company tried out SSDT for a few small projects and we were quite impressed.
Recently we investigated use of SSDT for one of our larger existing applications and got FLOODED with SQL71501 errors for external database references.
There is quite a web of database coupling for the application, so that is understandable.
Is there some way to suppress/disable/turn off this check so a SSDT project can build regardless of these unresolved references?
Most discussion on this Error Code incorrectly describe it as a warning, not an Error.
Visual Studio 2015 Enterprise - latest SSDT pack
SQL 2008
I was just about to cleanup a few of these in my solution after upgrading to a new version of sql server. I'm on VS2017 but I think this was the same.
If you have database projects in the solution already for the referenced databases, then you can just add database references to the project throwing the errors. If you already have these references, edit the reference properties and set Suppress Reference Warnings to true.
[EDIT: Suppress Reference Warnings seems to have no affect on invalid references.]
If you don't have database projects for the solutions, you will need to add them. You won't necessarily need to fill them in with all of the database object if you check the Suppress Reference Warnings box.
Good luck!
I had success with Visual Studio 2017 by adding the exact warning code against the file that was having the trouble, in my case it was "un resolved reference" I didnt want to add a reference to the master DB to my project.
Right click on File, Properties, Suppress TSql Warnings : 71502
Related
i need you guys help. I added a SQL Server Database to my asp.net project. However when i try to create a new table in the database, the error "An incompatible SQL Server Version was detected" come up.
I tried looking up online for solution and install the SSDT for it however it still do not work. I checked under "Extension and Updates", Microsoft SQL Server Update is not stated there too so I don't know what is going on... please help me experts. Currently using visual studio 2015 community version.
Try this--though it is hard to explain, and the actual details/location of information may vary depending on version, edition, installation, language, phase of the moon, etc. etc.
No guarantee this is your problem, but it--or something similar--is possible.
Open the Properties for the database project
There should be a set of tabs or pages. One of these is "Project Settings"
There should be a dropdown labeled "Target platform
Set this to the version of SQL you have installed/are trying to support.
Attempting to attach a sample screen shot, below
Walking through that... I suspect this might not actually be your problem. Thing is, there are settings and switches similar to this in many places, and one of them is probably what you are looking for. Good luck!
I am using Schema Compare feature in Visual Studio 2017 to compare a database with database project (.sqlproj).
If I apply some changes to the project it also adds blank lines to some of the schema files.
After some investigation I found that I'm not the only one facing this issue. From the number of upvotes I can guess that MS will not fix this issue soon.
Has anyone found any workaround for this?
Not really a workaround or a solution, but I remember having this issue on Visual Studio 2017 and the issue stopped arising when I upgraded to Visual Studio 2019.
You may want to check your error list in Visual Studio. There is a good chance that there are dependent objects (e.g. Users, Logins, Tables, Keys) that the object is dependent on and is missing and not synchronized. If you synchronized those missing object to your database project first it may resolve your issue.
I have a large database project and I am trying to publish it to Azure. I have done the following:
In the project settings, changed Target Platform to Windows Azure
On Azure Made sure I am on Standard tier S0
Made sure the Server Version is V12
Changed the Timeout for the publish
Tried creating a new SQL Server database
All result in a ton of errors a couple of which are:
ForeignKey: [xxxxxx] has an unresolved reference
ROWGUIDCOL is not supported for the targeted platform
I tried searching and tried everything I saw with no luck. Also, I need to be able to publish as things change, so using the migration tool is not an option.
Thank you
Eric
That was correct. I just needed to update my SSDT. I posted this as the answer before, but it never showed up.
Thank you
We have a third-party SQL Server 2008 database that we have extended with our own tables, sprocs, etc. We would like to use a Visual Studio Database Project to manage our extension objects, but NOT the objects that are part of the third-party database.
If I create a project with only our objects in it, when I go to deploy they error out because VS thinks that the tables they are referencing (which are part of the original database) do not exist (because they are not part of the project).
I tried to create a DACPAC for the original database and just reference that, but there are new kinds of objects there, it looks like, which can't be pushed into it. I also have tried to just do a full schema compare and add all the third-party db objects into my project, but there are so many objects it appears to bomb VS. I will try that again today using a local database to see if perhaps there was a network issue contributing to that problem.
I'm not opposed to turning off those kinds of errors, if that is possible. I'd appreciate any suggestions.
So the answer was the DACPAC. I had tried with two different databases, to use the tool that is in the context menu for databases in SSMS, where you Extract a data-tier application, and both those databases failed. Following another post on S.O. I discovered this command-line tool, SqlPackage, that ships with SQL Server 2008. Here is a link that explains how to utilize it. Anyway I ran it against each of those databases and it didn't even hiccup. Nailed them both.
For me the application was located at: C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
After you create the DACPAC files, copy them somewhere in your project, then do "Add Database Reference" either from the project menu or context-menu for the References node in the Solution Explorer. Add the reference, and remove the variable name it gives you. Select "Same Database" in the drop-down and you will see at the bottom what a sample query will look like. Hit OK and it sets it all up for you. All the referential errors disappear. Problem solved.
I have a database project in Visual Studio 2012 that requires access to a database not of my design through a linked server.
My initial approach was to script out the access to the database in 4-parts [server].[database].[schema].[table]. This approach throws SQL71562a and SQL71501 warnings/errors.
Through research I note that what I need to do is to create a database reference. My question would revolve around that process.
I thought the right thing to do would be to generate a DACPAC from the other vendor's database as it exists on the server - but I am unable to generate the DACPAC as it fails in SSMS (I think due to encryption).
My next idea would be to create a project that has the schema that I need from that database defined and then reference that (I haven't tried this yet as at first guess it is probably the wrong way).
Any help on this would be appreciated. Thanks in advance.
SSMS is very pedantic when it comes to extract DACPAC files.
You can however, use the SqlPackage utility for that:
SqlPackage /Action:Extract /SourceServerName:YourServerNameHere /SourceDatabaseName:YourDatabaseNameHere /TargetFile:YourDatabaseNameHere.dacpac
I had an issue just like that, in which this solved it, and documented it in:
http://tangodude.wordpress.com/2014/02/05/referencing-the-sql-server-data-collectors-management-data-warehouse-in-your-ssdt-database-project/
Creating a dummy/stub project does work though, but using a DACPAC file reference is much much simpler.