Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am trying to execute following command from local to truncate table on production

truncate table server1.udupikrishna.dbo.emp1


but it throws :Msg 4701, Level 16, State 1, Line 1 Cannot find the object "emp1" because it does not exist or you do not have permissions. server1 is my linked server.

server1 is my linked server i have setup in local environment.


cant we perform delete operation on linked server.


if it is permisiion issue then from where i can set modification permission to link server ?

ISSUE 2
SQL
declare @NumRow int= 0
select @NumRow =  count(id) from emp
BEGIN TRAN t1
insert into server1.udupikrishna.dbo.emp1 (name) select name from emp
IF (@@ROWCOUNT = @NumRow AND @@ROWCOUNT > 0 )

    BEGIN
    COMMIT TRAN t1
            print 'Inserting Records..'
            delete from emp
    END

ELSE
    BEGIN
        print 'There are not any record to insert..'
        ROLLBACK TRAN t1
    END



Above query return error:


OLE DB provider "SQLNCLI11" for linked server "server1" returned message "The partner transaction manager has disabled its support for remote/network transactions.".
Msg 7391, Level 16, State 2, Line 4
The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "server1" was unable to begin a distributed transaction.
Posted
Updated 27-Mar-13 9:22am
v3
Comments
ZurdoDev 27-Mar-13 13:50pm    
It would appear you do not have permissions.
k@ran 27-Mar-13 14:21pm    
from where i can set modification permission to link server ?
YAIR-I 27-Mar-13 14:47pm    
Which user you use for the connection to the linked server?
It is also possible that your local DB user doesn't have permissions in the linked server.
k@ran 27-Mar-13 14:52pm    
unable to see any user ? Where to find user for linked server ?
Maciej Los 27-Mar-13 14:57pm    

Maciej los' links are quite useful.

You can also try this one : The partner transaction manager has disabled its support for remote/network transactions, which will likely lead you to plenty of relevant facts.
 
Share this answer
 
Comments
Maciej Los 27-Mar-13 15:49pm    
+5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900