Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 OpenRowSet does not delete records in Remote DB
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 11/07/2013 :  04:27:51  Show Profile  Reply with Quote
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]
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
delete from [TestDB].[dbo].[Table1] where id=1
select 1 as iREsult


Kindly help to resolve this issue.


Starting Member

15 Posts

Posted - 11/08/2013 :  11:58:45  Show Profile  Reply with Quote
the DB have rights to delete data in that table?
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000