For testing purposes, I am creating a user-defined table type and then use it to pass some testing data in a table-valued parameter to a query. However, if I do so in the same transaction, I always get a deadlock error. Unfortunately, I need to do them in the same transaction so that I can rollback the tests' side-effects.
Any suggestions or work-arounds?