OpenRowSet does not delete records in Remote DB

  • Hi All,

    I am trying to execute the following query in SQL SERVER 2012.

    SELECT * FROM OPENROWSET ('SQLNCLI', 'Server=DBName;UID=newuser;PWD=newuser;', 'exec TESTDB.[dbo].[DeleteTableData]')

    I am trying to delete a record from a Remote DB Server. The query gets executed without any issues, but does not delete the record. Also it does not throw an error.

    SP Created:

    CREATE PROCEDURE [dbo].[DeleteTableData]

    AS

    BEGIN

    -- SET NOCOUNT ON added to prevent extra result sets from

    -- interfering with SELECT statements.

    SET NOCOUNT ON;

    delete from [TestDB].[dbo].[Table1] where id=1

    select 1 as iREsult

    END

    Kindly help to resolve this issue.

    Regards,

    Geeta.

  • Seems like no one has an answer for this query. 🙁

    Still waiting for a reply.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply