Cannot fake function created using WITH SCHEMABINDING
srichmond3000 Posts: 1 New member
in SQL Test
Most of our functions include WITH SCHEMABINDING which causes tests that attempt to fake them to fail with the message ' cannot be renamed because the object participates in enforced dependencies'.
Do you know of any way around this?
0 · Share on Twitter
To be honest, I do not great answer to your question. You may need to post your question on the tSQLt web site - https://tsqlt.org or the tsqlt user group - https://tsqlt.org/join-the-conversation/ .
The actual steps are Stored Procedures that you can copy and edit, which then can be run as a test that you have created.
I suspect the only workaround to your problem, is to edit the Stored Procedure that tests the function or functions, remove the schema binding before the running the test that fakes the function. When the test completes add back the schema binding to the function.
However, I have not tested the above, so please try against a test or development database before implementing any changes.
Senior Product Support Engineer
Redgate Software Ltd
Email: [email protected]