The steps to create a link database are not repeated here, and there are materials in many places! Create Trigger TransferMtmessage ON [DBO]. [T_DWS_MT_MESSAGE] for Insertas
- You must set this selection item, otherwise OLE DB error tracking - [OLE / DB Provider 'MSDara' ItrarsactionLocal :: StartTransaction Returned 0x8004D013: Isolevel = 4096 - Solve the trigger reference for heterogeneous servers Reference: http: // support .microsoft.com / default.aspx? scID = Kb; EN-US; 280106 SET XACT_ABORT ON
Declare @seq int declare @LINKID VARCHAR (20) DECLARE @MOBILE VARCHAR (20) - Step1: NEXTVAL SELECT @ seq = (Select * from OpenQuery "from Oracle Database SELECT SEQ.NEXTVAL from DUAL ')))
--Step2: Get a new inserted data Select @ linkid = linkid from inserted select @ Content = SMS_CONTENT from InsertED SELECT @ Mobile = MT_MOBILE from Inserted
--Step3: Write the data into the Oracle Database Insert Into [Hailine]. [Hailine]. [MTMSGID, MTMOBILE, SPFLAG) VALUES (@seq, @Mobile, SPFLAG). @Content, @ linkid, 0, null, null
--STEP4: Delete Local SQLServer downlink information delete from t_dws_mt_message where id in (Select ID from inserted)
Return