{"id":1621,"date":"2018-06-23T14:11:43","date_gmt":"2018-06-23T14:11:43","guid":{"rendered":"http:\/\/www.theSQLReport.com\/?p=1621"},"modified":"2018-06-23T14:13:20","modified_gmt":"2018-06-23T14:13:20","slug":"msg-14604-level-16-state-1-error-when-changing-a-database-mail-account","status":"publish","type":"post","link":"https:\/\/www.theSQLReport.com\/?p=1621","title":{"rendered":"Msg 14604, Level 16, State 1 Error When Changing A Database Mail Account"},"content":{"rendered":"<p>When attempting to change an email account in my Database Mail, I received the following error:<\/p>\n<p><em>Msg 14604, Level 16, State 1, Procedure sysmail_verify_account_sp, Line 14<\/em><br \/>\n<em> Both account parameters (id and name) cannot be NULL<\/em><\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_update_account_sp_error.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1625 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_update_account_sp_error.jpg\" alt=\"sysmail_update_account_sp error\" width=\"779\" height=\"155\" \/><\/a><\/p>\n<p>The account_id and account_name parameters are required in the sysmail_update_account_sp stored procedure.\u00a0 To find these, I ran the\u00a0sysmail_help_account_sp stored procedure.<\/p>\n<pre>EXEC msdb.dbo.sysmail_help_account_sp;<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1622 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp.jpg\" alt=\"sysmail_help_account_sp\" width=\"817\" height=\"167\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp.jpg 817w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp-300x61.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp-768x157.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp-210x43.jpg 210w\" sizes=\"(max-width: 817px) 100vw, 817px\" \/><\/a><\/p>\n<p>Then I added the missing parameters to the sysmail_update_account_sp stored procedure.<\/p>\n<pre>EXECUTE msdb.dbo.sysmail_update_account_sp \r\n@account_id =\u00a0 &lt; account_id &gt; ,\r\n@account_name = '\u00a0 &lt; name &gt; ',\r\n@email_address = ' &lt; updated email address &gt; ';<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_update_account_sp.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1624 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_update_account_sp.jpg\" alt=\"sysmail_update_account_sp\" width=\"721\" height=\"180\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_update_account_sp.jpg 721w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_update_account_sp-300x75.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_update_account_sp-210x52.jpg 210w\" sizes=\"(max-width: 721px) 100vw, 721px\" \/><\/a><\/p>\n<p>Then I reran the\u00a0sysmail_help_account_sp stored procedure to verify that the e-mail address was updated.<\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp_verify.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1623 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp_verify.jpg\" alt=\"sysmail_help_account_sp to verify\" width=\"879\" height=\"145\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp_verify.jpg 879w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp_verify-300x49.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp_verify-768x127.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2018\/06\/sysmail_help_account_sp_verify-210x35.jpg 210w\" sizes=\"(max-width: 879px) 100vw, 879px\" \/><\/a><\/p>\n<p>Click here for more information on the Microsoft SQL Server stored procedure: <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/system-stored-procedures\/sysmail-update-account-sp-transact-sql?view=sql-server-2017\" target=\"_blank\">sysmail_update_account_sp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When attempting to change an email account in my Database Mail, I received the following error: Msg 14604, Level 16, State 1, Procedure sysmail_verify_account_sp, Line 14 Both account parameters (id &hellip; <a class=\"readmore\" href=\"https:\/\/www.theSQLReport.com\/?p=1621\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1625,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[133,131,132],"class_list":["post-1621","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-server","tag-database-mail","tag-sysmail_help_account_sp","tag-sysmail_update_account_sp"],"_links":{"self":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1621"}],"collection":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1621"}],"version-history":[{"count":5,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1621\/revisions"}],"predecessor-version":[{"id":1630,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1621\/revisions\/1630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/1625"}],"wp:attachment":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}