Network ACL error message: bad argument
I recently ran across this issue with a client that I was working while they were performing DR testing with their physical standbys. I converted their DR databases into snapshot standby mode (11g new feature). Everything was going well until the following errors occurred.
Here were my findings.
When trying to send an email using UTL_MAIL can result in the following error:
Here were my findings.
When trying to send an email using UTL_MAIL can result in the following error:
ORA-29261: bad argument
ORA-06512: at "SYS.UTL_TCP", line 17
ORA-06512: at "SYS.UTL_TCP", line 267
ORA-06512: at "SYS.UTL_SMTP", line 161
ORA-06512: at "SYS.UTL_SMTP", line 197
ORA-06512: at "SYS.UTL_MAIL", line 395
ORA-06512: at "SYS.UTL_MAIL", line 608
This error can result if SMTP_OUT_SERVER is not set as a database parameter or if the SUBJECT parameter in the UTL_MAIL call is omitted.
SQL> sho parameter smtp_out_server
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
smtp_out_server string
If the parameter has no value set, as above, correct this by setting up the email server name as an initialization parameter.
In my case, it was exactly this vs. the subject in the email being missing.
SQL> alter system set smtp_out_server = '<email_server_name>:<port_number>';
After doing this and having client try to reproduce the error, the problem didn't come back.
Hope this helps!
Comments