Writing to log from proc

Dear All,
I am having a proc where I am inserting some rocords and updating some.
There will be some records which could not be done either because of length.
I want to insert them into bad or log file.
How can I do it?
Thanks.

817269 wrote:
Dear All,
I am having a proc where I am inserting some rocords and updating some.
There will be some records which could not be done either because of length.
I want to insert them into bad or log file.
How can I do it?
Thanks.Below you can find a blog post of mine where I show how to use UTL_FILE
http://kamranagayev.wordpress.com/2009/02/23/using-oracle-utl_file-utl_smtp-packages-and-linux-shell-scripting-and-cron-utility-together-2/

Similar Messages

  • How to write to windows event logs from determinations-server under IIS

    This is just an FYI technical bit of information I wish someone had shared with me before I started trying to write OPA errors to the windows event log... Most problems writing to the windows event log from log4net occur because of permissions. Some problems are because determinations-server does not have permissions to create some registry entries. Some problems cannot be resolved unless specific registry entry permissions are actually changed. We had very little consistency with the needed changes across our servers, but some combination of the following would always get the logging to the windows event log working.
    To see log4net errors as log4net attempts to utilize the windows event log, temporarily add the following to the web.config:
    <appSettings>
    <!-- uncomment the following line to send diagnostic messages about the log configuration file to the debug trace.
    Debug trace can be seen when attached to IIS in a debugger, or it can be redirected to a file, see
    http://logging.apache.org/log4net/release/faq.html in the section "How do I enable log4net internal debugging?" -->
    <add key="log4net.Internal.Debug" value="true"/>
    </appSettings>
    <system.diagnostics>
    <trace autoflush="true">
    <listeners>
    <add
    name="textWriterTraceListener"
    type="System.Diagnostics.TextWriterTraceListener"
    initializeData="logs/InfoDSLog.txt" />
    </listeners>
    </trace>
    </system.diagnostics>
    To add an appender for the windows event viewer, try the following in the log4net.xml:
    <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
    <param name="ApplicationName" value="OPA" />
    <param name="LogName" value="OPA" />
    <param name="Threshold" value="all" />
    <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
    <levelMin value="WARN" />
    <levelMax value="FATAL" />
    </filter>
    </appender>
    <root>
    <level value="warn"/>
    <appender-ref ref="EventLogAppender"/>
    </root>
    To put the OPA logs under the Application Event Log group, try this:
    Create an event source under the Application event log in Registry Editor. To do this, follow these steps:
    1.     Click Start, and then click Run.
    2.     In the Open text box, type regedit.
    3.     Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application
    4.     Right-click the Application subkey, point to New, and then click Key.
    5.     Type OPA for the key name.
    6.     Close Registry Editor.
    To put the OPA logs under a custom OPA Event Log group (as in the demo appender above), try this:
    Create an event log in Registry Editor. To do this, follow these steps:
    1.     Click Start, and then click Run.
    2.     In the Open text box, type regedit.
    3.     Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
    4.     Right-click the eventlog subkey, point to New, and then click Key.
    5.     Type OPA for the key name.
    6.     Right-click the new OPA key and add a new DWORD called "MaxSize" and set it to "1400000" which is about 20 Meg in order to keep the log file from getting too large.
    7.     The next steps either help or sometimes cause an error, but you can try these next few steps... If you get an error about a source already existing, then you can delete the key.
    8.     Right-click the OPA subkey, point to New, and then click Key.
    9.     Type OPA for the key name.
    10.     Close Registry Editor.
    You might need to change permissions so OPA can write to the event log in Registry Editor.  If you get permission errors, try following these steps:
    1.     Click Start, and then click Run.
    2.     In the Open text box, type regedit.
    3.     Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
    4.     Right-click the EventLog key, select Permissions.
    5.     In the dialog that pops up, click Add...
    6.     Click Advanced...
    7.     Click Locations... and select the current machine by name.
    8.     Click Find Now
    9.     Select both the Network user and IIS_IUSERS user and click OK and OK again. (We never did figure out which of those two users was the one that fixed our permission problem.)
    10.     Change the Network user to have Full Control
    11.     Click Apply and OK
    To verify OPA Logging to the windows event logs from Determinations-Server:
    Go to the IIS determinations-server application within Server Manager.
    Under Manage Application -> Browse Application click the http link to pull up the local "Available Services" web page that show the wsdl endpoints.
    Select the /determinations-server/server/soap.asmx?wsdl link
    Go to the URL and remove the "?wsdl" from the end of the url and refresh. This will throw the following error into the logs:
    ERROR Oracle.Determinations.Server.DSServlet [(null)] - Invalid get request: /determinations-server/server/soap.asmx
    That error should show up in the windows event log, OR you can get a message explaining why security stopped you in "logs/InfoDSLog.txt" if you used the web.config settings from above.
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa363648(v=vs.85).aspx
    Edited by: Paul Fowler on Feb 21, 2013 9:45 AM

    Thanks for sharing this information Paul.

  • How to writing an image from my applet to my apache webserver

    hi everyone,
    i have a big problem, writing an image from my applet to my apache
    webserver. i tried three way's of writing that file. every way was
    described in forums to solve this problem, but non of them worked and
    i don't know why. i'll give you the code of my writing-methods and
    describe, what happen when i test them, in order someone of you can
    give me an usefull tip, where the problem is.
    as inputparameter i give my method a new URL referring to
    http://localhost/test.jpg (this is the same directory, where my applet
    is loaded from, so i should have reading and writing permission,
    havn't i? while i'm developing, my applet runs on the same pc as my
    webserver, just in case you're wondering about localhost) and a
    selfmade BufferedImage (i already testet if it is not null and shows
    the correct things ... all ok).
    1. try:
    private void writeImageToServer(URL fileURL,BufferedImage img){
    try {
    URLConnection urlConnection = fileURL.openConnection();
    urlConnection.setDoOutput(true);
    OutputStream urlout = urlConnection.getOutputStream();
    BufferedOutputStream out = new BufferedOutputStream(urlout);
    ImageIO.write(img,"jpg",out);
    out.close(); // i also tried without this line -> same result
    // additionally a question: do i need
    out.close()?
    catch( IOException e ){
    e.printStackTrace();
    result:
    test.jpg doesn't appear in the webroot. but some very strange messages
    in the error.log of my apacheserver:
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageOutputStreamSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageReaderSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageInputStreamSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageWriterSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageTranscoderSpi
    i cannot explain this lines to myself, because my apache should have
    nothing to do with java. all my javacode is executed on the client
    side in the browser. do this messages mean i have to add the ImageIO
    package from the sdk to my jar-applet. the jre, used by my iexplorer,
    doesn't contain this files in the meta-inf/services directory of
    rt.jar, but that's version 1.4.2_03, the same as my sdk, and the
    rt.jar contains the corresponding classfiles at javax.imageio.spi. so
    i'm realy confused by this messages.
    2. try:
    private void writeImageToServer(URL fileURL,BufferedImage img){
    try {
    URLConnection urlConnection = fileURL.openConnection();
    urlConnection.setDoOutput(true);
    OutputStream urlout = urlConnection.getOutputStream();
    BufferedOutputStream out = new BufferedOutputStream(urlout);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    encoder.encode(img);
    out.close(); // same comments as above
    catch( IOException e ){
    e.printStackTrace();
    result:
    nothing. no error-messages in the error.log, no exceptions in the
    java-console and no test.jpg in the webroot. i searched my whole
    harddrives for it: nothing. isn't this the way, the JPEGImageEncoder
    works?
    3. try:
    private void writeImageToServer(URL fileURL,BufferedImage img){
    try {
    File file = new File(fileURL.toString);
    file.createNewFile();
    BufferedOutputStream out = new BufferedOutputStream(new
    FileOutputStream(file));
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    encoder.encode(img);
    out.close(); // same comments as above
    catch( Exception e ){
    e.printStackTrace();
    result:
    the SecurityManager denies this action with "access denied" while
    calling createNewFile(). well, this way was dedicated to run from an
    application, not from an applet. i'd have to sign my applet to get the
    rights to do this, or i can edit java.policy on my client, what i
    don't want, because i cannot do this on every client, the applet will
    run, when i'm finished with it. this brings me to the question: does
    anybody know's how to sign my applet and give it full access to the
    harddrive and the webserver without paying 400$ to VeriSign for a
    commercial CA? i want to do this by myself, without paying anything
    and without giving a lot of information to another company.
    i would realy appreciate, if someone could give me a hint where i am
    wrong or how to do this correct.
    thank you very much
    [email protected]

    You hold several misconceptions. The first is that an applet can write to a server without help from the server. That will never work on a real server (though it might work in testing, if the server is on the same PC as the applet). Applets cannot get a File object that points to any place on the server.
    If you write a servlet designed for accepting image uploads, the applet can communicate back to that servlet and feed it the bytes of the image. There are other technologies that can replace the servlet, of course (PHP, ASP..) but I mention that because you say you are running Apache - and that is very Java oriented.
    For more help on servlets, try the [Web Tier APIs - Java Servlet|http://forums.sun.com/forum.jspa?forumID=33] forum.

  • How to write  to weblogic.log from JSP ?

    It is possible to write some messages to weblogic.log from JSP?
              

    Use weblogic.logging.LogOutputStream class to log messages into
              weblogic.log file.
              javap on weblogic.logging.LogOutputStream
              for e.g
              <%@ page import="weblogic.logging.*" %>
              <%
              LogOutputStream los = new LogOutputStream("TEST");
              los.error("Writing into Log file");
              %>
              Hope this helps.
              --kumar allamraju
              Mikhail Ershov wrote:
              > It is possible to write some messages to weblogic.log from JSP?
              

  • I/O Error when writing access Log buffer to file. error number: 28

    Hi,
    Oracle OracleAS Web Cache 10.1.2.3.0, Build 10.1.2.3.0 080201 is writing events like this:
    [alert 13215] I/O Error when writing access Log buffer to file. error number: 28
    I've looked for this alert and i've found this description:
    WXE-13215 I/O Error when writing access Log buffer to file. error number: %d
    Severity: alert
    Cause: I/O error happened when OracleAS Web Cache tried to write to the access log file.
    Action: Check the status of access log file. For example, see if the disk is full
    Anybody knows what "error number: 28" stands for? The logs are sended to other server and it seems that the disk size is ok.
    thanks!

    I tested again...it seems LabVIEW doesn't like the way I wrote the measurement files. I attached a set of VIs (ZIP-file) to give you a clue how it was done. When I try to save and read a file containing just plain DBLs from a 1D-Array (see attached file generating VI) it works perfectly well for large file sizes.
    So there might get something messed up by the way LabVIEW saved the measured data. You'll notice, that I (accidentally) left the "prepend array string size" input of "write to binary file" function unwired which means that the size information will be written as a type of header. Maybe this is the reason that it doesn't work as expected...
    Attachments:
    VibrationMeasurement.zip ‏76 KB
    generate_test_bin_data.vi ‏12 KB

  • How to get the job logs from sm35 by using the queue id and session name?

    hi all,
    can any one please let me know how to read the job log from sm35 by using the session name and queue id. i have the job name and job count but is it possible to download the job log by using the queue id and session name.
    FYI..
    i want to read this job log and i want to send it to an email id.
    -> i am using the job_open and submitting the zreport via job name and job count and then i am using the function module  job_close.
    but this is not working in my scenario i have the queue id and session name by using this two i want to get the job log is there any function module available or code please provide me some inputs.
    thanks in advance,
    koushik

    Hi Bharath,
    If you want to download it to the local file then you can follow the instructions in the below link.
    How to download Batch Input Session Log?
    Regards,
    Sachin

  • Replication of activities(contact log) from CRM to R/3

    Hi,
    In our current project scenario we have requirement to replicate activites(contact log) from CRM to R/3.As standard SAP only replication of activites from R/3 to CRM, we need custom development to achieve replication from CRM to R/3.
    Can anyone guide me how to solve this issue.
    Regards
    Nikhil

    Have you found a solution for this requirement?
    regards
    André

  • Dialog Instance writing and reading from wrong global directory

    Hi,
    I have just completed a HA installation of ECC 6 on a Windows 2008 cluster. On node B we have the CI installed and on node A we have an additional DI installed. The installation drive for these local instances is the I drive in both cases. The ASCS instance is installed on the clustered N drive.
    For some reason when a job runs on the Dialog Instance installed on node A it writes it log file to the I:\usr\sap\<SID>\SYS\global\100JOBLG directory rather that to the
    <sap cluster hostname>\sapmnt\<SID>\SYS\global\100JOBLG directory (which would equate to N:\usr\sap\<SID>\SYS\global\100JOBLG). Similarly when I try a read a job log from the DI on node A it tries to read from I:\usr\sap\<SID>\SYS\global\100JOBLG and when it can find the log it gives an error.
    If anybody has any ideas as to how I can reconfigure the instance to read and write to the correct directory that would be much appreciated.
    Cheers,
    Greg.

    Have you set a different SAPGLOBALHOST or DIR_GLOBAL in your instance profile?
    Kind regards,
    Mark

  • Capturing Application Error log from SXMB_Moni

    Hi,
    I wanted to capture the error information from Application error log from ECC sxmb_moni and forward that as email alert.
    We have already alert configuration in place with alert category using standard variables. Was wondering if I have to capture application error log from sxmb_moni what would be steps involved. Please let me know if anybody has worked on this and appreciate your help on this.
    Sample Error message from sxmb_moni of ECC system
    MT_Fault
    Error in Application System
    Detailed Information
    Process Order invalid
    Thanks
    Selvam
    Edited by: Selvam_muthu on Jun 23, 2011 5:40 PM

    Hi Selvam,
    As the exception is raised in ECC system, alert cannot be trigger, alert will get trigger when there is a error in PI system. To raise a email, write additional code in ECC to trigger the e-mail with proper error content

  • How to get the user log from the entried planning data ???

    Dear All,
    Could you help me to give the suggestion regarding that please .. ?? :).
    I have requirement to get the last user who in charge in modifying the planning data.
    Or in the other words, i'm gonna get the log from the entried planning data.
    e.g.
    1. Phase 1 - My Friend:
    Create the planning data :
    Country           Sales
    INA                 $1000
    2. Phase 2 - I update it and create new record.
    Country           Sales
    INA                 $1500          < modified >
    USA                $400           < new >
    Could i get the log from those records ??
    The log can be contain:
    the created user       &   modified user ??
    I just read the article regarding status and tracking system in BPS, but could i cover that requirement ??
    (Because i got that the status and tracking system for creating a workflow for planning).
    Or ..
    Is there other way that can fulfill this requirement  ???
    Really need your guidance all.
    Regards,
    Niel.

    Dear Mayank,
    Tks a lot for your responses.
    I've tried it but in BPS version..
    I saw in the document there is GUID (unique ID), could you explain me what the objective is ???
    I work out to plan to store the user created, date created, and planning level information in the log data.
    What do you think ..
    Is it better to display them in the BEx Report / another manual planning layout ???
    What did you display the log data in your case ??
    Still need your guidance ..
    Really - really thanks.
    Niel.

  • Unable to download crash logs from iPhone 5  into MacBook Air 10.8.4

    Hi All,
    I' am new to mac world. Apologies if this is a very basic question.
    I have an iPhone 5 and and I would like to download my app's crash reports into my MacBook Air 10.8.4 for further ivestigation.
    What I did was:
    1. Connect device
    2. open iTunes and click sync (sync successful)
    3. Now all my photos that I took using my iPhone are visible in Macbook's iPhotos (until this - very good)
    Now,
    4. Open up a Terminal app
    5. put ~/Library/Logs/CrashReporter/MobileDevice/ to download my iPhone app's crash logs, assuming they would all have synced, but unfortunately it doesn't look like it has even got CrashReporter/MobileDevice/ forlder created in my ~/Library/Logs/ directory.
    Any help to download all the iPhone 5 app crash logs into my Macbook would be really very appreciated.
    (Please also let me know if I need to change any setting in my iPhone that will allow me to download my crash logs from Diagnostics section into my Macbook)
    kumaresh:~ kumareshd$ pwd
    /Users/kumareshd
    kumaresh:~ kumareshd$ cd Library/Logs/
    kumaresh:Logs kumareshd$ ls
    AMRestoreLog.txt                    Sync
    Adobe                                        Ubiquity
    DiskUtility.log                              appstore.log
    FlashPlayerInstallManager.log          fsck_hfs.log
    Spotify
    kumaresh:Logs kumareshd$

    I think I have..
    kumareshmba:Logs kumareshd$ touch test.txt
    kumareshmba:Logs kumareshd$ ls -al
    total 32
    drwx------+ 12 kumareshd  staff   408  3 Aug 10:50 .
    drwx------@ 49 kumareshd  staff  1666 31 Jul 14:31 ..
    -rw-r--r--   1 kumareshd  staff  1316 31 Jul 12:48 AMRestoreLog.txt
    drwx------   3 kumareshd  staff   102 25 Jul 21:44 Adobe
    -rw-r--r--   1 kumareshd  staff    61 26 Jul 23:25 DiskUtility.log
    -rw-rw-rw-   1 root       staff   308 25 Jul 19:53 FlashPlayerInstallManager.log
    drwxr-xr-x  11 kumareshd  staff   374 27 Jul 08:17 Spotify
    drwxr-xr-x   3 kumareshd  staff   102  3 Aug 10:45 Sync
    drwxr-xr-x   3 kumareshd  staff   102 25 Jul 18:23 Ubiquity
    -rw-r--r--   1 kumareshd  staff     0 25 Jul 18:23 appstore.log
    -rw-r--r--   1 kumareshd  staff  2501 27 Jul 12:47 fsck_hfs.log
    -rw-r--r--   1 kumareshd  staff     0  3 Aug 10:50 test.txt
    kumareshmba:Logs kumareshd$ pwd
    /Users/kumareshd/Library/Logs

  • How to capture content activity log from DMP?

    Hi There,
    I try to implement content activity log from DMP. The information that I want to get are DMP IP, Conent File Name (video or jpg file), open date/time. The only way that I can do is sending http command direct to DMP (http.file via port 7777).
    Is it possible to implement Syslog server to get those information from DMP?
    Thank you
    Panya

    Hi Panya,
    There is a feature called "Proof Of Play" which was created exactly to track what the DMPs are playing, you can find the documentation at the following link:
    http://www.cisco.com/en/US/docs/video/digital_media_systems/5_x/5_2/dmm/user/guide/signs/proof.html
    Is this what you are looking for?
    Best Regards,
    Marco

  • Function module to display process overview log from SM66 Transaction

    Hi,
    I want to display process overview log from SM66 Transaction in a report.
    Is there a function module which will help me in achieving that or is there any other method.
    Thanks in advance,
    Sandeep.

    Did you try finding out how SM66 creates the list? You could set break-points e.g. at statement "call function" and see which ones are being called. Look at those starting with TH... especially.
    Thomas

  • Restore achive logs from tape

    Hi
    I need to restore archive logs from the tape. I am pretty new on this, do i have to go brtools and restore the archive logs or there is a t code in sap that I can recover from that? if it is using brtools, what is step and procedure? do I have to use sqlplus? while I am doing this type of recovery, do I need to shut the dabase down?
    please share
    thanks

    Wei,
    You can restore redo logs from below command.
    brrestore -a <start_log#>-<end_log#> -c -d util_file -r <Oracle_Home>\database\initSID.utl
    If you want to do a restore & recovey you can go for point intime recovery. Here You need to restore online backup & then additionally need to apply redologs which were generated after the online backup.
    Check below link for details.
    http://help.sap.com/saphelp_nw04/helpdata/en/93/4ffb72309fb04e80ebfefae1b7a96f/frameset.htm
    also check below SAP notes which will answers of your questions.
    602497 - BRRECOVER - New tool for Oracle Restore and Recovery
    Note 4161 - Complete Recovery
    Note 23070 - Backup and Recovery: Basic Concepts
    Note 4160 - Tape management for recovery
    Hope this helps
    Thanks
    Sushil

  • Working with a developer of a mobile site and want to export the debug log from android!

    Hi have an HTC incredible and I am working with the developer of and would like to send him the error logs generated. Is there a way to export them to a text file.
    Thanks,
    Matt

    Sorry, there's not an easy way to copy or share the entire error log from Firefox for Android. To copy an individual log entry, you can press-and hold on the text to bring up a menu.
    This add-on has support for exporting various other debugging data from Firefox mobile. We've talked about adding support for the error logs in a future version. If you would like to help add that support, the source code is on GitHub:
    https://addons.mozilla.org/mobile/addon/nightly-tester-tools-for-mobil/

Maybe you are looking for

  • RAM issues after installation (Late 2009 iMac)

    I was trying to upgrade a late 2009 iMac computer from its original RAM of 4GB. I purchased 8GB of memory from Corsair off Amazon (http://www.amazon.com/Corsair-Channel-204-Pin-SO-DIMM-CMSA8GX3M2A1066C7/dp/B0050 5EZYW/ref=sr_1_6?ie=UTF8&qid=140320129

  • Configuration/Setup for securing PI messages with certificates

    Hello Experts, I'm looking for some guidance/suggestions/direction in regards to installing and using certificates when exchanging data with trading partners via PI 7.0.  It's something new to us and it's been a bit of a struggle. In scenario 1, we w

  • Cisco 3850 Switch Management Port - ACL on VTY

    Hi, I got these switches. Switch Ports Model              SW Version        SW Image              Mode    *    1 32    WS-C3850-24T       03.03.02SE        cat3k_caa-universalk9 INSTALL      2 32    WS-C3850-24T       03.03.02SE        cat3k_caa-univ

  • Change variant SAP&HVOM

    Hi, I need to apply OSS note 384956, which involves changing variant SAP&HVOM for program ppio_entry. The problem is that the variant is protected, and I am therefore not allowed to change it. I already tried using program RSVARENT to unlock the vari

  • Want information about OTC process?

    Hi All, I would like to know is there any difference  in between Standard Sales order process and OTC apart from posting? Like in Standard we use SO - Delivery---Picking - PGI - Invoice. In OTC    SO - Delivery---Picking - PGI - Invoice --- Receivabl