Script mail can't write to file

stuERR.bat
<<<<<<
cd /home/ajax/stu_roles
date > ~/stu_roles/log/stu_roles_bat.log
cat ~/result/.test_stat.pw | sqlplus [email protected] @DDT_role_report >> ~/stu_roles/log/stu_roles_bat.log
SUBJECT="Roles Report"
EMAIL_ADDR="[email protected]"
cat ~/stu_roles/DDT_role_report.csv | mailx -s "$SUBJECT" "$EMAIL_ADDR"
DDT_role_report
<<<<<<<<<<
SET HEADING OFF
SET TRIMOUT OFF
SET SERVEROUTPUT on
SET ECHO OFF
SET FEEDBACK OFF
SET PAGESIZE 0
SPOOL DDT_role_report.csv
select * from test2 where STATUSSTRING='ERROR';
SPOOL OFF;
what is wrong

Ugly. Lots of moving parts.
Much simpler to write just PL/SQL code to run the SQL, format the e-mail, and then send it via UTL_MAIL or UTL_SMTP. The resulting PL/SQL code resides in the database (stored procedure/package). Can be scheduled for execution as and when needed using DBMS_SCHEDULER or DBMS_JOB. Is fully portable to other operating systems (the PL/SQL code is o/s independent). The code is subjected to Oracle security and auditing and backup and recovery. It does not have on foot in o/s land and the other in db land.
Keep it simple.

