Call of from.mxl under linux .sql script file

Hello Experts,

I have a requirement to call the sql script in the maxl file in the linux server. I get EOF file error.

Could you please say how to achieve this requirement.

MAXL Script:

Reel to ' / / essbase02//MaxL//Test_MR.log ';

the value of message level.

Set timestamp

echo 'start logging ';

login "admin", "password" on 'server '.

echo "beginning of sh execution."

MSH ' / / essbase02//MaxL//Test_MR.sh';

/ * Create label * /.

echo "Completed";

disconnection;

spool off;

Contents of the Test_MR.sh file:

sqlplus-s user@orcl/password @"' / / essbase02//MaxL//TEST.sql '"


Journal for the maxl:

essmsh timestamp: Wed Aug 5 23:17:35 2015

'Start of logging.

essmsh timestamp: Wed Aug 5 23:17:35 2015

MAXL > login "admin" "admin" on "server1.hq.emirates.com";

OK/INFO - 1051034 - [admin@Native Directory] user connection.

OK/INFO - 1241001 - connected to Essbase.

essmsh timestamp: Wed Aug 5 23:17:35 2015

"Beginning of HS performance."

essmsh timestamp: Wed Aug 5 23:17:35 2015

MAXL > sqlplus-s user@orcl/password @ "/ essbase02/MaxL/TEST." SQL ".

2 >

3 >

4 >

essmsh error: end of file breaks the statement

essmsh timestamp: Wed Aug 5 23:17:35 2015

essmsh timestamp: Wed Aug 5 23:17:35 2015

"Completed".

essmsh timestamp: Wed Aug 5 23:17:35 2015

MAXL > disconnect;

The user admin is offline

essmsh timestamp: Wed Aug 5 23:17:35 2015

Thank you

RM

If you want to execute operating system commands you use Shell, not "msh". MSH is to call an additional MaxL script with MaxL orders only.

Optionally, there should be no need to store the command shell in a separate file, that is, it should be possible to place the command sqlplus directly inside the MaxL script when you use the Shell.

Tags: Business Intelligence

