SSDT includes an Errors and Warnings window that is well worth your attention. Ideally, your project should have no errors or warnings.
However, sometimes coding errors slip in to your project or you get warnings that an object can’t be found because it exists in another database. Sometimes a warning might appear because an object is missing completely, in this project or another one. In these cases, it’s well worth checking this section to find out where you may have some issues.
Warnings are not necessarily a problem. SSDT will bring possible issues to your attention, but warnings will not stop a project from building and publishing unless you have set the option to treat warnings as errors or unless there really is an underlying problem that causes an issue during the publish phase.
For example, if I modify the Person.Address table to add a new column in the code, but forget to add a comma, I’ll get an error something like this.
If you double-click on the line, the editor should open the appropriate file and take you pretty close to your problematic line. Correct the problem, save the file, and move on to the next error.
Some common warnings/errors
4151 – Unresolved database reference. This is often caused when one of the objects in a database references another. This can often be resolved by creating a database reference.
71562 – Unresolved database reference warning.
71502 – Another unresolved database reference warning.
How to globally suppress certain warnings
Right click the root of the project and select properties
Click on the “Build” tab
Enter in the numeric portion of the codes, separated by commas. Remove the “SQL” and any leading zeroes when entering the code.
I’ve been working with SQL Server for quite some time. Along the way, I’ve learned quite a few things and realized that I won’t ever know everything about SQL Server. I intended to keep growing and learning to be able to do my job well and share my experiences with others.
I currently work for a Health-related non-profit based in Boise as a Database Architect.