Regarding the shell scripting

Hi,
i am working on supporting side for a migrated project.My application is an ASO.
As i have to execute the MaxL scripts in Unix using shell scripting.
Can any one help me out in writing and executing the scripts in Putty server.
it is very apreciable if i get response soon to my id [email protected]
Thanks and waiting for reply.
Srinivas

We are using Essbase on UNIX (AIX) too. Generally speaking, I always create 2 files when I want to execute a MaxL script on our UNIX server:
1) a shell script, eg. proc.sh, that contains "essmsh -l <user> <password> proc.msh".
The proc.sh file can be edited using the standard UNIS editor "vi" and needs to be executable (the "x" bit needs to be set).
2) the MaxL script, eg. proc.msh, that contains the MaxL statements to be executed on Essbase
Hope this helps.

Similar Messages

  • Error when running the OWB process flow from the shell script

    Hi,
    I am able to deploy the process flow succesfully but when I execute the process flow from the shell script,I am getting the following error.Previously it worked fine.
    I had to make some chnage in the IP address,so i had to deploy again.
    Connected.
    SQL> @/oracle/product/owb92028/owb/rtp/sql/oem_exec_template.sql OWB_RTR LOC_P_REL PROCESS P_W_SOURCE "," ","
    Elapsed: 00:00:00.00
    Elapsed: 00:00:00.01
    Stage 1: Decoding Parameters
    | location_name=LOC_P_REL
    | task_type=ProcessFlow
    | task_name=P_W_SOURCE
    Stage 2: Opening Task
    declare
    ERROR at line 1:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "OWB_RTR.WB_RT_API_EXEC", line 17
    ORA-06512: at "OWB_RTR.WB_RT_API_EXEC", line 137
    ORA-06512: at "OWB_RTR.WB_RT_API_EXEC", line 164
    ORA-06512: at line 205
    Thanks in advance.
    Vinay

    Hi Kamal and kanakam kolla,
    This is just to let you know that,I solved my problem little differently by creating a new location and deployed the process flow.Now my process flow is working fine when i call from the shell script.What i see is that, it does not update properly when we update and redeploy the process flow.So far this is the work arround i could think off and i succesfully tested this.
    Thank you Kamal and kanakam kolla,for giving a thought towards my problem.
    Thanks
    Vinay

  • The Shell script keeps hanging

    Hello,
    I have the following shell script and when i execute, it keeps hanging and nothing happens
    Please let me know.
    Requirement is to read data from file and pass it to the sql and create files as shown.
    code
    #!/bin/sh
    while read user.dat
    do
    echo "user = $1 email = $2"
    done
    sqlplus -S /NOLOG << EOF
    connect username/pwd@schema
    select user_name,count(*) from apps.fnd_user
    where 1=1 and user_name ('$1') and email_address ('$2')
    group by user_name;
    EOF
    if [ $? -ne 0 ]
    then
    % cat > user_exist
    else
    % cat > user_notexist
    fi
    exit 0
    Data File
    rsreenivasa null

    Well, youy have many problems here:
    while read user.dat
    do
    echo "user = $1 email = $2"
    done
    The "user.dat" string is an invalid variable name, so this loop never runs.
    Then, in this sequence:
    if  $? -ne 0
    then
    *% cat > user_exist*
    else
    *% cat > user_notexist*
    fi
    The cat(1) commands then copy stdin to either "user_exist" or "user_notexist".
    You don't show how you run this command, so we cannot tell what happens exactly.
    Please delete everything below the "while read ..." loop. Get that loop working as you expect it should. Then add a few more lines and test those. Build the shell script incrementally, debugging each as you go.
    Hint: since this is a shell script, run it like this:
    $ sh -x ./myscript arg1 arg2 ...
    to see what happens as it happens.
    Cheers

  • Where is the Shell Script directory?

    I have been asked to run a script in the Shell Script directory.
    I found the directory /library/scripts ... when I ran the script in there I did not get the expected results, so I assume the directory is incorrect.
    Please help..

    AFAIK, that folder's for AppleScripts, not shell scripts. For shell scripting, see https://developer.apple.com/library/mac/#documentation/OpenSource/Conceptual/She llScripting/Introduction/Introduction.html

  • Calling the shell scripts written in Apps Server via DBMS_Schedueler

    Hi All,
    I am new to DBMS Shceduler.
    I had written shell scripts in Application Server(Not in Database Server).
    Is any one can advice me whether these shell scripts can be called via DBMS SCHEDULER?
    Thanks in Advance
    Regards
    A.Gopal

    Yes.
    Generally a Scheduler will have 3 parts, a Schedule, a Program and a Job. The parameter "program_type" in "Program" that can have these values 'PLSQL_BLOCK', 'STORED_PROCEDURE','EXECUTABLE'. The "EXECUTABLE" setting allows you to call a script as you request.
    Schedule Example
    begin
      dbms_scheduler.create_schedule 
      (schedule_name => 'DAILY_AT_4PM', 
       start_date=> trunc(sysdate)+18/24, 
       repeat_interval=> 'freq=daily;byhour=16;byminute=0;bysecond=0',
       comments=>' Run at 4pm every day'); 
    end;You can setup and reuse something like the above for a job you want to run daily at 4PM
    You can check schedules by running some SQL like this :
    select schedule_name, schedule_type, start_date, repeat_interval from dba_scheduler_schedules where owner = 'SCOTT';
    Program Example
    BEGIN
    DBMS_SCHEDULER.CREATE_PROGRAM (
       program_name           =>  'MY_SAVED_PROGRAM1',
       program_action         => '/usr/local/bin/date',
       program_type           => 'EXECUTABLE',
       comments               => 'My comments here');
    END;
    /You can check Programs by running some SQL like this :
    SELECT owner, program_name, enabled FROM dba_scheduler_programs where owner = 'SCOTT';
    Job Example
    begin
      dbms_scheduler.create_job
      (job_name => 'JOB_EXAMPLE',
      program_name=> 'MY_SAVED_PROGRAM1',
      schedule_name=>'DAILY_AT_4PM',
      enabled=>true,
      auto_drop=>false,
      comments=>'Job to run date');
    end;You can check Jobs by running some SQL like this :
    SELECT owner, job_name, enabled FROM dba_scheduler_jobs where owner = 'SCOTT';
    The forum also has its own section for this which you can find here :
    Scheduler
    Best Regards
    mseberg

  • Help regarding  a shell script

    Hi,
    I had a requirement to execute a long running sql query. But the sql query had some parameters to be passed in it. I want to use nohup command and run the sql script using shell script concept. How can i pass the parameters and run the nohup command. I am herewith attaching sql reference.
    [http://hatchappsdba.blogspot.com/2008/01/how-to-run-rcv11isasql-type-of-files.html]
    I want to keep the sql script in a shell script and run it through nohup command.
    Can you please let me know how can i keep the above sql in a shell script and run through nohup command

    I want to keep the sql script in a shell script and run it through nohup command.
    Can you please let me know how can i keep the above sql in a shell script and run through nohup commandFrom the OS command prompt, issue:
    # nohup sqlplus <username>/<password> @<script name>.sql &Or as sysdba (if sysdba is needed to run the script):
    # nohup sqlplus "/ as sysdba" @<script name>.sql &Or, you can write a shell script as mentioned in this thread -- nohop sqlplus doubt
    Thanks,
    Hussein

  • Do the shell script have to login into Oracle Apps

    I am calling the Document Processor Java API from a shell script. The problem I have that its unable to find the
    xdo://PO.POXPRPOLXMLRTF.en.US/?getSource=true
    file within the control file.
    Is this because somewhere a shell variable needs to be set, or a login need to be made into the Oracle Apps, so this template stored in XML Publisher is accessible.
    Please advise!

    Another things you can do is
    begin
    tmp_res := apps.fnd_web_sec.CHANGE_PASSWORD('TESTUSER','changeme',false);
    update fnd_user set password_date = null where user_name = 'TESTUSER'';
    end;
    Once you do this, when the TESTUSER logs in with the password=changeme, he/she will be redirected to the change password page.
    Hope this helps,
    Sandeep Gandhi

  • Urgent Regarding the SAP Script

    Hi all,
    I am developing a SAP-Script in which there is table like
    Description Resuts Parameters
    uline
    values values values
    My doubt is using the driver program the values has to be printed. Can anybody provide the piece of code for these requirement.
    Another doubt is in this script there 2 pages . But in the print preview i can see only 1 page . In the page setting i have given the next page as page2 . But still i m facing the same problem. In page there is no main page only footer, page no, and some std descptn window is available.
    Depending on the 1 field i want to print the send field value i have change these things in the driver program so that the correct can be printed in the form.
    With Regards,
    Srinivas.

    hi,
    How to Upload graphics (IMAGE) to your Sapscript?
    Command in your Sapscript
    /: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E
    These are the steps to be followed for uploading graphics in R/3 system
    1. First save the file as BMP
    2. Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and
    make it Zoom as 100% and save as *.TIFF
    3. Open SE38 and execute program RSTXLDMC
    4. Give your TIFF file path name
    5. Select Bcol (for Color)
    6. TEXT ID will be ZHEX-MACRO-*.
    7. Inplace of * write your own logo name (ZCOMPANYLOGO)
    8. Execute the program
    9. Now Goto SE71 create your ZFORM
    10. Create logo window
    11. Goto text element of logo window
    or
    In 4.6x :-
    1. Goto SE71 Change the mode to GRAPHICAL
    2. Choose the Graph Tabstrips
    3. Now type in some name for the LOGO WINDOW
    4. Press the IMPORT BUTTON (third button from left) and then IMPORT the BMP file from your DESKTOP
    5. The code will be written automatically. You just need to drag and drop wherever you want
    the graphics to be.
    /: INCLUDE Z_COMPANY_LOGO OBJECT GRAPHICS ID BMON LANGUAGE EN
    Message Edited By ,
    Vani

  • How to pass a variable to the shell script and crontab?

    Friends,
    here is my script.....
    exp userid=username/password@realdb file=/u02/logical_backup/abc_+$date+.dmp log=/u02/logical_backup/abc_+$date+.log owner=oraadmin statistics=none
    i want the exported file name as abc_2101.dmp and abc_2101.log (2101 is a date and month)
    I want to execute this script daily at 02:00 AM.
    so that i edited the crontab -e as....
    00 02 * * * ./u02/script/dailybkp.sh
    Now what i want is....
    1. is the steps are correct for crontab -e?
    2. Is the script of the crontab will execute daily at 02:00 AM?
    3. how can i rename the .log filename and .dmp file name daily according to the date. for example abc_2001 is today's date and month.how can i replace with the variable.
    thanks
    sathyguy

    sorry....i tested with cp command it was working fine...
    so, i thought it should work for exp command also.
    but its not working....also its not throwing any error....
    the crontab -e is having...
    00 02 * * * exp userid=system/password@realdb file=/u02/test/n22.dmp log=/u02/test/n22.log owner=scott statistics=none
    also i have tested by calling the script.
    #!/bin/bash
    00 02 * * * /u03/script/testbkp.sh
    its not working
    but the below one is working....
    00 02 * * * cp /u02/test.txt /u02/test/test.txt
    also this one is working....
    #!/bin/bash
    00 02 * * * /u03/script/testbkp.sh
    i listed the chkconfig --list crond
    crond 0,1,6 = off
    2,3,4,5 are on
    what might be the reason?
    thanks
    sathyguy

  • Help regarding issue connecting to DB through shell script

    Hi,
    I have a Oracle 8.1.7 Database running on a AIX box. I am trying to truncate one table from within the shell script using here documents.
    Code section of my script -
    succ=`sqlplus -s ${USR} << EOF
    whenever sqlerror exit sql.sqlcode
    set feedback on
    Truncate table abc.xyz;
    exit;
    EOF`
    USR has been set as /. We have ops$ users in the database. So when I run this script using my id it runs fine. The problem seems to be coming when this runs as part of the batch job which runs under a different osuser. The error is -
    + + sqlplus -s /
    + 0< /tmp/sh164108.8
    succ=ERROR:
    ORA-01017: invalid username/password; logon denied
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL]
    where <logon> ::= <username>[<password>][@<connect_string>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL]
    where <logon> ::= <username>[<password>][@<connect_string>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    I am not sure what is going wrong. I have tried and googled for the issue and it seems that the issue is coming because the osuser under which the job runs may not be setup to use "sqlplus -s /" ? Any help appreciated.
    Regards,
    Saurabh

    This is the forum for Oracle's SQL Developer tool, not for general SQL and PL/SQL questions.Questions like this will get a better response in the PL/SQL forum.
    Having said that, it looks likely that the other user doesn't have an ops$ account.

  • Shell script to monitor the data guard

    Hi,
    Can any body please provide the shell scripts to monitor the data guard in all scenarios and to get the mail when problem occurs in dataguard.
    Thanks,
    Mahipal

    Sorry Mahi. Looks like all of the scripts i've got are for logical standbys and not physical. Have a look at the link ualual posted - easy enough to knock up a script from one or more of those data dictionary views. Just had a look on metalink and there's what looks to be a good script in note 241438.1. Its a good starting point definately.
    regards,
    Mark

  • I am trying to use automator to make a simple app that when I open it, it comes up with a dialog box that asks for a link that you want to download. and it will download it for you using the curl -O shell script in Terminal. How would I do it?

    I want this so I can just download anything I want by just having the link and I have made a few things with shell scripts in automator before, just never anything where i need to input a value into the shell script.

    Easy:

  • How to switch user from the current user using shell script code

    Hi Experts,
    I have an requirement to login into a particular user from the shell script concurrent program. I do have credentials for that particular user. I want to login and run few commands from that particular user. Please let me know if there are any methods to login as a particular user using the username, password from shell script program.
    Thanks a lot.

    Thanks for your reply. However we cannot use su command from a shell script program. How to enter password from shell script program?http://tinyurl.com/3t7cwjh
    Thanks,
    Hussein

  • Problem with the run_job,shell script with sqlldr

    Hi Gurus,
    I Created a job which calls the shell script and i understood from the other posting this job is going to execute with nobody,
    I had done the below testing
    Test 1) Shell script calls the SQL file, this SQL file executes the procedure.
    Test 2) Shell script calls the sqlldr command.
    When i execute the Test cases with , dbms_scheduler Run_job procedure, Test1 is success but Test2 was failed
    When i execute the Test cases with, logging into box with owner of the shell & both test cases are successful.
    Parent folder & Shell files are given with 777 permissions. & the Oracle db is version 10.2.0.1.0.
    Error:
    STANDARD_ERROR="SQL*Loader-522: lfiopn failed for file (*.log)"
    Please provide me your inputs its bit urgent Thanks a lot for your help.
    Edited by: 926769 on May 23, 2012 2:27 PM

    First of all let's look at your environment ... a totally unpatched version of software that is so old it is in desupport mode. You should upgrade to a fully supported version but, if you can't, at least to 10.2.0.5.
    That said without seeing any of your code, or a listing showing permissions on the directory and files, there is insufficient information from which to help you.
    Please post ALL information required for us to understand what you are doing an your environment.
    But before I decided that NOBODY was doing anything ... I'd shell out to the server from SQL*Plus using the HOST command and verify that permissions are as you believe them to be. There is every reason to believe SQL*Loader is having an issue with your file as identified.

  • Setting from address on linux to receive the mail after shell script ran

    Hi,
    I scheduled some shell scripts on Linux as cronjobs. Once the shell scripts are executed at the scheduled timings i am receiving the mails as shown in the below. PRDORA, TSTORA, DEVORA are my environments.
    From     Subject     Size     Received     
    oracle     dbora01cocen.corp.psi:PRDORA RMAN Archive Completed using Control file     11 KB     Wed 8/13     
    [email protected]     TSTORA:[14]ORA-12012: error on auto execute of job 854     10 KB     Wed 8/13     
    [email protected]     DEVORA:[7]ORA-12012: error on auto execute of job 1524     68 KB     Wed 8/13
    In the FROM address:
    I should receive the mail format: oracle@hostname in the FROM address like shown below.
    From     Subject     Size     Received     
    [email protected] PRDORA01 RMAN Archive Completed using Control file     11 KB     Wed 8/13     
    [email protected]     TSTORA01:[14]ORA-12012: error on auto execute of job 854     10 KB     Wed 8/13     
    [email protected]      DEVORA01:[7]ORA-12012: error on auto execute of job 1524     68 KB     Wed 8/13.
    Rightnow this dbora01cocen.corp.psi is mixing up with the subject in PRDORA instead it should in the FROM address. Can anyone please guide where i am suppose to make modifications in order to get this change.
    Thanks

    Sorry for the Late Reply.
    What does:
    $ /bin/hostname
    return for each of these environments?
    FOR DEV:
    [email protected][DEVORA01]% /bin/hostname
    devora01coden.corp.psi
    FOR TEST:
    [email protected][TSTORA01]$ /bin/hostname
    testora01coden.corp.psi
    FOR PRD:
    [email protected][PRDORA01]$ /bin/hostname
    dbora01cocen.corp.psi
    Are you using a local DNS or /etc/hosts entries to assign host names to IP addresses?I am not sure about this but i looked at /etc/hosts in each server and found the entry of the individual server on all the 3 servers.
    Thanks

Maybe you are looking for

  • Updated Acrobat and now Javascript calculations not working in new forms.

    I had created forms for my work that allowed me to calculate back dates from a given date to instruct the form users when components of a project were due. Below is the script I used- I am NOT a programmer and this was taken from another forum. It ha

  • Selecting names starting with a particular character

    Hi All, I want to select names from my XML strating with Character 'A'.is there any logical operator which helps me to do that,something like in SQl. e.g: <Rowset> <Row> <Name>Annie</Name> <Class>VIP</Class> </Row> <Row> <Name>jenson</Name> <Class>Bu

  • How to set a meeting at a different time zone

    I have read several letters of users. all try to "trick" the time zones or the meeting times. This is something to be taken care by Apple. I live in Israel. When I set a meeting in NYC, I do not want to think on time zones. I set the meeting to 09:00

  • Xml file handling

    I’m working on File to file scenario. My source file is xml file. What sort of prerequisites I need to do before processing this file. I maintained the source file structure similar to xml file structure, do I need to maintain same attributes/tag nam

  • Features not available

    It seems to me that there are a lot of features that we had in the Bold that are available on Z10. It does not make sence to me. One would think that this would be an upgrade and expect the nice things from the old blackberry and create new ones. So