sql - The transaction ended in the trigger the batch has been aborted error -


i new sql dba , error:

the transaction ended in trigger batch has been aborted.

the trigger code:

alter trigger stok_yedek on dbo.[instance - stok (1851)]  insert   begin      insert [egitim_01].dbo.[instance - stok (1851)] (          [parentinstance]          ,[parenttemplateconfigurationitem]          ,[parentconfigurationitem]          ,[baseinstance]          ,[sortorder]          ,[datecreated]          ,[datemodified]          ,[modifiedby]          ,[recyclebin]          ,[archived]          ,[originalinstance]          ,[stok adı (1852)]          ,[stok grup kodu (1993)]          ,[mevcut miktar (1999)]          ,[model no (2001)]          ,[grubu (Özel kod2) (2002)]          ,[İlgili Şirket (2035)]          ,[markası (2036)]          ,[alt grubu (Özel kod3) (2397)]          ,[logo stok kodu (2398)]          ,[depo mevcutu (2487)]          ,[antrepo mevcutu (2488)]          ,[birim (2000)]          ,[new drop down (3931)]          ,[masraf merkezi kodu (3932)]          ,[masraf merkezi kodu (3933)]          ,[tipi (3934)]          ,[soğutma kapasitesi (3935)]          ,[marka (Özel kodu) (4046)]          ,[Özel kod4 (4053)]          ,[Özel kod5 (4054)]          ,[durumu (4247)]          ,[Üretici kodu (4302)]          ,[açıklama-2 (4303)]          )      select i.[parentinstance]          ,i.[parenttemplateconfigurationitem]          ,i.[parentconfigurationitem]          ,i.[baseinstance]          ,i.[sortorder]          ,i.[datecreated]          ,i.[datemodified]          ,i.[modifiedby]          ,i.[recyclebin]          ,i.[archived]          ,i.[originalinstance]          ,i.[stok adı (1852)]          ,i.[stok grup kodu (1993)]          ,i.[mevcut miktar (1999)]          ,i.[model no (2001)]          ,i.[grubu (Özel kod2) (2002)]          ,i.[İlgili Şirket (2035)]          ,i.[markası (2036)]          ,i.[alt grubu (Özel kod3) (2397)]          ,i.[logo stok kodu (2398)]          ,i.[depo mevcutu (2487)]          ,i.[antrepo mevcutu (2488)]          ,i.[birim (2000)]          ,i.[new drop down (3931)]          ,i.[masraf merkezi kodu (3932)]          ,i.[masraf merkezi kodu (3933)]          ,i.[tipi (3934)]          ,i.[soğutma kapasitesi (3935)]          ,i.[marka (Özel kodu) (4046)]          ,i.[Özel kod4 (4053)]          ,i.[Özel kod5 (4054)]          ,i.[durumu (4247)]          ,i.[Üretici kodu (4302)]          ,i.[açıklama-2 (4303)]      inserted        if @@trancount > 0      begin          commit transaction inproc;            -- there no begin tran statement after statement. there no error 266 either.          print 'in proc commit: ' + cast(@@trancount char(1));      end      else          print @@error  end    begin  insert [ramazan_test].[dbo].[stok_yedek] (      [parentinstance]      ,[parenttemplateconfigurationitem]      ,[parentconfigurationitem]      ,[baseinstance]      ,[sortorder]      ,[datecreated]      ,[datemodified]      ,[modifiedby]      ,[recyclebin]      ,[archived]      ,[originalinstance]      ,[stok_adi]      ,[stok grup kodu (1993)]      ,[mevcut miktar (1999)]      ,[model no (2001)]      ,[grubu (Özel kod2) (2002)]      ,[İlgili Şirket (2035)]      ,[markası (2036)]      ,[alt grubu (Özel kod3) (2397)]      ,[logo stok kodu (2398)]      ,[depo mevcutu (2487)]      ,[antrepo mevcutu (2488)]      ,[birim (2000)]      ,[new drop down (3931)]      ,[masraf merkezi kodu (3932)]      ,[masraf merkezi kodu (3933)]      ,[tipi (3934)]      ,[soğutma kapasitesi (3935)]      ,[marka (Özel kodu) (4046)]      ,[Özel kod4 (4053)]      ,[Özel kod5 (4054)]      ,[durumu (4247)]      ,[Üretici kodu (4302)]      ,[açıklama-2 (4303)]      )  select ins.[parentinstance]      ,ins.[parenttemplateconfigurationitem]      ,ins.[parentconfigurationitem]      ,ins.[baseinstance]      ,ins.[sortorder]      ,ins.[datecreated]      ,ins.[datemodified]      ,ins.[modifiedby]      ,ins.[recyclebin]      ,ins.[archived]      ,ins.[originalinstance]      ,ins.[stok adı (1852)]      ,ins.[stok grup kodu (1993)]      ,ins.[mevcut miktar (1999)]      ,ins.[model no (2001)]      ,ins.[grubu (Özel kod2) (2002)]      ,ins.[İlgili Şirket (2035)]      ,ins.[markası (2036)]      ,ins.[alt grubu (Özel kod3) (2397)]      ,ins.[logo stok kodu (2398)]      ,ins.[depo mevcutu (2487)]      ,ins.[antrepo mevcutu (2488)]      ,ins.[birim (2000)]      ,ins.[new drop down (3931)]      ,ins.[masraf merkezi kodu (3932)]      ,ins.[masraf merkezi kodu (3933)]      ,ins.[tipi (3934)]      ,ins.[soğutma kapasitesi (3935)]      ,ins.[marka (Özel kodu) (4046)]      ,ins.[Özel kod4 (4053)]      ,ins.[Özel kod5 (4054)]      ,ins.[durumu (4247)]      ,ins.[Üretici kodu (4302)]      ,ins.[açıklama-2 (4303)]  inserted ins    end

what can do?


Comments