trigger problem on Sql Server with linked server to Oracle
Hi All,
I have a simple insert trigger on Sql Server 2005, it uses linked server to Oracle.
like that ;
**********************
USE [YTM08]
GO
SET QUOTED_IDENTIFIER ON
GO
ANSI_NULLS ON
go
ANSI_WARNINGS ON
CEATE TRIGGER [dbo].[YTM_TBLSTSABIT_I]
ON [dbo].[TBLSTSABIT] FOR INSERT
AS
BEGIN
INSERT INTO YTM_ORACLE..SECTOR.STOCKS
(
stock_name,
stock_code,
insert_date
)
(
SELECT
SBT.STOCKNAME,
SBT.STOCKCODE,
GETDATE()
FROM INSERTED SBT
)
END
***************************
The YTM_ORACLE is a linked server and it's provider is OraOLEDB.Oracle.
Trigger does not works for that linked server but other triggers for local
sql server works fine...
I get this error from sql server
'Heterogeneous queries require the ANSI_NULLS and
ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query.'
Does someone know how to solve this issue the right way?
Thanks in advance.
Thanks !
Adam