SQL Server 2008 DBMAILエラーSP_SEND_DBMAIL - テーブルSYSMAIL_MAILITEMSの「LAST_MOD_USER」にNULL値を挿入できません
-
14-11-2019 - |
質問
私たちのDBMailは誇度になった、そして私は問題を解決しようとしています。
最近SP_SEND_DBMAILを再作成しましたが、テーブルMSDB.DBO.SYSMAIL_MAILITEMSのLAST_MOD_USER列のNULL値に関する奇数エラーが発生していません(エラー515)
解決
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