Test scalar function with linked server in it
![DavidPaulsen](https://us.v-cdn.net/6029854/uploads/defaultavatar/nZUSABQN8JEE0.jpg)
Hello,
i am faking a table on an external SQL Server (same SQL Server, another Instance) with installed tsqlt Framework, through a linked Server.
I am able to fake the table and insert, update and delete rows to/from it.
Now i am trying to test a scalar Function with the same linked Server in it and the test Fails and i am getting the following errormessage:
Msg 3933, Level 16, State 1, Line 1
Cannot promote the transaction to a distributed transaction because there is an active save point in this transaction.
Question:
Is it possible to test the way i tried? It is very important to test this (and a lot of other) function with the linked Server in it.
It is not possible to Change the linked Server handling right now, because there a lot of Systems (many of them 3rd Party) which are using These functions (and also the linked Server).
Any Suggestion will be appreciated :-)
i am faking a table on an external SQL Server (same SQL Server, another Instance) with installed tsqlt Framework, through a linked Server.
I am able to fake the table and insert, update and delete rows to/from it.
Now i am trying to test a scalar Function with the same linked Server in it and the test Fails and i am getting the following errormessage:
Msg 3933, Level 16, State 1, Line 1
Cannot promote the transaction to a distributed transaction because there is an active save point in this transaction.
Question:
Is it possible to test the way i tried? It is very important to test this (and a lot of other) function with the linked Server in it.
It is not possible to Change the linked Server handling right now, because there a lot of Systems (many of them 3rd Party) which are using These functions (and also the linked Server).
Any Suggestion will be appreciated :-)
Comments
We wrote a Stored Procedure to alter a Function (or Stored Procedure) and replace a search string with a replace string.
So we are able to alter the objects with linked Servers to objects without linked Servers.
The search string is the linked Server and it will be replaced with an empty string.
This is no Problem in Development, because the Databases are on the same SQL Instance.
But we cannot alter the Objects permanently, because in Production the Databases were on different SQL Instances.
I have logged a support ticket for you and will get back to you shortly!
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com