Calling a report from unix shell script

Hi,
I had to call a report from unix shell script.
May i know the procedure to accomplish this
Thanks in Advance
A.Gopal

First you should not include the whole path to your report in the call ...
Use like this:
/ora/u01/oracle/v101/as2/bin/rwrun.sh report=an_stati destype=file desname=/ora/u01/oracle/v101/as2/test.pdf desformat=pdf
In $ORACLE_HOME/bin/reports.sh:
1) Verify that you have updated the REPORTS_PATH variable to include your folder where you have the report in question
REPORTS_PATH=/ora/u20/app/qits/env1/run:$ORACLE_HOME/reports/templates:$ORACLE_HOME/reports/samples/demo: ....
2) Verify that the REPORTS_TMP variable is pointing to a valid location and that the oracle user has access to write on it.
After that, post the content of the tracefile located at $ORACLE_HOME/reports/logs/{in-process report server name folder}/rwserver.trc
If no file is present then it means that you need to enable trace in your reports's conf file.... go to the $ORACLE_HOME/reports/conf folder and and locate the .conf file that correspond to your in-process reports server name (as specified in the rwservelet.properties file)... open/edit the file to enable trace logs ..
i.e.
Change the following line:
<!--trace traceOpts="trace_all"/-->
to <trace traceOpts="trace_all"/>
Bounce the reports server and try to run the report again, this time the .trc file should be generated, post the content so that we can take a look.

