Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to execute remote stored procs from TST (SQL automation tool)
    primarykey
    data
    text
    <p>I am currently investigating TST (SQL automation test tool) which will faciliate database regression testing. I've been able to create a basic test case, which is below:</p> <pre><code>/* Verification of stored proc - FOH_Status Returns online availabity status for specified date */ /****** Object: StoredProcedure [dbo].[SQLTest_Status] Script Date: 11/23/2011 16:56:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE dbo.SQLTest_Status AS BEGIN ---CREATE A TEMP TABLE CREATE TABLE #ControlValue ( ControlMode TINYINT ) INSERT INTO #ControlValue EXEC dbo.Status 17254, 3 ,'2011-11-20 00:00:00' DECLARE @CONTROL TINYINT SET @CONTROL = (SELECT TOP 1* FROM #ControlValue) EXEC TST.Assert.Equals 'ControlMode enabled for specified date', 1, @CONTRO END GO </code></pre> <p>I then proceed to link to our QA SQL server, which was successful. Then modified the stored procedure to call a stored procedure on the QA SQL server:</p> <pre><code>INSERT INTO #ControlValue EXEC [X.X.X.X].databasename.dbo.Status 17254, 3 ,'2011-11-20 00:00:00' </code></pre> <p>Upon running the test from TST runner will fail with DTC transaction fail message:</p> <blockquote> <p>OLE DB provider "SQLNCLI10" for linked server "X.X.X.X" returned message "The transaction manager has disabled its support for remote/network transactions.".</p> <p>Error: 7391, The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "X.X.X.X" was unable to begin a distributed transaction.</p> </blockquote> <p>I've already confirmed that MS DTC will allow remote connections, inbound and outbound calls on the QA SQL server.</p> <p>In addition, run the stored procedure in query window and returns the correct result set</p> <pre><code>EXEC [X.X.X.X].databasename.dbo.Status 17254, 3 ,'2011-11-20 00:00:00' </code></pre> <p>Any ideas as to how rectify this issue?</p> <p>Should I be modifying the querying to include transaction, since the returned error includes the <strong>'was unable to begin a distributed transaction'</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload