Sql-server – Linked Server ERROR while trying to insert some rows into remote table

linked-serversql server

I'm trying to insert some rows from local table, to a remote table.

begin distributed tran
begin try
    insert into [ali\servername].[dbname].[dbo].[mytable] select col1, col2 from mytable;
    commit
end try
begin catch
    print 'fail'
    rollback tran
end catch

But I get this error :

OLE DB provider "SQLNCLI11" for linked server "ali\servername" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

I found this article but there is no way to fix problem in SSMS. Anyone can help?

Thanks in advance.

Best Answer

For linked servers you have to executed like this (specify columns you are inserting into):

insert into [ali\servername].[dbname].[dbo].[mytable] 
(col1, col2)
select col1, col2 from mytable;