Similar Messages

  • Calling stored procedure from unix shell script

    Hello,
    I am facing a problem while calling a stored procedure from UNIX shell script. I want to return a output variable from the stored procedure to the UNIX environment.
    Here is the code-
    #!/bin/sh
    OUTPUT=`sqlplus cmag/magnum@dw <<ENDOFSQL
    set serveroutput on;
    var prd_out varchar2(100);
    exec create_pm_window(:prd_out);
    exit;
    ENDOFSQL`
    echo " output is - $OUTPUT"
    The problem is :prd_out is not getting copied to shell variable OUTPUT.
    I have a dbms_output.put_line in the stored proc create_pm_window and I can see that prd_out is getting populated.
    Any help is really appreciated.
    Thanks'
    Rakhee

    First step :
    make sure the PL/SQL works as expected.
    Does the following display the expected output executed from SQL*Plus ?
    set serverout on
    declare
    prd_out varchar2(100);
    begin
    create_pm_window(prd_out);
    dbms_output.put_line('output is '||prd_out);
    end;
    I don't have your procedure, but using a dummy procedure like :
    Scott@my10g SQL>create procedure foo(p_out in out varchar2)   
      2  is
      3  begin
      4  select 'Hello '||instance_name into p_out from v$instance;
      5  end;
      6  /
    Procedure created. and a toto.sh script as :OUTPUT=`sqlplus -s scott/tiger <<EOF
    set pages 0 lines 120 trimout on trimspool on tab off echo off verify off feed off serverout on
    var mavar varchar2(100);
    exec foo(:mavar);
    print mavar;
    exit;
    EOF`
    echo "OUT = ${OUTPUT}"
    exitIt works fine :[oracle@Nicosa-oel ~]$ ./toto.sh
    OUT = Hello my10g

  • Calling a report from a shell script

    We are modifying all concurrent programs to encrypt the oracle password by using the "ENCRYPT" option in the concurrent program definition for all unix based programs.
    The db user/password is derived from the FCP_LOGIN within the shell script. If I submit the concurrent prorgam and go to the root directory on which the unix shell scripts are present and execute the following command :
    ps -ef
    I can see the call to the concurrent program and since I am using the encrypt method, i cannot see the password(I could see the password before the change)
    The problem is one of the shell scripts is calling an Oracle Report by using ar25run command which needs a userid as the parameter.
    So when I issue the above ps command, i can see the password in the call to this report.
    Is there any other way of passing the oracle user/password to the report? This is required for SOX compliance.
    thanks,

    I guess it should be the same problem as if you are calling CONCSUB from unix also, because both need userid and password.
    If that's the case probably metalink note 104541.1 might help you.

  • Return codes from sqlldr command from unix shell script

    I am trying to capture error code from sql loader from unix shell script and display proper messages.
    sqlldr parfile=sdb.par control=$cntlfile data=$infile bad=$badFile log=$logFile rows=10000
    rows=10000
    retcode=`echo $?`
    case "$retcode" in
    0) echo "SQL*Loader execution successful" ;;
    1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
    2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;
    3) echo "SQL*Loader execution encountered a fatal error" ;;
    *) echo "unknown return code";;
    esac
    Eventhough, there are errors while executing sqlldr, it is always returing recode zero. What could be the possible reason
    Please advice

    Is there a typo in your code ?
    sqlldr parfile=sdb.par control=$cntlfile data=$infile bad=$badFile log=$logFile rows=10000
    rows=10000
    retcode=`echo $?` In this code, you get the return code of the statement in bold which is not the sqlldr statement ...

  • How can i call a Stored Procedure procedure from Unix shell script

    Hi All,
    I want to call a Strored PL-SQL Procedure through Unix shell script.
    Can any body help me with this.
    Regards,
    Saurabh

    I prefer a seperate script like the other poster mentioned. However, most shells can use a 'here' document as well ...
    sqlplus uid/pwd <<END
    exec myproc
    exit
    ENDRichard

  • Executing java from unix shell script

    Hi, I am trying to execute java program from a unix shell script and the program has a command line parameter. I have tried in ways like
    /opt/java1.4/bin/java CollExtractLoadProcess /home/inbox/archive/file_name
    /opt/java1.4/bin/java CollExtractLoadProcess "/home/inbox/archive/file_name"
    /opt/java1.4/bin/java CollExtractLoadProcess '/home/inbox/archive/file_name'
    /opt/java1.4/bin/java CollExtractLoadProcess file_name
    No matter how I execute it gives me the following error
    Exception in thread "main" java.lang.ClassFormatError: CollExtractLoadProcess (C
    ode segment has wrong length)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    Could someone please let me know what is the correct way of doing this?
    Thanks.

    Sounds like you either have a corrupt class file or you're using an older version of the JVM to try to execute classe that were compiled for a newer version.

  • Execute stored procedure from Unix shell script

    My current method of executing stored procedures (wpl_1 and wpl_2) from a unix shell script is as follows:
    <<wpl.sh>>
    sqlplus user/password @/home/oracle/scripts/wpl.sql
    <<wpl.sql>>
    set serveroutput on size 1000000
    set timing on
    execute wpl_1('0000010676','~')
    execute wpl_2('0000010676','~')
    execute wpl_1('0000010236','FIX')
    execute wpl_2('0000010236','FIX')
    exit
    Question: Is it possible to combine the two scripts (unix and oracle) together?

    A little rusty on this, but this may work:
    My current method of executing stored procedures
    (wpl_1 and wpl_2) from a unix shell script is as
    follows:
    <<wpl.sh>>sqlplus user/password @/home/oracle/scripts/wpl.sql << EOF
    set serveroutput on size 1000000
    set timing on
    execute wpl_1('0000010676','~')
    execute wpl_2('0000010676','~')
    execute wpl_1('0000010236','FIX')
    execute wpl_2('0000010236','FIX')
    exit
    EOF
    >
    Question: Is it possible to combine the two scripts
    (unix and oracle) together?

  • Parameter transfer to tmloadcf from Unix shell script.

    Hi.
    I am using Tuxedo global transaction with database password encryption, so I replaced by ***** the database password in OPENINFO string of the TMS in the UBBCONFIG GROUP section.
    As a result the password should be inserted manually when running tmloadcf.
    Do you know how this password can be inserted from a Unix shell scripts?
    I tried to use << or named pipe (mkfifo) but in both cases the tmloadcf remained stuck.
    Thanks in advance for your help.
    Amnon Katz.

    Amnon,
    The C library function isatty() is used to determine if tmloadcf is
    associated with a terminal. If isatty(0) returns 0, then the tmloadcf code
    to prompt for a password will fail.
    In some places in Tuxedo, there is functionality to allow reading a password
    from an environment variable if the process requiring the password is not
    associated with a terminal. However, this functionality is not available
    for tmloadcf. If you have an active Tuxedo maintenance contract and the
    functionalty of reading a database password from an environment variable
    when tmloadcf is not run from a terminal is important to you, you may want
    to file a support case and request that this functionality be added to
    tmloadcf. Otherwise, you will have to run tmloadcf from a terminal.
    Regards,
    Ed
    <Amnon Katz> wrote in message news:[email protected]..
    Thanks Ed for your reply.
    Do you know how tmloadcf identify that descriptor 0 is associated with a
    terminal?
    Is it possible to write some code that can emulates this situation?
    Regards,
    Amnon

  • Running SQLPLUS from UNIX shell script

    I'm not sure if this is the right forum, but...
    How can I execute a sql file from inside the UNIX shell script, logging on to Oracle w/o supplying a UID/pwd? Normally, we log into UNIX using our own logon, then sudo as another user to login to Oracle. Now, I'm trying to create a UNIX shell script, where I'm already sudo'd as the UserID that logs into Oracle. I've tried the following, but can't get it to work. I'm a UNIX scripting noob. Any ideas?
    example:
    #! /usr/bin/ksh
    sqlplus / \@test.sql << EOF
    exit;
    EOF

    I'm a UNIX scripting noob.In which case I feel obligated to point you at William Robertson's excellent article Database Shellscripts Considered Harmful. Save yourself a world of pain.
    Cheers, APC

  • I am unable to set the classpath from unix shell script

    ) I am new to java, provide me the solution to my problem, as it is urgent
    I am unable to execute shell script on unix machine, the code is given below:
    Basically it is not setting the classpath
    dbUpload .java is astand alone java program to retrieve the report instance statistics from crystal server
    Created a jar file from dbUpload.java as
    Jar �cvf dbUpload.jar dbUpload.class
    Here is mycode(script.sh)
    CLASSPATH=/u01/CrystalList/cecore.jar:${CLASSPATH}:
    CLASSPATH=${CLASSPATH}:/u01/CrystalList/cereports.jar:
    CLASSPATH=${CLASSPATH}:/u01/CrystalList/dbUpload.jar:
    Export CLASSPATH
    Echo ${CLASSPATH}
    Java dbUpload

    venkat123,
    if the code you posted is the original code of your script - it has some misspellings. Please try this one - it works for me both on solaris and linux.
    #! /bin/bash
    CLASSPATH=/u01/CrystalList/cecore.jar:$CLASSPATH
    CLASSPATH=$CLASSPATH:/u01/CrystalList/cereports.jar
    CLASSPATH=$CLASSPATH:/u01/CrystalList/dbUpload.jar
    export CLASSPATH
    echo $CLASSPATH
    java dbUpload

  • Capturing return status from a call to STARTRFC from a shell script.

    Hi All
    I am trying to use startrfc to integrate a Unix (Solaris) batch process with SAP.  I want to determine whether an SAP user exists.
    Here is the command as run in the Unix shell: -
    startrfc -t -3 -h ourHost -s 01 -c 550 -l EN -u SAPuser -p secret -F BAPI_USER_EXISTENCE_CHECK -E USERNAME=testSAPuser
    This command always exits with a status of zero, whether or not the user exists.  (With the -t flag) It creates a file, dev_rfc and a second file of the form CPICTRCnnnnn.      However there is no output to stdout, irrespective of whether testSAPuser exists. 
    Can I force this utility program to write its output to stdout instesd of writing it to a file?  How?
    Alternatively can I force the utility to write its output to a specific (named) file instead of writing to dev_rfc?
    Thank you for your attention
    Stephen Broadbridge

    Hi,
    You could create an RFC in SAP and put your BAPI function, an the result into a table parameters:
    - use -T parameter to get the table
    - use w to set your file
    <b>Example:</b>
    startrfc -E PEBELP=00010 -t -d AR1 -h S01AZ03A01 -s 10 -g S01AZ03A01 -x sapgw10 -u LOLA -p flores -c 130 -l EN -F Y_RFC_EXAMPLE2 <b>-T RESULTADO,250,w=outputname.txt</b>
    <b>Explanation of parameters:</b>
    -T <table name>,<width>,[r=<file>][,w=<file>]
    Where <file> is a path name to read from (r) or write to (w) the internal table. If <file> is -, stdin or stdout is used.
    <b>Example of Y_RFC_EXAMPLE2</b>
    FUNCTION Y_RFC_EXAMPLE2.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(PEBELP) TYPE  EBELP
    *"  TABLES
    *"      RESULTADO STRUCTURE  TAB512
      DATA fecha(10).
      DATA wa TYPE string.
      WRITE sy-datum TO fecha.
        CONCATENATE pebelp fecha  INTO wa SEPARATED BY '/'.
        ds_rec 'sample' wa.
        append wa to resultado.
    ENDFUNCTION.

  • Passing Null Characters from Unix Shell Script to Java Program

    Hi Experts,
    Facing an issue with a shell script....
    The shell script has 10 input parameters....
    1st Parameter is a compiled Java program name(This can keep changing)
    Rest 9 are the parameters of the Java Program...
    The following piece of code is working when Test "a z" "b t" "" "" "" "" "" "" "" "" is hardcoded.
    lv_java_string=`java Test "a z" "b t" "" "" "" "" "" "" "" ""`
    The whole thing being dynamic.....
    But when I dynamically populate the same on to a parameter lv_java_param and then execute the same
    lv_java_string=`java $lv_java_param`
    if i echo $lv_java_param  its giving me Test "a z" "b t" "" "" "" "" "" "" "" ""  correctly
    Im facing some issue...... The issue is " is being treated as a parameter itself and the space between a and z is not taken into consideration and hence z is taken as the 2nd parameter
    Issue seems to be something like the precedence in which the above statement is executed, because of which "s are calculated/manipulated. Is it something like
    a) $lv_java_param is computed  first and then java $lv_java_param
    b) or java $lv_java_param is run on the fly......
    Any help is much appreciated.

    This forum is about Oracle *RDBMS*
    I don't see any question about Oracle RDBMS
    Please find a forum about Java.
    Sybrand Bakker
    Senior Oracle DBA

  • Calling sqlplus from unix shell script

    Hi All,
    I am executing the following code :-
    sqlplus -s ${DATABASE_USER} |&
    print -p -- 'set feed off pause off pages 0 head off veri off line 500'
    print -p -- 'set term off time off serveroutput on size 1000000'
    print -p -- "set sqlprompt ''"
    print -p -- "SELECT run_command from tmp_run_batch where upper(batch_name) = upper('${PAR_PROGRAM_NAME}');"
    read -p RUN_COMMAND
    eval print -p -- \""execute dbms_output.put_line(${RUN_COMMAND});"\"
    read -p RET_VAL
    print -p -- "exit;"
    The select stmt given above gives sample output as :-
    pack_claims_clas_utils.func_main('$PAR_RUN_DATE','$PAR_RUN_LEVEL','$PAR_EXCLUSIVE_RUN_YN')
    And then this package is executed.
    The problem that I am facing is how to handle the no_data_found case of the select stmt. . When this case arises then the stmt. "read -p RUN_COMMAND" hangs.
    Could you please provide any solution ?
    Thanks
    Suds

    Hi,
    Have you tried this:
    # if [ -n means String has non-zero length
    if [ -n $RUN_COMMAND ]
    read -p RUN_COMMAND
    fi
    Hi All,
    I am executing the following code :-
    sqlplus -s ${DATABASE_USER} |&
    print -p -- 'set feed off pause off pages 0 head off veri off line 500'
    print -p -- 'set term off time off serveroutput on size 1000000'
    print -p -- "set sqlprompt ''"
    print -p -- "SELECT run_command from tmp_run_batch where upper(batch_name) = upper('${PAR_PROGRAM_NAME}');"
    read -p RUN_COMMAND
    eval print -p -- \""execute dbms_output.put_line(${RUN_COMMAND});"\"
    read -p RET_VAL
    print -p -- "exit;"
    The select stmt given above gives sample output as :-
    pack_claims_clas_utils.func_main('$PAR_RUN_DATE','$PAR_RUN_LEVEL','$PAR_EXCLUSIVE_RUN_YN')
    And then this package is executed.
    The problem that I am facing is how to handle the no_data_found case of the select stmt. . When this case arises then the stmt. "read -p RUN_COMMAND" hangs.
    Could you please provide any solution ?
    Thanks
    Suds

  • Call Unix Shell Script From OBIEE

    Hi All,
    Is it possible to do a call to a Unix Shell Script with the Action Framework from OBIEE.
    Thanks in Advance

    I dont think so but we can go for it instead of BI side. Try to port the same functionality on shell script side, so that the script can identify your report using tail of nqquery log and execute the rest of your lines in shell script.
    This can doable and works as expected. If at all you are going with my suggestion you can go for a small key word to identify your report instead of that lengthy logical query.
    Pls mark if helps

  • Need Example on calling a unix shell script from oracle stored procedure

    Hi
    Can anybody give example on how to call unix shell script from an Oracle stored procedure. Please give a small example on how to do this .I need this urgently please.
    Have a nice time.
    Thanks & Regards
    Jogesh

    If you are on 10g you can also use DBMS_SCHEDULER. See Re: Excute Unix command Using PL SQL

