Sending log files for scheduled jobs as attachment through mail

Hi All,
Can any one please help me out to write a pl/sql program to send log files for scheduled jobs as attachment through mail.
Thanks.

Why would anyone do that as this code has already been posted here a thousand times, it is all over the Internet, and the only thing you need to do is to search for it?
I agree it would cost you some effort, but you are getting paid for it, and we are not getting paid for delivering it on a golden plate on your doorstep, as you can not be bothered to use online resources.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Sending SAP Script output as a PDF attachment through mail

    Dear Guru,
    I am using SAP 4.0B version, DATABASE Oracle 8i, OS is sun solaris 7.5.
    I want to send SAP script output as a
    PDF attachement through mail.Please suggest a solution.
    Regards,
    Rajesh

    Hi Rajesh,
    In your print program, while calling OPEN_FORM, pass options-TDGETOTF = 'X'. This is used for returning print output in OTF format.
    Then in CLOSE_FORM, get the table OTFDATA returned from the function module. for example
    DATA: OTF_DATA LIKE ITCOO OCCURS 0 WITH HEADER LINE.
        CALL FUNCTION 'CLOSE_FORM'
          IMPORTING
            RESULT  = RESULT
          TABLES
            OTFDATA = OTF_DATA.
    now you can convert this OTF data to PDF using function module CONVERT_OTF
    Then send this data as attachment to a mail using function module SO_NEW_DOCUMENT_ATT_SEND_API1
    Regards,
    Komal.

  • Sending a File (XML or TXT) as attachment to Mail Adapter

    Dear all,
    In a scenario I'd like to pull a file by using  'File Adapter' and send it (without content change) as attachment to an Email recipient.
    Is their any possibility to send a file by using Mail Adapter?
    Do you have any similar solution in place, if so could you please share your experiences with me?
    FYI, we are using XI 3.0, SP14.
    I'll appreciate your time.
    Regards,
    K. Afsali

    Hi Afsali,
    //Is their any possibility to send a file by using Mail Adapter
    it is possible.
    There are a few steps to it though. You will have to convert the file you pick up into an XML file as XI can process only XML data.
    After you are done with it, you will have to import a WSDL for sending mails. this WSDL is available on SAP Marketplace and it will have all details like from, to subject,and content. To get this WSDL just check this link,
    https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt
    Just do the mapping of the respective fields and the information mapped to the content field will be passed as the content of the mail.
    Just check thise links out,it will surely help you
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Regards,
    Bhavesh
    Message was edited by: Bhavesh Kantilal

  • (Cisco Historical Reporting / HRC ) All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054

    Hi All,
    I am getting an error message "All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054"  when trying to log into HRC (This user has the reporting capabilities) . I checked the log files this is what i found out 
    The log file stated that there were ongoing connections of HRC with the CCX  (I am sure there isn't any active login to HRC)
    || When you tried to login the following error was being displayed because the maximum number of connections were reached for the server .  We can see that a total number of 5 connections have been configured . ||
    1: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:Current number of connections (5) from historical Clients/Scheduler to 'CRA_DATABASE' database exceeded the maximum number of possible connections (5).Check with your administrator about changing this limit on server (wfengine.properties), however this might impact server performance.
    || Below we can see all 5 connections being used up . ||
    2: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:[DB Connections From Clients (count=5)]|[(#1) 'username'='uccxhrc','hostname'='3SK5FS1.ucsfmedicalcenter.org']|[(#2) 'username'='uccxhrc','hostname'='PFS-HHXDGX1.ucsfmedicalcenter.org']|[(#3) 'username'='uccxhrc','hostname'='PFS-HHXDGX1.ucsfmedicalcenter.org']|[(#4) 'username'='uccxhrc','hostname'='PFS-HHXDGX1.ucsfmedicalcenter.org']|[(#5) 'username'='uccxhrc','hostname'='47BMMM1.ucsfmedicalcenter.org']
    || Once the maximum number of connection was reached it threw an error . ||
    3: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:Number of max connection to 'CRA_DATABASE' database was reached! Connection could not be established.
    4: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:Database connection to 'CRA_DATABASE' failed due to (All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054.)
    Current exact UCCX Version 9.0.2.11001-24
    Current CUCM Version 8.6.2.23900-10
    Business impact  Not Critical
    Exact error message  All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054
    What is the OS version of the PC you are running  and is it physical machine or virtual machine that is running the HRC client ..
    OS Version Windows 7 Home Premium  64 bit and it’s a physical machine.
    . The Max DB Connections for Report Client Sessions is set to 5 for each servers (There are two servers). The no of HR Sessions is set to 10.
    I wanted to know if there is a way to find the HRC sessions active now and terminate the one or more or all of that sessions from the server end ? 

    We have had this "PRX5" problem with Exchange 2013 since the RTM version.  We recently applied CU3, and it did not correct the problem.  We have seen this problem on every Exchange 2013 we manage.  They are all installations where all roles
    are installed on the same Windows server, and in our case, they are all Windows virtual machines using Windows 2012 Hyper-V.
    We have tried all the "this fixed it for me" solutions regarding DNS, network cards, host file entries and so forth.  None of those "solutions" made any difference whatsoever.  The occurrence of the temporary error PRX5 seems totally random. 
    About 2 out of 20 incoming mail test by Microsoft Connectivity Analyzer fail with this PRX5 error.
    Most people don't ever notice the issue because remote mail servers retry the connection later.  However, telephone voice mail systems that forward voice message files to email, or other such applications such as your scanner, often don't retry and
    simply fail.  Our phone system actually disables all further attempts to send voice mail to a particular user if the PRX5 error is returned when the email is sent by the phone system.
    Is Microsoft totally oblivious to this problem?
    PRX5 is a serious issue that needs an Exchange team resolution, or at least an acknowledgement that the problem actually does exist and has negative consequences for proper mail flow.
    JSB

  • Log file in Batch job

    Hi All
    Do we get a log file in Batch job...???
    I mean to say when we schedule a job in SM36 and after the job is run.. do we have a log file to have alook at it??? what does log file contain????
    I am actually downloading a file in Application server.... so wanted to knw what ll the log file be having
    Moderator message: very basic standard functionality, please search for available information and documentation before asking.
    locked by: Thomas Zloch on Aug 27, 2010 12:45 PM

    HI Poonan,
    If u run any program in background it will  log file will contain all the messages  which is occured during the progrm run .
    It may contin SAP standrad messages or else messages form ur custom program.
    e.g beloW
    Date       Time     Message text                                                                                Message class Message no. Message type
    2010/08/17 16:28:24 Job started                                                                                00           516          S
    2010/08/17 16:28:24 Step 001 started (program Z2152_VENDER_DATA, variant y01, user ID 200C212512)             00           550          S
    2010/08/17 16:28:24 Bank MT LBMAMTMT0000 does not exist                                                                     ZMM          202          S
    2010/08/17 16:28:25 Bank MY HBMBMYKL0000 does not exist                                                                     ZMM          202          S
    2010/08/17 16:28:25 Bank MY HBMBMYKL0000 does not exist                                                                     ZCM          202          S
    2010/08/17 16:28:25 Bank TW FCBKTWTP0000 does not exist                                                                     ZCO          202          S
    2010/08/17 16:28:25 Bank TW FCBKTWTP0000 does not exist                                                                     ZCM          202          S
    2010/08/17 16:28:25 Bank TW YYYYYYYYYYYYYYY does not exist                                                                  ZCM          202          S
    Edited by: pravin s. on Aug 27, 2010 12:10 PM

  • Waiting for scheduling job to complete. Job ID...and it never completes

    I have created my first Publication. It's a pretty basic single source document, single Dynamic Recipients list publication.
    When I run it in Test mode (I haven't tried it in non-Test mode yet), the document(s) are never delivered.
    When I view the Log File, everything looks fine. The second and last entry in the log says
    "- The global delivery rule for this publication was met; publication processing will now begin."
    The Status Message I see in the Publication History is:
    "Waiting for scheduling job to complete. Job ID:3,879, name:Unviewed Invoices Report (Copy), kind:CrystalReport in Pending state (FBE 60509) [0 recipients processed.] "  and it never changes. I've tried this several times, creating new publications with the same source documents, and the same thing always happens.
    Any help would be appreciated.

    All of the servers were configured correctly.
    It turned out to be my source document, a report, had some field in it that BOE didn't like.
    I removed a bunch of fields and added them back, one by one, and couldn't make the error occur again.
    Go figure.

  • History report error: | An Exceptional Error occurred. Application exiting. Check the log file for error 5022

    Hi all
    I've got a error msg when try to generate a report using Cisco history report tool:
    Error | An Exceptional Error occurred. Application exiting.  Check the log file for error 5022
    It only happens when choose report template: ICD_Contact_Service_Queue_Activity_by_CSQ_en_us.
    User tried samething on other PC, it working fine.
    only on user' own PC and only choose this report, error appears.
    user runing windows 7 and do not have crystal report installed
    tried reinstalled the software, doesn't work.
    also tried this: (https://cisco-support.hosted.jivesoftware.com/thread/2041254) - doesn't work
    then tried https://supportforums.cisco.com/docs/DOC-6209  - doesn't work
    attached the log file.
    thanks.

    wenqianyu wrote:From the log file:Looks like you get a Login Window.Error message showed up after username/password be enteredThere is an error in the log: Error happened in comparing UCCX version and HRC versionYou may need to do a clean uninstall, download the Historical report from the server, and install it again on the PC.Does this only happen to one PC or to every PC with this application?Wenqian 
    I have completely uninstalled the HRC, and download from server install again -- still doesn't work with exactly same error.
    this matter only happens on this PC, when user try same thing on other PC, it works.
    so i think it not relate to server or account.

  • How to create different log files for different levels

    Hi,
    Can some one please help me with my problem I have here?
    I want to send log data to two diffrent files depending on the logging level such as DEBUG and WARN using the same logger instance.
    How can you configure this in log4j.properties.
    Please post sample code for log4j.properties to achieve this.
    Thanks in advance.
    Anurag SIngh

    Hi,
    I have tried your code. the issue is other log file for error is blank. its not writting log to that file.
    following is the code of my log4j.properties
    Please read the code first
    # Set root logger level to DEBUG and its only appender to A1.
    log4j.rootCategory=DEBUG,A1
    #Appender and its layout for A1
    log4j.appender.A1=org.apache.log4j.FileAppender
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %log4j.appender.A1.Threshold=DEBUG
    log4j.appender.A1.File=./LogonApplication_Debug.log
    log4j.appender.A1.Append=true
    #Appender and its layout for A2
    log4j.appender.A2=org.apache.log4j.FileAppender
    log4j.appender.A2.layout=org.apache.log4j.PatternLayout
    log4j.appender.A2.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %
    log4j.appender.A2.Threshold=ERROR
    log4j.appender.A2.File=./LogonApplication_Error.log
    log4j.appender.A2.Append=true
    In my logger class i have written something like this:
    public static Logger myLogger = Logger.getLogger (LoggerTest.class.getName());
         public static void main(String args[]){
              myLogger.debug("I have logged a debug message");
              myLogger.error("I have logged an error message");
    Issue:
    Now the problem is that it is creating two files specified in the configuration but it is logging messages both the messages debug and error in only ./LogonApplication_Debug.log file.
    Though it is creating the ./LogonApplication_Error.log file, but it is only blank.
    Can you please trace whats missing/wrong.
    Thanks a lot.
    Shanu

  • How to configure IPS 4240 - K9 to send log file to syslog server

    I am looking for the commands in how to configure IPS 4240-k9 to send log file to SYSLOG server. If anybody has or came across similer issue please advice.
    Thanks in advanced.

    Ali -
    I am sorry to tell you, but the Cisco IPS Sensors do not send Syslog messages. Your only options for sending signature event information are:
    SDEE (an TLS Encrypted XML formatted message) the sensor is the SDEE Host and your event receiver (MARS, IME, Intelitactics, etc) is the client.
    SNMP Traps - You need to set the "Action" on each signature you want the sensor to send a trap.
    - Bob

  • Bizzare error message requests me "Select a log file" for .vi

    Hi
    I am getting a very strange pop-up with my vi that requests me to select a log file for the VI.
    If I hit cancel I get the pop-up "Cannot log front panel of vi. there is no log file associated with the vi"
    I don't want a log file. 
    There must be some background setting in the VI that is not in the actually Lab-VIEW code.
    Does anybody know how I can switch this off?
    Many thanks
    Ashley

    Off the top of my head I can only think of one setting that may cause this.  You can set a VI to log its front panel data automatically.  Go to Operate>>Data Logging and check the settings there.    Also look at Operate>>Log at Completion.
    It may also be that you have this set on a subVI, and if so you will see a yellow "halo" around one of your subVIs, meaning you have turned on database access.  You can look in the help for Logging Data>> On the front panel that discusses this behavior.
    If you wrote the VIs and have no idea what I am talking about with the Database Access that is fine, it is not a commonly used feature.
    If none of these help can you attach the VI so we can all see it.

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • LOG FILE for batch scripting in MAXL

    Hello,
    I just wanted to know how to create a LOG FILE for batch scripting.
    essmsh E:\Batch\Apps\TOG_DET\Scripts\unload_App.msh
    copy e:\batch\apps\tog_det\loadfile\gldetail.otl e:\hyperion\analyticservices\app\tog_det\gldetail /Y
    essmsh E:\Batch\Apps\TOG_DET\Scripts\Build_Hier_Data.msh
    REM
    ECHO OFF
    ECHO Loading GL actuals into WFS \ Combined......
    E:\HYPERION\common\Perl\5.8.3\bin\MSWin32-x86-multi-thread\PERL.EXE E:\Batch\Apps\WFS.COMBINED\AMLOAD\WFSUATAMLOAD.PLX
    E:\HYPERION\common\Perl\5.8.3\bin\MSWin32-x86-multi-thread\PERL.EXE E:\Batch\Apps\WFS.COMBINED\AMLOAD\WFSUATAMLOAD.PLX
    Drop object d:\NDM\Data\StampFiles\STAMPLOADBKUP.csv of type outline force;
    Alter object d:\NDM\Data\StampFiles\STAMPLOAD_cwoo.csv of type outline rename to d:\NDM\Data\StampFiles\STAMPLOADBKUP.CSV;
    SET LogFile=E:\Batch\Apps\TOG_DET\Logs.log
    This file does not generate log file can any help me what might be the problem? Even though some of the steps above are not correct it should generate me log file atleast. I need syntax or whatever it is to generate Log file.
    Regards
    Soma

    I wanted to have a logfile of the following batch script regardless of whether the script is running or not.
    essmsh E:\Batch\Apps\TOG_DET\Scripts\unload_App.msh
    copy e:\batch\apps\tog_det\loadfile\gldetail.otl e:\hyperion\analyticservices\app\tog_det\gldetail /Y
    essmsh E:\Batch\Apps\TOG_DET\Scripts\Build_Hier_Data.msh
    REM
    ECHO OFF
    ECHO Loading GL actuals into WFS \ Combined......
    E:\HYPERION\common\Perl\5.8.3\bin\MSWin32-x86-multi-thread\PERL.EXE E:\Batch\Apps\WFS.COMBINED\AMLOAD\WFSUATAMLOAD.PLX
    Drop object d:\NDM\Data\StampFiles\STAMPLOADBKUP.csv of type outline force;
    Alter object d:\NDM\Data\StampFiles\STAMPLOAD_cwoo.csv of type outline rename to d:\NDM\Data\StampFiles\STAMPLOADBKUP.CSV;
    What I really want is I need a log file of the above batch script, how the above scripts are running. I do not care whether they are giving me positive results but I need to know what is happening in logfile. HOw will the log file be generated.
    Regards
    SOma

  • How to create different log files for different users in log4j

    I want to create different logs for different users, using different appenders for each user so that logs are created in his file only.
    Confusion:How to direct them to different files in my logger class

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • How To Generate Debug Log Files for ebs jsp?

    hi   How To Generate Debug Log Files for ebs r12 jsp?
    and where i get the log .please help me thanks!

    Please check following MOS Document
    Oracle Application Server Diagnostic Tools and Log Files in Applications Release 12 (Doc ID 454178.1)

  • Is it possible to create materialized view log file for force refresh

    Is it possible to create materialized view log file for force refresh with join condition.
    Say for example:
    CREATE MATERIALIZED VIEW VU1
    REFRESH FORCE
    ON DEMAND
    AS
    SELECT e.employee_id, d.department_id from emp e and departments d
    where e.department_id = d.department_id;
    how can we create log file using 2 tables?
    Also am copying M.View result to new table. Is it possible to have the same values into the new table once the m.view get refreshed?

    You cannot create a record as a materialized view within the Application Designer.
    But there is workaround.
    Create the record as a table within the Application Designer. Don't build it.
    Inside your database, create the materialized with same name and columns as the record created previously.
    After that, you'll be able to work on that record as for all other within the Peoplesoft tools.
    But keep in mind do never build that object, that'll drop your materialized view and create a table instead.
    Same problem exists for partitioned tables, for function based-indexes and some other objects database vendor dependant. Same workaround is used.
    Nicolas.

Maybe you are looking for