local server 에서
update a set col1 = 'A' from [remote].dbo.db_name.table1 where col2 = 123
을 날리면
remote 서버와의 통신상태가 좋지 않을 경우 OLEDB 대기가 걸릴 수 있다.
OLEDB대기는 local server에서
select * from master..sysprocesses where spid > 50 and waittime > 0
으로 확인가능하며, 이때 waittype은 OLEDB, waitresource 는 remote(SPID:xx) 와 같은 형식으로 나오게 된다. 잽싸게 remote 로 들어가서
select * from master..sysprocesses where spid = xx
dbcc inputbuffer(xx)
dbcc inputbuffer(xx)
를 해보자. 블러킹이 걸렸을 수도 있는데, 이럴때는 블러킹 해결하면 되고 sp_cursorfetch;1 이라고 나오는 경우가 있다. 이거는 remote 연결에서 server cursor 를 쓴다는 의미이다.
(참조) http://www.dbguide.net/know/know101003.jsp?&catenum=14&IDX=542
local server에서 remote로 바로 update를 날리지 말고 remote 에 sp 를 만들어두고 그걸 호출하도록 하자. 아, 물론 remote에 대해서 rpc in, rpc out 설정이 되어 있어야 된다.
Posted by maceo