Maybe you are looking for

  • How can I install Windows 7 on a 2011 MBP that doesn't have an optical drive?

    I've looked at a bunch of guides for the MBA and the new RMBP, but they all say that there's a point in the Bootcamp setup that I should be prompted to create a bootable USB installation drive for Windows 7 from a Windows 7 ISO.  I don't see that opt

  • Fill out PDF with calculations...

    I got my hands on a fillable PDF that has fields that auto-calculate things for me. Tried evince and ePDFviewer as well as foxit reader.  Evince is the only one that lets me fill it out, but does not seem to support the auto-calculation feature.  Any

  • CS6 Adobe Application Manager Conflict

    I tried to update Photoshop CS6, but it says I am running Adobe Application Manager and have to close it before I can get the updates. I don't see the application manager running anywhere. Where do I find it so I can shut it down?

  • Workflow rules doesn't work for existing record!!?!?!?

    Hi all, I've created one workflow rule to update value from one filed to another. Here is my expression: [<QuickSearch1>] <> [<plStatus_ITAG>] and my action is field name = "*Status" (QuickSearch1) Value = <plStatus_ITAG> and I tick on the Overwrite

  • In widows 8 no app shows up for dreamweaver after install. How do i fix?

    I installed Dreamweaver from the Creative Cloud, it shows in control panel, but I cannot get the app to show in the screen (not a touch screen machine), and there is no start button. O now have a serial number, I just need to get the the program to w