Home » SQL & PL/SQL » SQL & PL/SQL » UTL_MAIL (oracle 11g , windows os, )
UTL_MAIL [message #607669] Mon, 10 February 2014 18:48 Go to next message
anncao
Messages: 87
Registered: August 2013
Member
I am trying to use utl_mail.send to send an email, but get an error
identifier 'UTL_MAIL.SEND' must be declared

Searched on internet said it may not be installed,
but how can i check if it is installed or not,

I did a query: select * from dba_objects where object_name like 'UTL_%'
I cannot find UTL_MAIL, but there is an UTL_SMTP. (I run this query by using an account which is not dba)
Does that mean, UTL_MAIL is not installed?

And we have to install that?

The other thing I find out in our file system there is a script that sending email for backup notification that is using UTL_MAIL so I suspect it is installed.

Thanks,
Re: UTL_MAIL [message #607670 is a reply to message #607669] Mon, 10 February 2014 19:07 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> show user
USER is "SYS"
SQL> desc sys.utl_mail
PROCEDURE SEND
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SENDER                         VARCHAR2                IN
 RECIPIENTS                     VARCHAR2                IN
 CC                             VARCHAR2                IN     DEFAULT
 BCC                            VARCHAR2                IN     DEFAULT
 SUBJECT                        VARCHAR2                IN     DEFAULT
 MESSAGE                        VARCHAR2                IN     DEFAULT
 MIME_TYPE                      VARCHAR2                IN     DEFAULT
 PRIORITY                       BINARY_INTEGER          IN     DEFAULT
 REPLYTO                        VARCHAR2                IN     DEFAULT
PROCEDURE SEND_ATTACH_RAW
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SENDER                         VARCHAR2                IN
 RECIPIENTS                     VARCHAR2                IN
 CC                             VARCHAR2                IN     DEFAULT
 BCC                            VARCHAR2                IN     DEFAULT
 SUBJECT                        VARCHAR2                IN     DEFAULT
 MESSAGE                        VARCHAR2                IN     DEFAULT
 MIME_TYPE                      VARCHAR2                IN     DEFAULT
 PRIORITY                       BINARY_INTEGER          IN     DEFAULT
 ATTACHMENT                     RAW                     IN
 ATT_INLINE                     BOOLEAN                 IN     DEFAULT
 ATT_MIME_TYPE                  VARCHAR2                IN     DEFAULT
 ATT_FILENAME                   VARCHAR2                IN     DEFAULT
 REPLYTO                        VARCHAR2                IN     DEFAULT
PROCEDURE SEND_ATTACH_VARCHAR2
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 SENDER                         VARCHAR2                IN
 RECIPIENTS                     VARCHAR2                IN
 CC                             VARCHAR2                IN     DEFAULT
 BCC                            VARCHAR2                IN     DEFAULT
 SUBJECT                        VARCHAR2                IN     DEFAULT
 MESSAGE                        VARCHAR2                IN     DEFAULT
 MIME_TYPE                      VARCHAR2                IN     DEFAULT
 PRIORITY                       BINARY_INTEGER          IN     DEFAULT
 ATTACHMENT                     VARCHAR2                IN
 ATT_INLINE                     BOOLEAN                 IN     DEFAULT
 ATT_MIME_TYPE                  VARCHAR2                IN     DEFAULT
 ATT_FILENAME                   VARCHAR2                IN     DEFAULT
 REPLYTO                        VARCHAR2                IN     DEFAULT

SQL> 


Re: UTL_MAIL [message #607683 is a reply to message #607669] Tue, 11 February 2014 01:46 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
utl_mail is not installed by default, you need to run the utlmail.sql and prvtmail.plb scripts.
Re: UTL_MAIL [message #607760 is a reply to message #607683] Tue, 11 February 2014 12:01 Go to previous messageGo to next message
anncao
Messages: 87
Registered: August 2013
Member
How can I check if it is installed or not?
I logined using an account that is not dba or sys, and type describe UTL_MAIL, and it shows object UTL_MAIL does not exist.
Does it mean it is not installed or I have to login as sys to find out, I don't have that account permission right now.
Thanks
Re: UTL_MAIL [message #607764 is a reply to message #607760] Tue, 11 February 2014 12:21 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
anncao wrote on Tue, 11 February 2014 13:01
How can I check if it is installed or not?


Quote:
I did a query: select * from dba_objects where object_name like 'UTL_%'
I cannot find UTL_MAIL, but there is an UTL_SMTP. (I run this query by using an account which is not dba)
Does that mean, UTL_MAIL is not installed?


It should be clear that it is not installed. you will need a DBA to do it for you, or someone with the correct credentials who knows what they are doing.
Re: UTL_MAIL [message #607766 is a reply to message #607764] Tue, 11 February 2014 12:29 Go to previous message
anncao
Messages: 87
Registered: August 2013
Member
Thanks all
Previous Topic: Pragma Autonomous_transaction
Next Topic: Sorting data in Nested table
Goto Forum:
  


Current Time: Fri Apr 26 13:56:18 CDT 2024