How to Install UTL_MAIL Package in Oracle 11g?

How to Install UTL_MAIL Package in Oracle 11g?

  • SQL
  • 1 min read

Follow these steps to install UTL_MAIL package in Oracle 11g.

  1. Install the UTL_MAIL script as following:
  • In Windows:

Change the path below with your Oracle Home path.

sqlplus sys/syspsw@orcl as sysdba
@C:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlmail.sql
@C:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\prvtmail.plb
  • In Linux:
sqlplus sys/syspsw@orcl as sysdba
@$ORACLE_HOME/rdbms/admin/utlmail.sql
@$ORACLE_HOME/rdbms/admin/prvtmail.plb
  1. Grant the privilege to all the users for UTL_MAIL package.
grant execute on utl_mail to public;

You can give a specific username instead of public. If you will not give the grant on UTL_MAIL package, then you may get the following error:

PLS-00201: identifier 'UTL_MAIL' must be declared

See also: