SQL Server 2008 DBMAIL ERROR SP_SEND_DBMAIL - No se puede insertar el valor nulo en 'last_mod_user' en la tabla syssmail_mailitems

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

Pregunta

Nuestro DBMAIL se husó y estoy tratando de resolver el problema.

Recientemente recreado SP_SEND_DBMAIL, pero no recibe un error impar con respecto a un valor nulo en la columna Last_Mod_User en la tabla msdb.dbo.sysmail_mailitems (error 515)

¿Fue útil?

Solución

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]

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top