Mail function in oracle database ?

To activate mail function in oracle database what all procedures or steps needed to be done ?
Regards,
Amit

In oracle 10g you can configure database with EM using dbca, where you can specify SMTP server to enable email notifications.
Check out documentation(Management options while creating database with dbca):
http://download.oracle.com/docs/cd/B19306_01/server.102/b14196/install003.htm#BABJHIFI

Similar Messages

  • ODSI service using function from oracle database

    Hi ,
    I need to create a ODSI service using function from oracle database.
    I am not sure how to create a Physical Layer and Logical Layer using the function fron db.
    Kindly provide a sample . I need It ASAP. Thanks in advance.
    Regards,
    Tara

    Here's what you do.
    Create New Physical Data Service -> Relational -> MyDataSource -> Table -> SomeTable ... finish the wizard.
    So now you have a Physical Data Service that represents a database table.
    Create New Physcial Data Service -> Relational -> MyDataSource (the same one as above) -> Database Function -> Enter UPPER for the Function name, enter MyUpper fro the XQuery Function. Finish the Wizard (use something like MyUpperDs for the ds name).
    Open MyUpperDs. Right-click -> Edit Signature on MyUpper. Change the ReturnType to string, change the Occurrence to Zero or One.
    Add a parameter, change the Type to string, change the Occurrence to Zero or One.
    Save.
    Now, open the first ds you made SomeTable.ds (whatever). Run it in the test view.
    Go to the Overview tab. Create New Operation. Give it the name SOMETABLE_UPPER. Save it.
    Go to the Query Map tab, open SOMETABLE_UPPER. Drag and drop SOMETABLE (the system-generated function into the mapper. It will show a dotted line from SOMETABLE to the Return. Now drag-and-drop the SOMETABLE to the top-level element of the return type, it will show solid lines from each element in SOMETABLE to each element in the return type.
    Now, drag-and-drop MyUpperDs.MyUpper into the Query Mapper. Edit the source, find where it added the line "for $x in myd:MyUpper()" and delete that line.
    Change a line that simply returns a value to use your function, for example, change
    <FIRST_NAME>{fn:data($CUSTOMER/FIRST_NAME)}</FIRST_NAME>
    to
    <FIRST_NAME>{myd:MyUpper(fn:data($CUSTOMER/FIRST_NAME))}</FIRST_NAME>
    Click on the Plan tab and Show Query Plan. You will see that in the query plan, it is using the database UPPER function where you specified MyUpper.
    Go to the Test View and run it.
    I used the RTLCUSTOMER table in cgDataSource
    xquery version "1.0" encoding "UTF-8";
    (::pragma xds <x:xds xmlns:x="urn:annotations.ld.bea.com" targetType="t:CUSTOMER" xmlns:t="ld:physical/CUSTOMER">
    <creationDate>2010-10-14T13:09:54</creationDate>
    <relationalDB name="cgDataSource" providerId="Pointbase"/>
    <field xpath="CUSTOMER_ID" type="xs:string">
    <extension nativeXpath="CUSTOMER_ID" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0" nativeKey="true"/>
    <properties nullable="false"/>
    </field>
    <field xpath="FIRST_NAME" type="xs:string">
    <extension nativeXpath="FIRST_NAME" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="64" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="LAST_NAME" type="xs:string">
    <extension nativeXpath="LAST_NAME" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="64" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="CUSTOMER_SINCE" type="xs:date">
    <extension nativeXpath="CUSTOMER_SINCE" nativeTypeCode="91" nativeType="DATE" nativeSize="10" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="EMAIL_ADDRESS" type="xs:string">
    <extension nativeXpath="EMAIL_ADDRESS" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="TELEPHONE_NUMBER" type="xs:string">
    <extension nativeXpath="TELEPHONE_NUMBER" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="SSN" type="xs:string">
    <extension nativeXpath="SSN" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="16" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="BIRTH_DAY" type="xs:date">
    <extension nativeXpath="BIRTH_DAY" nativeTypeCode="91" nativeType="DATE" nativeSize="10" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="DEFAULT_SHIP_METHOD" type="xs:string">
    <extension nativeXpath="DEFAULT_SHIP_METHOD" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="16" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="EMAIL_NOTIFICATION" type="xs:short">
    <extension nativeXpath="EMAIL_NOTIFICATION" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="NEWS_LETTTER" type="xs:short">
    <extension nativeXpath="NEWS_LETTTER" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="ONLINE_STATEMENT" type="xs:short">
    <extension nativeXpath="ONLINE_STATEMENT" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="LOGIN_ID" type="xs:string">
    <extension nativeXpath="LOGIN_ID" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="50" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <key name="CUSTOMER_0_SYSTEMNAMEDCONSTRAINT__PRIMARYKEY" type="cus:CUSTOMER_KEY" inferredSchema="true" xmlns:cus="ld:physical/CUSTOMER"/>
    </x:xds>::)
    declare namespace myd= "ld:physical/MyDs";
    declare namespace f1 = "ld:physical/CUSTOMER";
    import schema namespace t1 = "ld:physical/CUSTOMER" at "ld:physical/schemas/CUSTOMER.xsd";
    import schema "ld:physical/CUSTOMER" at "ld:physical/schemas/CUSTOMER_KEY.xsd";
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="read" isPrimary="false" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare function f1:CUSTOMER() as schema-element(t1:CUSTOMER)* external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="create" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:createCUSTOMER($p as element(t1:CUSTOMER)*)as schema-element(t1:CUSTOMER_KEY)* external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="update" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:updateCUSTOMER($p as changed-element(t1:CUSTOMER)*) as empty() external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="delete" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:deleteCUSTOMER($p as element(t1:CUSTOMER)*) as empty() external;
    (::pragma function <f:function kind="read" visibility="public" isPrimary="false" xmlns:f="urn:annotations.ld.bea.com"/>::)
    declare function f1:CUSTOMER_UPPER() as element(f1:CUSTOMER)*{
    for $CUSTOMER in f1:CUSTOMER()
    return
    <t1:CUSTOMER>
    <CUSTOMER_ID>{fn:data($CUSTOMER/CUSTOMER_ID)}</CUSTOMER_ID>
    <FIRST_NAME>{myd:MyUpper(fn:data($CUSTOMER/FIRST_NAME))}</FIRST_NAME>
    <LAST_NAME>{fn:data($CUSTOMER/LAST_NAME)}</LAST_NAME>
    <CUSTOMER_SINCE>{fn:data($CUSTOMER/CUSTOMER_SINCE)}</CUSTOMER_SINCE>
    <EMAIL_ADDRESS>{fn:data($CUSTOMER/EMAIL_ADDRESS)}</EMAIL_ADDRESS>
    <TELEPHONE_NUMBER>{fn:data($CUSTOMER/TELEPHONE_NUMBER)}</TELEPHONE_NUMBER>
    <SSN?>{fn:data($CUSTOMER/SSN)}</SSN>
    <BIRTH_DAY?>{fn:data($CUSTOMER/BIRTH_DAY)}</BIRTH_DAY>
    <DEFAULT_SHIP_METHOD?>{fn:data($CUSTOMER/DEFAULT_SHIP_METHOD)}</DEFAULT_SHIP_METHOD>
    <EMAIL_NOTIFICATION?>{fn:data($CUSTOMER/EMAIL_NOTIFICATION)}</EMAIL_NOTIFICATION>
    <NEWS_LETTTER?>{fn:data($CUSTOMER/NEWS_LETTTER)}</NEWS_LETTTER>
    <ONLINE_STATEMENT?>{fn:data($CUSTOMER/ONLINE_STATEMENT)}</ONLINE_STATEMENT>
    <LOGIN_ID?>{fn:data($CUSTOMER/LOGIN_ID)}</LOGIN_ID>
    </t1:CUSTOMER>
    xquery version "1.0" encoding "UTF-8";
    (::pragma xfl <x:xfl xmlns:x="urn:annotations.ld.bea.com">
    <creationDate>2010-10-14T13:10:45</creationDate>
    <customNativeFunctions>
    <relational>
    <dataSource>cgDataSource</dataSource>
    </relational>
    </customNativeFunctions>
    </x:xfl>::)
    declare namespace f1 = "ld:physical/MyDs";
    (::pragma function <f:function visibility="protected" kind="library" isPrimary="false" nativeName="UPPER" xmlns:f="urn:annotations.ld.bea.com">
    <nonCacheable/>
    </f:function>::)
    declare function f1:MyUpper($arg0 as xs:string?) as xs:string? external;
    <cus:CUSTOMER xmlns:cus="ld:physical/CUSTOMER">
    <CUSTOMER_ID>CUSTOMER1</CUSTOMER_ID>
    <FIRST_NAME>JACK</FIRST_NAME>
    <LAST_NAME>Black</LAST_NAME>
    <CUSTOMER_SINCE>2001-10-01</CUSTOMER_SINCE>
    <EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
    <TELEPHONE_NUMBER>2145134119</TELEPHONE_NUMBER>
    <SSN>295-13-4119</SSN>
    <BIRTH_DAY>1970-01-01</BIRTH_DAY>
    <DEFAULT_SHIP_METHOD>AIR</DEFAULT_SHIP_METHOD>
    <EMAIL_NOTIFICATION>1</EMAIL_NOTIFICATION>
    <NEWS_LETTTER>0</NEWS_LETTTER>
    <ONLINE_STATEMENT>1</ONLINE_STATEMENT>
    </cus:CUSTOMER>
    .

  • Send mail from my oracle database

    I want to send mail from my oracle database.
    I have followed the steps below:
    1> Run utlmail.sql & prvtmail.plb
    2>set smtp_out_server parameter
    3>To send mail, execute utl_mail.send(sender=>'',recipients=>'',message=>'ABC');
    My concept is to provide smtp/mail server ip & port in smtp_out_server parameter's value.
    But One person said that oracle database server can make itself as a smtp server.So that we can assign database server ip & port in smtp_out_server parameter's value.We have to just on the smtp service in oracle database itself.There is no requirement of smtp/mail server ip & port.Is it true?How can we do that?
    In google to Add an SMTP Service,the document said in the 1st line that on the Services tab on the left, select a Process tree node (for example, the default Oracle Enterprise Gateway).
    I am sorry to say that I did not find that.Anyone can help me please?
    Please reply anyone.

    979620 wrote:
    But One person said that oracle database server can make itself as a smtp server.So that we can assign database server ip & port in smtp_out_server parameter's value.We have to just on the smtp service in oracle database itself.There is no requirement of smtp/mail server ip & port.Is it true?How can we do that?Not true - I cannot recall ever seeing a native service in the Oracle database that acts as a SMTP server.
    PL/SQL code can only create and use tcp client sockets via UTL_TCP. A tcp server socket is needed for a SMTP server.
    The Oracle database also does not listen and accept incoming client tcp connections - the Oracle Listener does that (separate process/layer).
    The Oracle database instance registers the services it has available with the Listener. There are 3 basic type of services that the instance will register:
    - dedicated services (supporting Oracle client connections)
    - dispatchers for shared services (supporting Oracle client connections)
    - http/ftp services (supporting XMLDB WebDav, WebService and EPG servlets access for web based clients)
    There is no support for a SMTP service.
    You can install SMTP server s/w on the same platform as the Oracle server s/w. You may even (via Oracle Collaboration services I think) use the Oracle database for mail drops and mail boxes (storage). But I have not yet seen an actual SMTP server running as PL/SQL or Java code inside a database instance as a database server process.

  • Calling SQL Server Function from Oracle Database link

    Hi ,
    i have some data from a old SQL server i would i can access with a database link but i cant call function from my database link.
    i would like to do something like
    @SPAN_PROD = Database link
    _EnerttObtApReelBassSys is a Table function from my SQL server
    SELECT *
    FROM "_EnerttObtApReelBassSys('20120504',4,1)"@SPAN_PROD
    WHERE DateEffectiveDebut <= GetDate()
    AND DateEffectiveFin > GetDate()
    any help ?
    Thnx

    951879 wrote:
    I have a SP in SQL Server which will return a Result Set.
    My requirement is to call that procedure in ORACLE using DB Link and insert that resultset(Data) in the temp table.First you need to setup Oracle to SQL Server connectivity. To do that you can either use HS - heterogeneous connectivity which comes for free or use Oracle Transparent Gateway which is not free. HS uses ODBC, so if your Oracle database in not on windows, you'll have to get ODBC SQL Server driver for Unix/Linux (e.g. from EasySoft). Since SQL Server selecting from table function syntax is different from Oracle's you will have to, if you use HS, to use DBMS_HS_PASSTHROUGH package. I never worked with Oracle Transparent Gateway to SQL Server, so I don't know if and how it supports selecting from SQL Server table function.
    SY.

  • Availability of stdnormal_inv  PL/SQL function in Oracle Database

    I am in need of stdnormal_inv statistical function to calculate the Quantile of Standard Normal Distribution for safety stock computation in MRP module.
    If anyone knows whether any pl/sql code exists to compute stdnormal_inv, please help me with the information. We are using Oracle 7.3.3 database.
    Many Thanks,
    Ravi.

    You can use the UTL_FILE package.
    In order to access directories on your database server you must
    enable the access in the INIT.ORA file with one or more utl_file_dir entries.
    HTH, Robert

  • Compiling WM_CONCAT function in Oracle database

    There is something that I wanted to know about Wm_concat. I read it one of the posts across the forum, that wm_concat, being a non-documented function, isn't installed in a particular database and user can possibly install it later(wm_concat fucntion not wrking in 11g...
    I came across another post that had some source code for doing the same(wm_concat fucntion not wrking in 11g...
    code:
    SQL> CREATE OR REPLACE
    type WM_CONCAT_IMPL wrapped
    a000000
    1
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    d
    270 160
    bg9hz+fBwa888VEZGViHFs/oOP0wg433f64df3QCWE7VehmhTFcUe3y+JrsniV3cSuvmnE3g
    Y93dtR+cCsU1N+UQDGbtzhCf2HIdr8lPzfgF2bmCTvmGlHQbTAjTftNrDq3p093ncwb32OyX
    3ZFDTeH2jpjm3uWYyT8kZBfJIYxRwgLfRApoW32cpy0eRnvDBt2XfTAMXKCSNnqSoTiGA83W
    6deKW+rWyBu9L/EPyFkmQZeBncNsiNDF8fa1Sm6vdQiEanlCQnaPJ11a0na8hK6psDSaey+x
    fdMupCwSvg6gMrSV4QCguhOCqW2AmxRVMqpXJootPpTBxBFZc7hORGbriUI=
    Type created.
    SQL> CREATE OR REPLACE function wm_concat wrapped
    a000000
    1
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    abcd
    8
    58 96
    CuW1MAfZPVR6NOnXKVmXY2o9pswg8eZgcfLCNLXhZy8K7/cgzcVrPnfMPnx3TAM7h0ZSXD
    j57Asr2ym9ZtFldFmFu+RdpAU8VGORKSvtVG+DmAOR4C+NTa+Pit2kDbEpI5zhZUgqameSkE
    DQ==
    Function created.
    I wanted to know, if this solution of compiling the above code works well. Also, iis wm_concat not supported in 11g?

    WM_CONCAT is still an undocumented function and shouldn't be used. If you're on 11g then you can use the new (and supported) LISTAGG function which works better anyway.
    DO NOT USE undocumented functionality, even if you've obtained the wrapped source code for it (how do you know that's not some fake code someone's wrapped that could cause malicious damage?)
    Even Tom Kyte tells you not to use undocumented functions such as WM_CONCAT
    Re: DISTINCT not working with  wmsys.wm_concat

  • SMTP service on in oracle database to send mail directly from oracle databa

    I want to send mail from my oracle database.
    I have followed the steps below:
    1> Run utlmail.sql & prvtmail.plb
    2>set smtp_out_server parameter
    3>To send mail, execute utl_mail.send(sender=>'',recipients=>'',message=>'ABC');
    My concept is to provide smtp/mail server ip & port in smtp_out_server parameter's value.
    But One person said that oracle database server can make itself as a smtp server.So that we can assign database server ip & port in smtp_out_server parameter's value.We have to just on the smtp service in oracle database itself.There is no requirement of smtp/mail server ip & port.Is it true?How can we do that?
    In google to Add an SMTP Service,the document said in the 1st line that on the Services tab on the left, select a Process tree node (for example, the default Oracle Enterprise Gateway).
    I am sorry to say that I did not find that.Anyone can help me please?
    Please reply anyone.
    Edited by: 979620 on Feb 6, 2013 3:20 AM

    Hi Richa:
    As you mentioned, it has been working for the last six moneth. Was there any changes before it stopped working?
    Also you mentioned you were able to recieve mails from Domain user. Could you please get the Internet Headers: Open a mail from domain sender -> file ->property -> Internet Headers, send it with a mail to me:[email protected]
    Meanwhile, as this is a Office 365 related issue, it is better to post your quesetion in
    this forum. Thank you.

  • How to send mails from Oracle database

    Hi All,
    I want to send a mail from my oracle database once my store
    procedure runs successfully or fails.
    How can i do this.
    what are the preliminary modules of Oracle which need to be
    active for me to do so.
    If any once can also mention about any links that give
    information about the same it will be very helpful for me.
    Thanks and Regards
    Srinivas Chebolu

    CREATE OR REPLACE PROCEDURE SEND_MAIL_TCP(
    msg_from varchar2 := '[email protected]',
    msg_to varchar2,
    msg_subject varchar2 := 'E-Mail message from your database',
    msg_text varchar2 := '' )
    IS
    c utl_tcp.connection;
    rc integer;
    BEGIN
    c := utl_tcp.open_connection('1.17.0.218', 25); -- open the SMTP
    port 25 on local machine
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'HELO localhost');
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'DATA'); -- Start message body
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
    rc := utl_tcp.write_line(c, '');
    rc := utl_tcp.write_line(c, msg_text);
    rc := utl_tcp.write_line(c, '.'); -- End of message body
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    rc := utl_tcp.write_line(c, 'QUIT');
    dbms_output.put_line(utl_tcp.get_line(c, TRUE));
    utl_tcp.close_connection(c); -- Close the connection
    EXCEPTION
    when others then
    raise_application_error(-20000,'Unable to send e-mail message
    from pl/sql');
    END;
    show errors
    exec send_mail(msg_to =>'[email protected]');
    exec send_mail(msg_to
    =>[email protected]',msg_text=>'Look Yaar, I can send
    mail from plsql');

  • Raw to date function in oracle

    Hi..
    I would like to know the details and usage of Raw to date function in oracle database.Could some one let me know the function details?

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> set serveroutput on
    SQL> DECLARE
      2   rv RAW(32) := '786B060818023A';
      3   dt DATE := NULL;
      4  BEGIN
      5    dbms_stats.convert_raw_value(rv, dt);
      6    dbms_output.put_line(TO_CHAR(dt, 'DD-MON-YYYY'));
      7  END;
      8  /
    08-JUN-2007
    PL/SQL procedure successfully completed.
    SQL>Regards,
    Jo
    PS: This is not my own example. I don't recollect the link I got this example from. Will post the link if I come across it again. I think its www.psoug.org (not sure)

  • Outlook lookup Oracle database

    Hi,
    I there a way that Outlook client mail to lookup Oracle database and retrieve into GAL, or Contacts, or another folder a set of names and email addresses from the database?
    Thanks,
    Monica

    Hi, Tomas -
    Welcome to Apple's Discussions.
    Outlook Express expects its database files to be in one of two places.
    In cases where an older version of OE was updated to 5.x, they may be in an Identities folder in the Outlook Express application folder (where the older versions kept them).
    Otherwise, OE expects them to be here - (hard drive) >> Documents >> Microsoft User Data >> Identities. In the Identities folder should be at least one folder, Main Identity - that's the default account (identity). If additional accounts have been made, there will be additional folders in the Identities folder, one for each account.
    OS 9 does not like having the Documents folder inside any other folder, and will usually create a new Documents folder if an existing one has been moved elsewhere.
    If OS 9 has created a new Documents folder, move the Microsoft User Data folder into it. Any folder by the same name in the new Documents folder should not contain any old info, so replacing it should not cause any problems.
    If OS 9 did not create a new Documents folder, try moving the old one out of the Utilities folder, so that the Documents folder is at the root level of the drive (same level as the System Folder and the Applications (Mac OS 9) folder). Then restart, and try OE again.
    You may need to rebuild the desktop - not a bad thing to do when a lot of files have been moved around, or after installing a bunch of stuff.
    Note - although OS 9 and many of its programs (MS apps, AppleWorks, etc.) use the Documents folder for some of their support files, you do not need to use that folder for the documents you create.

  • What is the logic behind the oracle database connections....

    Hi,
    We have crontab alerts are enabled for the oracle database client connection.
    For Production databases the alerts are coming continuously until it gets connected.
    For QA databases it will throw the message that the oracle client connection fails and again it will prompt whenever it gets connected.
    Please let me know the logic behind these scnerions.
    Pavan..
    Edited by: dm_ptldba on Feb 14, 2012 6:45 AM

    Hi,
    Thanks for the update, Sorry the question was not clear. let me put it in a clear way.
    Following is our crontab which alerts us if any database/listener goes down. But it alerts us only once for one successful/unsuccessful connection. For Eg: If the crontab not able to connect to the database for once then it throws an alert only once and waits for a successful connection.
    I would like to change the logic in this crontab in such a way that, it should keep on alerting us for all the unsuccessful connections and once or twice for successful connection.
    . /home/oracle/.bash_profile
    . /opt/oracle/cron/cron_email
    sidfile=/home/oracle/scripts/db-list.txt
    dboutfile=/home/oracle/scripts/dboutfile.tmp
    echo $ORACLE_HOME
    TNS_DIR=$ORACLE_HOME/network/admin
    ORA_BIN=$ORACLE_HOME/bin
    cat $sidfile | while read SIDNAME
    do
    $ORA_BIN/sqlplus -s system/******@$SIDNAME 2> /dev/null >> $dboutfile <<EOF
    @/home/oracle/scripts/db_up.sql
    EOF
    if [ $? -eq 0 ]
    then
    STATUS=1
    if [ -f /home/oracle/scripts/${SIDNAME}-down.txt ]
    then
    /bin/mail -s "Alert :Oracle database instance \"${SIDNAME}\" is up & connected..." [email protected] </dev/null
    rm -rf /home/oracle/scripts/${SIDNAME}-down.txt
    fi
    else
    if [ -f /home/oracle/scripts/${SIDNAME}-down.txt ]; then
    echo "";
    else
    touch /home/oracle/scripts/${SIDNAME}-down.txt
    echo ${SIDNAME} "not Connected ..."
    /bin/mail -s "Alert :Oracle database instance \"${SIDNAME}\" is down......" [email protected] </dev/null
    fi
    fi
    done
    Thank you.
    PTLDBA

  • Database Aggregate Functions and Oracle Discoverer

    Hello Guys.
    There are a lot of aggregate function inside the database, unfortunatelly some of them are not directly accesible from Oracle Discoverer.
    For example :
    STATS_BINOMIAL_TEST
    STATS_CROSSTAB
    STATS_F_TEST
    STATS_KS_TEST
    STATS_MODE
    STATS_MW_TEST
    STATS_ONE_WAY_ANOVA
    STATS_T_TEST_*
    STATS_WSR_TEST
    What is the best way to incorporate this kind of function in Oracle Discoverer ?
    Thanks
    Ramiro Ortiz Rios

    While Discoverer today is unable to recognize these Oracle Database functions, we are looking at adding this capability into the product. If you think this is important, please take the poll at http://oraclebi.blogspot.com/2006/04/must-have-in-discoverer.html
    Also, if you can spare a few minutes, do send me a mail at abhinav.oracle at gmail.com with a brief description of a use case that describes where and how these functions would be used.
    Thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    Documentation: http://docs.oracle.com/
    Oracle BI Suite EE: http://www.oracle.com/technology/products/bi/enterprise-edition.html
    Oracle BI Suite SE: http://www.oracle.com/technology/products/bi/standard-edition.html
    Oracle BI Suite SE One: http://www.oracle.com/technology/products/bi/standard-edition-one.html
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    BI Blog: http://oraclebi.blogspot.com/
    Blogs: http://blogs.oracle.com/

  • Sending a mail from oracle database

    Hi,
    I have a requirement to send a mail from oracle database.I use UTL_TCP package for this.Although my procedure is executed successfully,i dont get the mails in my inbox.Please help me to figure out a solution.
    Thanks in advance....

    Hi, you must use UTL_SMTP package for send emails, it has more performance and features for debug. You must look the next code, this is a example for send emails.
    DECLARE
    c UTL_SMTP.CONNECTION;
    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
    END;
    BEGIN
    c := UTL_SMTP.OPEN_CONNECTION('smtp-server.acme.com');
    UTL_SMTP.HELO(c, 'foo.com');
    UTL_SMTP.MAIL(c, '[email protected]');
    UTL_SMTP.RCPT(c, '[email protected]');
    UTL_SMTP.OPEN_DATA(c);
    send_header('From', '"Sender" <[email protected]>');
    send_header('To', '"Recipient" <[email protected]>');
    send_header('Subject', 'Hello');
    UTL_SMTP.WRITE_DATA(c, UTL_TCP.CRLF || 'Hello, world!');
    UTL_SMTP.CLOSE_DATA(c);
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    BEGIN
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN UTL_SMTP.TRANSIENT_ERROR OR UTL_SMTP.PERMANENT_ERROR THEN
    NULL; -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The QUIT call will raise an
    -- exception that we can ignore.
    END;
    raise_application_error(-20000,
    'Failed to send mail due to the following error: ' || sqlerrm);
    END;
    Also review the next link for get more information about the UTL_SMTP packege.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_smtp.htm#sthref15587
    Regards.

  • How to Oracle Database Function in OBIEE Administration Tool

    Hi All,
    I want to use a Oracle Database Function in as a column in OBIEE (BM, Presentation Model). Can anybody has done this inOBIEE. Any pointers to this is much appreicated.
    Thanks,

    Hi user7417334,
    You cannot use any formulas in the presentation layer (not that I know of). But you can definitely use oracle database functions in the BMM layer.
    You want to use the EVALUATE function. It works like this:
    e.x. EVALUATE( 'TO_DATE(%1,%2)' AS DATE, '12/31/2009', 'MM/DD/YYYY')
    Generic Version: EVALUATE( '<FUNC>' AS <DATATYPE>, VALUE1,VALUE2,etc)
    FUNC) Is the syntax for the function you are calling. Any parameters have to be replaced by %<number>, where number refers to the order in which you specify your parameters.
    DATATYPE) The datatype that the function will evaluate to. In this case, DATE.
    VALUE1) The latter part of the formula is a comma separated list of all the parameters used in the function. In this case, it's the date I want to cast
    VALUE2) This is the second parameter. You need as many as you referenced in your function. In this case, it's the date format.
    Good luck and if you found this post useful, please award points!
    best regards,
    -Joe

  • How to send a mail automatically based on a date from ORACLE database

    Hi,
    I want to send a mail automatically based on a date from ORACLE database.
    Please help me.
    thanks
    --Sara                                                                                                                                                                                                                                   

    programs are available on net to send mail directly from oracle ie procedure s in oracle sending mails

Maybe you are looking for

  • Added music not showing up in iTunes library

    I recently bought a cd online and I tried to add it to my library. I tried it like three times, the music isn't showing up there. When I go to the "recently added" playlist, I can see the music there and it's also on my iPod, but it's nowhere to be f

  • Queries on multiple worksheets.

    dear all, i have a requirement which i have to create multiple queries and load them on to different worksheets. I also have a main worksheet that is predefined by the customer and that worksheet will either do a VLOOKUP or HLOOKUP to get the values

  • 17834839: ERROR BUILDING BPM PROJECT IN JDEVELOPER

    Hi,      I am facing this issue, in one of the blog i found that we need to apply the below patch to resolve the issue. But when i try to apply the patch i am getting below conflict . Kindly do the needful. Patch Path: https://support.oracle.com/epmo

  • I cant open my email and also can't open my calendar

    I need help my son was on my computer and now I can not open my mail or calendar. The icons are gone i need help thank you

  • JBUILDER5 :"sample.java": Error #: 750 : initialization error: com.borland"

    Hi there, I am trying to compile a few sample with new release of jdk1.4.0. It does with DOS-Promt. I get an error like ""sample.java": Error #: 750 : initialization error: com.borland.compiler.symtab.LoadError: class file has wrong version 48.0" whe