SQL Server 2008 DBMAILエラーSP_SEND_DBMAIL - テーブルSYSMAIL_MAILITEMSの「LAST_MOD_USER」にNULL値を挿入できません

StackOverflow https://stackoverflow.com/questions/5021269

質問

私たちの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.

enter image description here

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top