22,297
社区成员
发帖
与我相关
我的任务
分享createtrigger tr_test
on dbo.testtb
after insert
as
declare @sql nvarchar(max)
declare @dbname varchar(100)
declare @tblname varchar(100)
declare @type varchar(10)
declare @Tsql nvarchar(4000)
declare @PostTime varchar(20)
declare @LoginName varchar(20)
declare @hostname varchar(20)
begin
select @dbname=[dbname],@Tsql=[TSQLCommand],@PostTime=[PostTime],@LoginName=[LoginName],@hostname=[hostname] from inserted
insert into 服务器B.testdb.dbo.testdb([dbname],[TSQLCommand],[PostTime],[LoginName],[hostname])
values(@dbname,@Tsql,@PostTime,@LoginName,@hostname)
end


sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
sp_configure 'Ad Hoc Distributed Queries', 1
GO
RECONFIGURE
GO
[/quote]如果真要配置的話看看下面鏈接吧
我測試是可以的,win7 跟win2003R2
http://blog.163.com/lpw_email/blog/static/962543292010626113041578/
[/quote]
你搜下配置吧,之前弄過
現在我都不用了,用交易複寫,或者直接使用存儲過程代替了
[/quote]
要不把分布式事务打开呢