Similar Questions

  • Other new lines in SQL script file and problem with SQL * more

    Hi all


    I would like to ask a question on the characters of new line inside files SQL scripts. I have a very long SQL query, stored in a file txt (ANSI encoding). Because query instructions are very long (several table joins and WHERE conditions) tried to separate, WHERE and ORDER BY clauses by inserting several new characters of lines (just hit the entrance) among them in order to improve the clarity of the source code. Now the problem is, whenever these newline characters are inserted in the file, apparently SQL * Plus cannot parse the file properly and gives me the following error message:
    SP2-0042: unknown command "FROM" - rest of line ignored.
    SP2-0734: unknown command beginning "myenterpri..." - rest of line ignored.
    The problem is definitely related to these new line because characters that when I remove them, the scripts runs without any problem. I would appreciate that you could kindly guide me how should I deal with this problem. Is there any SQL * Plus command to run to correctly interpret the new line characters?


    Thanks in advance,


    Kind regards
    Dariyoosh

    Hello

    In [SQL * Plus 9 | http://download.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013073] (and), you can tell

    SET     SQLBLANKLINES   ON
    

    allow to completely empty rows in an SQL statement.

  • Is it possible to be rolled up under certain conditions to a SQL script file?

    Hi guys,.
    Happy Monday to you all. I have a scenario where I'm queue of 2 files in the same SQL program. Here's what it looks like. Would it not be possible to only of coil for test1 - & p_job_id... SH if & p_file_num = 1 & test2 - p_job_id... SH if & p_file_num = 2?
    define p_user_id = &1
    define p_job_id = &2
    define p_file_num = &3
    
    spool test1-&p_job_id..sh
    
    select
    'module_id=''TEST001C1''
    from job_parameter b, job_parameter a
    where a.job_id = &2
    and a.module_id = 'TEST001'
    and b.job_id = a.job_id
    and b.module_id = a.module_id
    and &p_file_num = 1
    /
    
    select 'exit 0'
    from dual
    where &p_file_num = 1
    /
    
    spool off
    
    
    spool test2-&p_job_id..sh
    
    select
    'module_id=''TEST001C2''
    from job_parameter b, job_parameter a
    where a.job_id = &2
    and a.module_id = 'TEST001'
    and b.job_id = a.job_id
    and b.module_id = a.module_id
    and &p_file_num = 2
    /
    
    select 'exit 0'
    from dual
    where &p_file_num = 2
    /
    
    spool off
    Published by: Raj404261 on June 29, 2009 09:47

    Hello

    Raj404261 wrote:
    Hi Frank,.
    Thanks for getting back to me. You were right about the "set." Regarding:

    spool test&p_file_num-&p_job_id..sh
    

    Do the above however would always generate two files I think. I should have mentioned that I'm passing p_file_num from a shell script which is initialized to 1 or 2 based on an if condition.

    In layman terms, I want to only generate test1 test2 and if p_file_num = 1 if p_file_num = 2. Does that make more sense?

    Exactly what did the SPOOL command above. If you seem to be getting different results, make sure that you delete all existing files with the same names before testing.
    If there isn't that one order of the COIL (excluding SPOOL OFF, naturally), while a single file will be opened. Do not close the file until you are finished.

    Or you can consider having two secondary scripts, called my_file_1.sql and my_file_2.sql, each opens one of the SPOOL files and manages one of the queries.
    In your main script, call one or the other saying:

    @my_file_&p_file_num..sql
    

    Published by: Frank Kulash, June 29, 2009 10:35

  • Group of Skype calls work only not under Linux

    Hi support them.

    I did some tests and it seems that this group called only works in linux client when the starter of the call is a linux client.

    It may be useful

  • SQL script files to recreate the SYS objects in Oracle 9i

    Hi all.

    I work with an Oracle database test missing some SYS objects. (Oracle 9i).
    I was wondering if Oracle has all the scripts that I can run and re-create those?

    Thank you

    Sonya

    Hello;

    If you run scripts:

    $ORACLE_HOME/rdbms/admin/catalog.sql
    $ORACLE_HOME/rdbms/admin/catproc.sql

    You can create views of SYS

    Best regards

    mseberg

  • How can I call ttOptUpdateStats from PL/SQL

    I would like to: call ttOptUpdateStats from within a PL/SQL block.

    An example of one: run immediately using the input arguments in the PL/SQL Developer's Guide.

    The examples cover only builtin procedures returning data.

    Thanks for the help!  Here's my working version:

    Create procedure UPDATE_STATS as

    type of TblList is the table sys. TBL_STATS. TYPE % TBLID;

    tblids TblList;

    TBL VARCHAR2 (255);

    flag for number: = 1;

    plsql_block VARCHAR2 (255);

    LASTDATE SYS. TBL_STATS. TYPE % LASTSTATSUPDATE;

    Start

    plsql_block: = "call ttOptUpdateStats(:tbl,:flag)";

    Select TBLID bulk collect into SYS tblids. TABLES where the TBLOWNER not in ('SYS', 'TTREP', 'GRID');

    because me in tblids. FIRST... tblids. LAST

    loop

    Select trim (TBLOWNER): '. ' || Trim (TBLNAME) tbl of SYS. TABLES where SYS. TABLES. TBLID = tblids (i);

    execute immediate plsql_block using tbl, flag;

    Select LASTSTATSUPDATE from SYS lastdate. TBL_STATS where SYS. TBL_STATS. TBLID = tblids (i);

    dbms_output.put_line ('< '="" ||="" rpad(tbl,45)="" ||="" '="" '="" ||="" lastdate="" ||="" '="">');

    end loop;

    exception

    while others

    then

    Rollback;

    end UPDATE_STATS;

    /

    Ed...

  • Save sql scripts

    Hi all

    Please help me to set the default directory to save the sql script files.

    Thank you!

    I guess you're asking about SQL * more. This tool saves files in the current directory.

    Therefore, specify the full path or enter SQL * Plus from the directory desired. I'm not aware of any way to change the current directory to in SQL * more.

  • How SQL * MORE read script files

    Hello!

    Well, it is possible to launch sqlplus with a sql script file:
    sqlplus user/pass@srv @my_script.sql
    OK, what happens if I delete the my_script.sql file?

    My script here is about 1 GB of wholesale! sqlplus halfway done when I deleted the file.
    The sqlplus will stop with an error? Or just hang out?

    I copied the file my_script.sql now in the folder again, and I think sqlplus still works fine. But can I be sure that all the instructions in the script have been processed?

    Thanks in advance!

    The results are dependent on OS that you refused to share with us.

    I suspect * NIX & not Windoze.

    On Windoze, you cannot delete the file.
    On * open file NIX get does not actually deleted before calling fclose().

    Overall, you're OK.

  • Have we not available under linux admintool

    Hello Experts,

    I know that Admin Tool is not available in GUI version in linux.

    I am lookin for is to implement something like this
    http://obieeblog.WordPress.com/2009/08/04/simplifying-migration-process-%E2%80%93-changing-environment-specific-variables-in-RPD/
    in linux.

    Can someone tell how to do it?

    To summarize:
    1. open SPR under linux using scripts
    2 change the name of user and password of RPD and Connection Pool
    3. close the RPD and deploy it in the location of your choice.

    Help, please

    There is no available Linux admintool.

    use of the nqudml utilities is your only option, and yes - I must be UDML

    the only way to get an encrypted password is pre encrypt it in the Administration (Windows) tool, export it to UDML and make a list of passwords encrypted/plaintest to use.

  • Works only in the script file and not in the database

    Hi all:

    I want to know if this is possible.

    In my SQL script file...

    Create a feature once.
    Call or make use of this couple of function or several times.

    All the while NOT create the function in the database.

    In other words, I want this function to be alive only during execution of the script file.

    Thank you

    Well, you can do that if you can somehow manipulate your script so that it includes an anonymous block. Here, you can use a local subprogram that exists in the context of the anonymous block:

    SQL> DECLARE
      2     a1   NUMBER := 10;
      3     a2   NUMBER := 20;
      4     a3   NUMBER := 0;
      5
      6     FUNCTION calu_sum (var_a NUMBER, var_b NUMBER)
      7        RETURN NUMBER
      8     IS
      9     BEGIN
     10        RETURN (var_a + var_b);
     11     END;
     12  BEGIN
     13     a3 := calu_sum (a1, a2);
     14     DBMS_OUTPUT.put_line (a3);
     15  END;
     16  /
    30
    
    PL/SQL procedure successfully completed.
    

    Kind regards
    Frébault

    Published by: Marie Lise Sharma on May 6, 2009 13:58

  • Run script file

    Hello
    I am trying to run the SQL script file.
    My script contains a list of all the triggers.
    SQL plompt when I run the file as
    SQL > @d:\triggers.sql
    It returns a number like
    4223



    When I hit enter, it increments of 1 (4224) and so is not even allow me to get out.
    I am not very clear what this output means. I tried to take the output to text file per winding. But only the empty file was created.
    What happens exactly?

    Hello

    Looks like there is an error in the triggers.sql.
    For example, output that could be cause of triggers.sql creating a stored procedure or package that does not end with a /. SQL * Plus will think everything you enter is part of the procedure or package.

    Make sure triggers.sql has had / has (on a line by itself) after the last command at the END of each CREATE TRIGGER (or similar object).
    If you still have problems, make a much smaller version of triggers.sql, which causes a similar error and post it.

  • return values of PL/SQL Script Linux

    Hi gurus,

    I have a big problem...

    The following script contains two parts: a PL/SQL and Linux shell script statements.

    The PL/SQL computed value (day_id_day) and passes it to the instructions in Linux shell script (: v_salida: = day_id_day;) OUTPUT: v_salida).

    The instructions in Linux shell script to get the value (NUM_PARTICION = $?), but the value of the var day_id_day differs from the value of $NUM_PARTICION... There is no errors in the code...

    can someone help me?

    Kind regards.

    SCRIPT
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------

    $ORACLE_HOME/bin/sqlplus $ORAUSER / $ORAPASS < < eof

    Set serveroutput on;

    Number of v_salida VARIABLE;

    DECLARE
    v_error VARCHAR2 (1000);
    number of day_id_day;
    Start
    Select (sysdate + 7) sp_general_func.get_day_id
    in day_id_day
    Double;

    : v_salida: = day_id_day;

    dbms_output.put_line(:v_salida);

    end;

    /
    OUTPUT: v_salida
    expressions of folklore

    NUM_PARTICION = $?

    echo $NUM_PARTICION

    Better try this:

    ORAENV_ASK='NO'
    ORACLE_SID='ORCL'
    . oraenv
    ORAUSER='myUserid'
    ORAPASS='myPasswd'
    NUM_PARTICION=`
    $ORACLE_HOME/bin/sqlplus -s $ORAUSER/$ORAPASS <
    

    : p

  • Excerpt from SQL script Planner

    Hello

    Developer SQL version 3.2.10.09

    Is there a way to extract the SQL of a scheduler job script? I put in place a work in my enviromnent of test using the Wizard SQL Developer that worked extremely well, but my dba insists on having a SQL script to deploy in the active database.

    Thank you

    Nick.

    Try this:

    select
      dbms_metadata.get_ddl('PROCOBJ', 'your_job_name')
    from dual;
    

    -------
    You can also create new 'DDL' tab for jobs in SQL Developer yourself in less than 5 minutes:
    b save the XML in a file - for example 'JobEditDDL.xml '.

    
      
        <![CDATA[*DDL]]>
          
            
          
        
      
    
    

    b to the SQL Developer open: Tools-> preferences-> database-> user defined extensions
    (c) click the button. Select EDITOR (type), and then add the full path of the xml file.
    d click "OK" and restart SQL Developer

    Edited by: dz_r 2012-11-21 23:12

  • call a batch file in the sql scripts

    Hi friends,
    I'm looking for a way to call any batch file in sql scripts. I avoid using the DBMS_SCHEDULER package because my application server and database server are deparaments.
    I use the sql script using the server.plz application.


    Ah, I see. Of course, this explains everything.

    Now to be serious: there is no way to run a batch SQL script. The Tools that present SQL statements to the database are often able to do; host in SQL * Plus may issue commands to the OS, the host of builtin forms is it too and with dbms_scheduler , you can run a shell script on the database server.

    So depending on the tools you use, there are several ways to run the OS commands. So far you didn't tell us what you want to do with what tools in the version you want to do. So to only answer is: it is not possible. You cannot run a simple SQL command script.

    see you soon

  • How to load SQL scripts from a text file.

    Hi, I tried several times to load a script file/SQL text with 10 different tables and the data, but 10g Express doesen't allows me to do that, can someone direct me or tell me what I do or what I need to adopt a special method to achieve this. I'm sure there must be something where you can download SQL scripts from a text file (in the SQL command editor!). Thank you

    Hello

    Yes, as Aust replied, you must use SQL Workshop/SQL Script, instead the command SQL Editor.

    Sqlplus can also do so, I think, as well as SQL Developer, now it is 1.5.

    sqlplus: (the window command line, black of sql)

    SQL > @path /--(l'extension devrait être.sql) filename.sql.

    Peter

Maybe you are looking for