SQL Server 2008 DBMail Error sp_send_dbmail - 테이블에 'last_mod_user'에 null 값을 'last_mod_user'에 삽입 할 수 없습니다. sysmail_mailitems
-
14-11-2019 - |
문제
우리의 dbmail이 hosed되고 문제를 해결하려고합니다.
최근에 sp_send_dbmail을 다시 만듭니다. 그러나 table msdb.dbo.sysmail_mailitem (오류 515)의 last_mod_user 열에 null 값에 관한 홀수 오류가 발생하지 않습니다.
해결책
last_mod_user
in msdb.dbo.sysmail_mailitems
should have a default defined on it. Has that gone missing on your install?
ALTER TABLE [dbo].[sysmail_mailitems] ADD DEFAULT (suser_sname()) FOR [last_mod_user]
다른 팁
Here's my msdb's [sp_send_dbmail] stored proc on PasteBin. Taken from SQL Server 2008 SP1.
The INSERT
statement curiously doesn't include a value for last_mod_user
! Line 364 on PasteBin.
Your error sounds correct; the field last_mod_user
is defined as non nullable.
제휴하지 않습니다 StackOverflow