다음 쿼리를 사용하고 있습니다.openquery가 끝나면 롤백됩니다.
를하지만 통화가 완료되면 내 데이터베이스를 확인 갈 때, 기록이 더 이상 없다 : 나는 쿼리 내에서 선택을 수행 할 때
select * from OPENQUERY(EXITWEB,N'SET NOCOUNT ON;
declare @result table (id int);
insert into [system_files] ([is_public], [file_name], [file_size], [content_type], [disk_name], [updated_at], [created_at])
output inserted.id into @result(id)
values (N''1'',N''7349.jpg'',N''146921'',N''image/jpeg'',N''5799dcc8a1eb1413195192.jpg'',N''2016-07-28 10:22:00.000'',N''2016-07-28 10:22:00.000'')
declare @id int = (select top 1 id from @result)
select * from system_files where id = @id
insert into linkToExternal (id, id_ext) values(@id, 47)
--select @id
')
그것은 잘 작동합니다 .
그래서 트랜잭션이 롤백되는 것으로 의심됩니다. 내 질문은 : 왜. 이 경우 트랜잭션을 롤백하지 못하게하려면 어떻게해야합니까?