Similar Messages

  • Mail Server Error: Fatal error: can't write proc file

    I am a novice with OS X Server. It has been running fine for months but now I am having trouble. I get the following error log in SA:
    Dec 3 19:19:24 MasterControl imap[1761]: Fatal error: can't write proc file
    Dec 3 19:19:25 MasterControl imap[1763]: DBERROR: dbenv->open '/var/imap/db' failed: Permission denied
    Dec 3 19:19:25 MasterControl imap[1763]: DBERROR: init() on berkeley
    Dec 3 19:19:25 MasterControl imap[1763]: IOERROR: creating /var/imap/proc/1763: No space left on device
    The drive has lots of space left on it.
    Also in the maintenance accounts section, it states for every user there is an unknown mailbox path in the mailbox store.
    Any help would be appreciated.

    I rechecking the situation, the drive is showing that it is totally full. Its a 60 gig drive that yesterday had 10 gigs on it...now it is full. Not sure where the other 50 came from or where they are. I've just deleted some programs and the drive is still showing full.

  • Can't write cache file for while creating domain in soa 11.1.1.5 on HP-UX

    Hi,
    Installing SOA 11.1.1.5 on HP-UX and during domain creation/configuration I am getting the below errors
    **sys-package-mgr: can't write cache file for**
    and have lots of cache file errors for different packages
    Any idea what might be wrong and whats the cause of these errors and is it safe to ignore these errors if not what is the work arround. As I already looked at the below post but I don't find */var/tmp/wlstTemp* on my machine as suggested in the post below.
    SOA 11.1.1.5 install got can't write cache file
    So wondering if there's anything else I can do i.e. while creating or configuring a Domain pass some parameter to config.sh etc.
    Thanks

    Hi,
    I don't see python.cachedir in config.sh. Here is config.sh
    #!/bin/sh
    mypwd="`pwd`"
    # Determine the location of this script...
    # Note: this will not work if the script is sourced (. ./config.sh)
    SCRIPTNAME=$0
    case ${SCRIPTNAME} in
    /*)  SCRIPTPATH=`dirname "${SCRIPTNAME}"` ;;
      *)  SCRIPTPATH=`dirname "${mypwd}/${SCRIPTNAME}"` ;;
    esac
    # Set the ORACLE_HOME relative to this script...
    ORACLE_HOME=`cd "${SCRIPTPATH}/../.." ; pwd`
    export ORACLE_HOME
    # Set the MW_HOME relative to the ORACLE_HOME...
    MW_HOME=`cd "${ORACLE_HOME}/.." ; pwd`
    export MW_HOME
    # Set the home directories...
    . "${SCRIPTPATH}/setHomeDirs.sh"
    # Set the config jvm args...
    CONFIG_JVM_ARGS="${CONFIG_JVM_ARGS} -DCOMMON_COMPONENTS_HOME='${COMMON_COMPONENTS_HOME}'"
    export CONFIG_JVM_ARGS
    # Delegate to the main script...
    "${WL_HOME}/common/bin/config.sh" "$@"Thanks

  • SOA 11.1.1.5 install got can't write cache file

    Hi,
    I installed 2 node cluster of SOA 11.1.1.5 on linux and during domain configuration I got errors i.e.
    **sys-package-mgr: can't write cache file for**
    Installation was done and all the servers start/stop fine am able to deploy the processes, am able to access all the urls fine everything coming up fine BAM, SOA, OSB etc . Just wondering if the error above have any effect on the installation or any piece that might not work. As I have already did the installation and ignored those errors above so just wanted to see if anything I need to look for.
    Thanks

    Hi,
    It's a cluster install and took sometime to do the full install so it will be a pain to re-install everything over. Currently have tested the processes and seems to be working fine.
    Also I don't find
    /var/tmp/wlstTemp
    I do see wlstTemp appended with linux users who did Oracle SOA install.
    Also in-future when creating a new environment besides the above chmod 777 on /var/tmp/wlstTemp is there any parameter we can supply when running config.sh. I read some where that in-order to get by these errors at the time of domain creation we can also pass some parameter.
    Thanks

  • How can i write properties file for Hindi font

    Hi All,
    i'm using jdev 11.1.1.5.0
    in my use case i have worked on internationalization where i want to use hindi font
    like this link -
    Majid Hussain: Internationalization of ADF 11.1.1.3 Applications
    as in above post majid used german language and write properties file for german language(which is using english character).
    but my problem is that i want to use hindi language
    so how can i write propery file which support hindi font.
    Manish

    Hi Manish,
    We also had same requirement where we need to show indian local language(Hindi ,Bengali and many more ).
    We had implemented following approach and perhaps it will helpful for you.
    1-First we changed the encoding value in jdeveloper.
       go to jdeveloper --> tools --->preference-->encoding , select to UTF8
    2-We used to get the properties and it's translated value from business and then we were manually put these pair into related resource bundle.
    And using this we were able to implemented multilanguage support.
    Thanks
    Prateek

  • Mail can't write internet accounts in keychain access

    Hello,
    After having resetted (is this right?) my login keychain, i've noticed *Mail can't write any of my pop and smtp passwords in my new keychain*.
    I've tried the *UnlockCaptcha page* from Google, but Mail still won't save my passwords ;(.
    _Is this a problem from Mail, Keychain Access or the fact i'm using a laptop?_
    Thank you very much.

    I can't help you but you are not alone. I am having the same problem.
    After using MobileMe to sync my keychains all my macs no longer have mail.app keychain entries. Even after turning off MobileMe keychain syncing Mail.app fails to write a new entry into the keychain for my mail accounts. I am asked for the server passwords each new mail session. It's highly annoying.
    I have tried keychain first aid and disk utility. Neither one found any errors.
    I'm bumping this to a new thread.

  • Script Alert: can't find .js files even though they're in the folder that the program looked in to?

    I'm new to the whole After Effects community and I am currently using it for a project.
    I followed a tutorial by Mt. Mograph on youtube and I downloaded the script "Ease and Wizz".
    I have it as a panel and all, but every time I attempt to apply my desired expression, a popup box says that there is a script alert and it can't find the file for the expression.
    Is there something that I'm doing wrong? I have tried to remove the script and download it again, but nothing has worked for me.

    Try to copy "easingExpressions" folder that came with the script into this folder:
    C:\Program Files\Adobe\Adobe After Effects CC 2014\Support Files\Scripts\ScriptUI Panels\

  • How can I write a file and fill it in periods?

    Hi Every body!
    I need help with this.
    I have my aplication(power quality analiser),This VI obtain several varibles and make a lot of calculus and operation, to obtein others parameters in real time so my problem is Save the acquire data and calculus data into a file (similar as a report) every period(custumizable for the user in time units) 
    I mean make a only one file wich is write every period continuously , e.g.  Start my principal VI and this event start the write of file, past one period,make other row or colum into the same file and continue that way until we stop the principal VI.
    How can I make that?
    Thaks very much 
    Best Regards

    Hi,
    assuming you have your trigger (notifier or just periodically) you can append the data to a single record.
    Open the file, set the file position to the end, write the data and close the file.
    Hope this helps

  • I can not write in file

    hi
    i use tomcat5.32 + cpanel .
    my code is :
    <%
    String path = application.getRealPath("");
    path +="/as.txt" ;
    FileOutputStream fos = new FileOutputStream(path);
    fos.write("this is test ?".getBytes());
    fos.flush();
    fos.close();
    %>
    when requested get this error :
    java.io.FileNotFoundException: /home/domainname/public_html/ROOT/as.txt (Permission denied)
    java.io.FileOutputStream.open(Native Method)
    java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    org.apache.jsp.newjsp2_jsp._jspService(newjsp2_jsp.java:61)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    the perms is 0644 or 0664 but my program can not write in own files .
    please help me !!

    Are you sure that the tomcat process is run by the right user that actually has permission to write the file?
    The file's permissions might be '664' to you, but maybe the tomcat process's user is not in the correct group.

  • Can't write to file when double-clicking jar...

    This issue has me stumped. I have a jar dssetup.jar... The manifest looks like the following...
    Manifest-Version: 1.0
    Main-Class: DSsetUp
    Created-By: 1.3.0_02 (Sun Microsystems Inc.)
    I also have a text file that I read and write to(this file is outside the jar):
    datasource.txt
    If I execute my jar from the command line, I can read and write to the file...no problem. However, if I double click my jar to run it, I can read the text file but cannot write to the text file. Has anyone seen this before?
    Thanks

    It is true ..
    you can not write anything to .jar file directly..
    .jar file is not a common file, it is compressed.
    the following tool give you some cue.
    tool named JavaJar(written by java) can compress and decompress jar,war, ear and.zip...
    may download from http://www.qwerks.com/download/4114/JavaJar.zip
    the tool is very verygood tool.
    but the homepage(www.pivotonic.com) of JavaJar cannot be accessed.
    it is funny.
    good lucky.

  • GW POA Can't write .pid file to var/run/novell/groupwise

    I'm running GW 8.0.2 HP2 on SLES 10, and just recently figured out after trying to set up a CRON job that I can't restart my POA without rebooting the server. When I run a rcgrpwise status, the POA shows as "unused." Running rcgrpwise stop or restart fails to stop the POA, though the domain goes up and down with no issue. I've checked my gwha.conf file, and everything appears to be in the correct case, and referencing the correct locations. The domain can create its .pid file in /var/run/novell/groupwise just fine.....
    I've read and followed the directions in the tid 7003322 (which sounded like a direct match for this issue), but when I edit the header for the POA an rcgrpwise status returns that it is "unable to check [@gw4post.poa]"
    The forum thread titled: "rcgrpwise status shows "unused", but it is running." also sounds like the same problem, but there was no resolution.
    Anyone have any ideas? Please let me know if I can provide any further informnation - I'm writing this at 0-dark-30 and probably left something out....
    Thanks,
    Stacey

    Okay, so your stuff looks good.
    Yes, when the system boots it's supposed to basically load/fire up the rcgrpwise script (more or less, but it reads the gwha.conf file)
    That is quite odd that if you bounce the server, it's fine.
    Greg is correct that the PID file(s) get written to the directory where your log files are at.
    Do you know where you log directories are at for the MTA/POA?
    They should be in diff. directories.
    Brief section from the docs:
    If you selected Launch GroupWise Agents on System Startup in the Installation program, the Installation program configured your system so that the agents start automatically each time you restart your server. The Agent Installation programs always creates a grpwise startup script in /etc/init.d for starting the agents, as described in Starting the Linux GroupWise Agents as Daemons. To enable automatic startup, the Agent Installation programs also create symbolic links named Snngrpwise in the rc3.d and rc5.d directories so that the agents load on restart into level 3 or 5, depending on the configuration of your Linux system. The value of nn is determined by the chkconfig command during installation so that the GroupWise agents are started in the proper sequence with other processes running on the server.
    When the grpwise script runs and starts the GroupWise agents, the agents read the agent startup files in /opt/novell/groupwise/agents/share to check for configuration information provided by startup switches. Because the --show switch cannot be used in the startup files, the agents do not run with server console interfaces when started automatically when the server restarts, unless you modify the gwha.conf file as described in Enabling the High Availability Service for the Linux GroupWise Agents.

  • Can't Write XMP Files

    I'm using Windows XP and LR 1.3.1 and I can't seem to write a specific folder of files. I'm trying to create the XMP files so I can do a global edit to modify the Lense type. When I select all and then click on Save Metadata to Files, the program does not write the files for this specific folder. I have tried this on other files and I don't get the same problem. I have tried moving the specific files themselves to their own collection and trying the same process above, but I get the same result.
    These are Pentax K10D files saved as PEF files.

    The only way that I could get Lightroom to write the xmp files for these specific files was to make a change to all of them AND I had to turn on Automatically write changes to xmp files in the catalog preferences section. If this option was not set, even after making a change to the files, Lightroom would not create the xmp files.
    So I finally got the program to create the xmp files, I just can't understand what's different about these 93 files that insisted on having xmp writes turned on globally before any xmp files could be created. I turned off this global setting after creating the needed files.
    The whole purpose of this exercise was to change the Lense Description to a Sigma 10-20mm F4 from a Tamron lense. I found a shareware program that allowed me to select a directory of files and make a global edit to all 93 xmp files at once. I then read the XMP files back into Lightroom and everything is right with the world.
    Is the option of NOT changing the lense designation within Lightroom a XMP limitation or is this a design decision of the LR engineering team? It sure would be nice to have the option to PAINT the changes (in this case lense description) from one image to the rest of the group, if one chose to do this.

  • Mac Pro Can't write temporary files to 10.4 Server?

    We run a file server on an old G4 tower to a network of about 8 Macs. We are having problems with our first Intel machine. We have a 3ghz Mac pro that appears to work fine except for one problem. The server doesn't allow the Mac pro to automatically write temporary files. This is a problem since we are a design firm and we use indesign for a majority of our projects. Without this temporary file users can access the same file at the same time. This is a major problem!
    Sever is running the latest version of 10.4
    Mac pro is running the latest version of 10.4 as well
    I also ran a test where I logged in from the Mac pro to one of our G5s. Indesign functioned normal in that situation.
    Anyone have any suggestions?

    By looking at your post i have several questions to ask :
    Where are the temporary files stored ?
    Which data sharing scheme are you using for them ? AFP with POSIX or ACL behaviors, something Indesign uses ?
    Which versions of indesign are you using ? Some differences exists in between PPC installs and Universal install and may play havoc with that.
    There might as well be the question of ownership and rights that may differ as mentionned above in between your G5 workgroup and the MacPro.

  • Mail: Can't drag audio files

    Does anyone know how you can drag audio files from mail to anything else?
    You used to be able to just drag the file to for instance another mail, but now I can't "grab" the file.
    Best
    Greiffenberg

    Do you mean that you are trying to drag the tunes into the main iTunes window or to the main desk top?
    Are these from an audio CD or previously ripped mp3/mp4?
    Is it possible that you have removed your "ownership and permissions" privileges from a particular folder and it is now locked preventing you from changing that folder?
    MJ

  • Until how many lines can we  write java file

    in java file, how many lines can I write?
    Manybe It will depend on file system such as window, unix file system.
    but, I don't know the exact size.
    please let me know how many lines I can wirte in java file of window and unix file system.
    thank you in advance.

    A class and method implementation in source lines of code (sans comments and white space) should be as large as necessary, but no larger. Good design principals tend to drive towards smaller peices, but there is no one right size size limit.
    Personally, I suspect any method that has over 50 lines of code as being too large and probably refactorable. I also suspect any single class (or for that matter .java file) with more than 50 methods or more than 2000 lines of code as being too large and probably refactorable. But sometimes we might really need a 500 line method or an 8000 line, 200 method class. Maybe its a performance thing. Maybe it is just that complicated and too hard to break up. I doubt it occurs frequently, but I won't be shocked when I see it.
    Sometimes GUI classes (Swing and AWT) get really huge. Sometimes this is due to code generation, sometimes its just being sloppy. It pays to know the difference.
    But the Java langauge sets reasonable (if not overly generous) limits on bytecode and constant pool sizes If the Java compiler begins to complain that something you have built is is too large, face it, it probably is. It's like running into scope nesting or nested name (class in a class in a class...) size limits - usually not a good sign for the structure of your code.
    Chuck

Maybe you are looking for

  • Whole gallery disappear when moving it from another folder

    Hope i can get some clues here of something i find more than strange. I was working on Photoshop and moving some images within Bridge and i noticed my Iphoto Library was inside another subfolder, to clarify i keep it in an external drive. So i grab i

  • White space in XML source code

    Ok, I have tried all of the tricks to prevent white space in the code.  The page displays fine, but there are 4 lines at the top of the source code making the file not vaild.  Ideas?  Thanks in advance.

  • Combining purchases from multiple iTunes acconts

    When I gave my daughter her MacBook, I had everything set up for her to be use my iTunes account. At some point, in a warped sense of independence, she created her own iTunes account on the same laptop and started making purchases. (I saw "warped" si

  • Receiving a message encoded in SOAP

    Hi all. I have an application that sends objects encoded with SOAP to various clients. This is not done via a web service, but a standalone application. Now I want to receive these SOAP messages with a java client and use the methods of the Classes d

  • Mac Mini won't boot after update

    I have a Mac Mini that won't boot after the most recent software update. Since the Mini has only a bluetooth keyboard and mouse, a number of the usual options (hold down shift, etc.) won't work. I've tried a reset, also no luck. At the moment, I can'