SQL Change Automation & Deferred Name Resolution
RyanCooper
Posts: 5 New member
With Deferred Name Resolution, T-SQL allows you to create a Stored Procedure which references a table that does not exist.
This is fine in most use cases, but when building a database via SCA, this is not ideal (at least for our purposes). Since the t-sql syntax is valid, no errors are thrown by SCA.
If a user commits a proc which references a non-existing table, I want the build validation to fail. Otherwise, it gives the developer a false sense of security because their build 'passed'.
Has anyone ran into this issue and found a workaround/solution?
Tagged:
Best Answer
-
David Atkinson Posts: 1,458 Rose Gold 2Try running the Invalid Objects SQL Cop check using the tSQLt framework. This check will fail if invalid objects are identified. These docs should help if you intend to run tSQLt tests from SCA.
David Atkinson
Product Manager
Redgate Software
Answers