Execute MDX script

How execute a .mdx file in batch processing?...equivalent a execution .scr. I am using EAS 7.1.2 and Essbase 7.1.2. Thanks

My first question is what version of Essbase are you on? You say AAS wihich is the System 9 name for EAS. The Allocation scripts only work on version 11.1.2. If you are not on that version, It won't work

Similar Messages

  • Setting default member of attribute hierarchy in MDX script. Default member not taken into account while using user defined hierarchy

    Hi all
    I have a date dimension that (type time) with attributes
    - [FiscalYear] (type years)
    - [FiscalMonth] (type months)
    - [FiscalWeek] (type weeks)
    In addition to the attributes used in the natural hierarchy, I have an attribute [PerType] containing one member comming from the relational table 'WTD' which corresponds to 'Current Date'. All other members of this attribute hierarchy are calculated members (defined in the MDX script). Examples:
    --Last year
    CREATE MEMBER CURRENTCUBE.[Date].[PerType].[LY] AS NULL,
    VISIBLE = 1;
    SCOPE([Date].[PerType].[LY]);
    SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Year], SELF_AND_AFTER));
    THIS = ([Measures].CurrentMember, [Date].[PerType].[WTD], ParallelPeriod([Date].[Fiscal].[Year], 1));
    END SCOPE;
    END SCOPE;
    --Month to date
    CREATE MEMBER CURRENTCUBE.[Date].[PerType].[MTD] AS NULL,
    VISIBLE = 1;
    SCOPE([Date].[PerType].[MTD]);
    SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Week], SELF_AND_AFTER));
    THIS = Aggregate(CrossJoin({[Date].[PerType].[WTD]}, MTD([Date].[Fiscal].CurrentMember)));
    END SCOPE;
    END SCOPE;
    --Year to date
    CREATE MEMBER CURRENTCUBE.[Date].[PerType].[YTD] AS NULL,
    VISIBLE = 1;
    SCOPE([Date].[PerType].[YTD]);
    SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Period], SELF_AND_AFTER));
    THIS = Aggregate(CrossJoin({[Date].[PerType].[WTD]}, YTD([Date].[Fiscal].CurrentMember)));
    END SCOPE;
    END SCOPE;
    The defalut member of FiscalWeek attribute hierarchy is set dynamically in the MDX script:
    ALTER CUBE CURRENTCUBE UPDATE DIMENSION [Date].[FiscalWeek], DEFAULT_MEMBER =
    Filter(
    [Date].[FiscalWeek].Members,
    [Date].[FiscalWeek].Properties( "FiscalWeekStartDate", TYPED) <= DateAdd("d", -2, CDate(CStr(Month(Now())) + "/" + CStr(Day(Now())) + "/" + CStr(Year(Now()))))
    AND
    [Date].[FiscalWeek].Properties( "FiscalWeekEndDate", TYPED) >= DateAdd("d", -2, CDate(CStr(Month(Now())) + "/" + CStr(Day(Now())) + "/" + CStr(Year(Now()))))
    )(0).PrevMember;
    If I run the following query:
    with member
    measures.x as [Date].[Fiscal].DefaultMember.Name
    measures.y as [Date].[FiscalWeek].DefaultMember.Name
    select
    measures.x,
    measures.y
    } on axis(0)
    from [GLWeekly]
    it gives me back correctly the default member set over the MDX script.
    I order the statements in the MDX Script so that the default period (week) is set at the beginning of the script (just after the calculate).
    I do not understand why creating the following calculated member I am obliged to specify [Date].[Fiscal].CurrentMember in the tuple to have correct results:
    MEMBER [Account].[CoA].[Standard Engagement Revenue (MTD)] AS ([Account].[CoA].[Standard Engagement Revenue], [Date].[PerType].[MTD], [Date].[Fiscal].CurrentMember)
    I would expect that:
    ([Account].[CoA].[Standard Engagement Revenue], [Date].[PerType].[MTD])
    is sufficient.
    If the default week is specified in the slicer using a member of the natural hierachy (=> [Date].[Fiscal].x) it works.
    Why can't SSAS use the default member if it is must defined in the MDX script?
    Can someone explains me this. Thanks a lot in advance.

    Hi Ina,
    have you thought about adding a dynamic statement inside the MDX script? You could define the default member like this:
    ... DEFAULT_MEMBER = iif( Day( Now() ) = 3, <expression for previous month>, <expression for current month> );
    This way you don't need to change it everytime by running a script.
    By the way, what do you mean it doesn't update the default member? When you execute this MDX what does it says?
    with member measures.x as [Dimension].[HierarchyName].DefaultMember.Name
    select { measures.x } on 0 from Cubename
    If this returns the correct name, then the problem is somewhere else. I believe it should return you the correct name. Look here, test this on Adventure Works, statement by statement and see what happens.
    ALTER
    CUBE [Adventure Works]
    UPDATE
    DIMENSION [Product].[Product Categories],
    DEFAULT_MEMBER = [Product].[Product Categories].[Category].&[1]
    with
    member measures.x
    as [Product].[Product Categories].DefaultMember.Name
    select measures.x on 0
    from [Adventure Works]
    ALTER
    CUBE [Adventure Works]
    UPDATE
    DIMENSION [Product].[Product Categories],
    DEFAULT_MEMBER = [Product].[Product Categories].[All Products]
    with
    member measures.x
    as [Product].[Product Categories].DefaultMember.Name
    select measures.x on 0
    from [Adventure Works]
    I think you can see which members are default (on related hierarchies) using
    MDX Studio. This should help you detect which attributes have not moved accordingly and hence cause problems in your report. The usual suspects are those attributes used in your last month reports. If that's too much for you, just copy paste the definition
    of the measure x and use .CurrentMember instead .DefaultMember. And so for all related hierarchies of your dimension. You can run it as one query, just put enough measures (x1, x2, ...), one for each hierarchy, ok?
    Here's a test for Day():
    with
    member measures.y
    as
    iif( Day(Now()) = 28, 'Yes', 'No' )
    select
    measures.y on 0
    from [Adventure Works]
    Today this returns Yes, tomorrow it will be No.
    Ups, I just checked one more thing. When you run the script, it sets the default member only for that session. If you execute the first two of the four statements that I've sent you, it will set the default member on Bikes and show you that.
    But, if you open another query windows and execute that select statement (only), you'll see All member instead. So, it has set it to Bikes only for the currect session. Consequence? You reports are not aware of it. So, better use dynamic statement in
    your MDX script.
    Regards,
    Tomislav Piasevoli
    Business Intelligence Specialist
    www.softpro.hr

  • Error while executing the script adgetlnxver.sh

    Error while executing the script adgetlnxver.sh on apps&db tier during upgrade from 11.5.9 to 11.5.10.2
    -bash: [: -lt: unary operator expected
    [aptinst@dba5 TINST_dba5]$ sh adapcctl.sh restart
    adapcctl.sh version 115.55
    /u01/app/tinst/tinstappl/ad/11.5.0/bin/adgetlnxver.sh: line 123: [: -lt: unary operator expected
    Apache Web Server Listener :httpd ( pid 8645 ) is running.
    Restarting the Apache Web Server Dedicated HTTP Listener..
    Apache Web Server Listener (PLSQL) :httpd ( pid 8673 ) is running.
    Restarting the Apache Web Server Dedicated PLSQL Listener..
    adapcctl.sh: exiting with status 0
    In adgetlnxver.sh: line 123 says
    if [ ${setflag}x = "x" -a $os = "RH" ]; then
    redhatver=`grep -oP "Enterprise Linux [a-z A-Z 0-9]* release [0-9]+" /etc/redhat-release | sed 's/Enterprise Linux [a-z A-Z 0-9]* release //g'`
    if [ $redhatver -lt 5 ]; then
    LD_ASSUME_KERNEL="2.4.19"
    export LD_ASSUME_KERNEL
    fi
    fi
    Thanks,
    Vamsi

    Hi Vamsi.
    The exactly erro refers to a problems when you try upgrade from these version to 11.5.10.
    Can you read this note and apply solution? The note refers a patch, but the problem is the same.
    After Patch 4334965, adstrtal.sh & adstpall.sh is failing with errors [ID 360046.1]
    BR Rafael Ceolim

  • Afraid of executing a script on server

    I have to make a script which deletes all the folders and files in the following directories on Windows Server 2008:
    D:\frotxy\out\backup\
    D:\frotxy\in\backup\
    Yesterday I tried executing the script from my Desktop to delete the files in a test folder but unfortunately I had mistaken the path to this folder. What happened was my Desktop files were deleted - ARGHH! 
    So my question is is there a safer way to do the script and check it before executing it on the server as it is important not to delete some other directory or file from the server :)
    This is the script:
    set folder="D:\frotxy\out\backup"
    cd /d %folder%
    for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
    set folder="D:\frotxy\in\backup"
    cd /d %folder%
    for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
    And where should I place the file containing the script?
    I am not into scripts at all so please help!

    If the folder doesn't exist, you have no error checking there to handle the failure of the cd command, and you continue on with the "delete everything" part.  You can either check for the existence of the folder first, check for an error after
    the CD command, or not use relative paths at all and just pass folder in to the dir command (which would be my preference.)  Here's my example (note the quotation marks have been removed from the set folder line; they're hard-coded later on):
    set folder=D:\frotxy\in\backup
    for /F "delims=" %%i in ('dir /b "%folder%\*"') do (rmdir "%folder%\%%i" /s/q || del "%folder%\%%i" /s/q)
    Note:  I'm not sure what's going on with that (rmdir || del) bit.  To my knowledge, there's no "||" operator in batch files, and "|" doesn't make any sense here, but I've left the original code alone and only changed the bits related
    to where things will be deleted, not how they are deleted.
    Edit:  On a side note, this would be much safer and easier in PowerShell, which is Microsoft's current command-line interface and scripting language.  For example:
    $folder = 'D:\frotxy\in\backup'
    Get-ChildItem -Path "$folder\*" -Recurse -Force | Remove-Item -Force -WhatIf
    That -WhatIf switch on the end of the Remove-Item command is a common parameter in PowerShell.  It shows you what the command would have done, allowing you to make sure you like the results first.  Then you run it again without -WhatIf, and it deletes
    things for you.

  • How to execute vb script with out using Remote manager in oim 11g r2

    Hi Currently,
    i have a requirement to execute  vb script (present on a remote machine in which connector server is installed) from oim machine while using Exchange connector (11.1.1.6).
    This can be achieved by using remote manager,but i dont want to use remote manager.
    Hence decided to use Action scripts.
    As per connector configuration,
    i have configured Action scripts in Lookup.Exchange.UM.Configuration lookup definition, by means of three entries
    After Create Action Language      Shell
    After Create Action Target           Resource
    After Create Action File              /home/scripts/Disable.bat
    Disable.bat has the following ,
    Powershell.exe -File C:\scripts\Setup.vbs
    -%Log on Name%
      Exit
    As Setup.vbs is expecting a parameter of log on name, i was providing the same.
    But while creating the user,as this script gets called, getting the following error and hence 'create User' is getting failed.
    Problem while PowerShell execution System.Management.Automation.RemoteException: This task does not support recipients of this type. The specified recipient XXXXXXXXXXX...XXXXX is of type UserMailbox. Please make sure that this recipient matches the required recipient type for this task.
    While provisioning the user to Exchange , i have selected 'Recepient type' as 'User Mail box' explicitly, but still getting the error.
    Please provide any pointers to resolve the issue.
    Thanks in advance
    Kumar

    As far as I know Oracle and MySQL are two different products.
    Why do you clutter an Oracle forum with MySQL questions?
    If MySQL is such a tremendous RDBMS, like many people state (as 'free' means per definition better),
    why don't you visit a MySQL forum where fellow MySQL aficionados can answer you MySQL questions?
    In short, why don't you stop abusing Oracle forums?
    Sybrand Bakker
    Senior Oracle DBA

  • Dump while executing SAP Script

    Hello,
    My program is throwing a dump while executing this script. Request you all to please help me in removing this.
    /E   MAIN_DATA
    /:    BOX FRAME 10 TW
    PA To,  ,,Invoice No. & Date,,  &JVBRK-VBELN&  &JVBRK-FKDAT&
    PA M/s  &JKNA1-NAME1(35)&,,Your P.O. No.,,  &JVBAK-BSTNK&
    /*           &JKNA1-NAME2(35)&,,Truck No.,,  &JLIKP-TRAID&
    PA         &JKNA1-NAME2(35)&,,Truck No.,,  &WRK_VEHNO&
    PA         &JKNA1-ORT01(20)&,,LR No.& Date,,  &WRK_LRNO&   &JJ_1IEXCDTL-EXDAT& 
    /*           &JKNA1-REGIO(20)&,,Net Qty.in kgs.,,  &JLIPS-NTGEW(10.3L)&
    PA         &JKNA1-REGIO(20)&,,Net Qty.in kgs.,,  &W_NETWT(12.3L)& KG
    PA         ,,Material,,  &JVBRP-ARKTX(30)&
    My Report has the following code:
    FORM write_to_layout_set.
      PERFORM write_layout_set USING 'MAIN' 'SET' 'BODY' 'MAIN'.
      PERFORM write_layout_set USING '' 'SET' 'BODY' 'LOGO'.
      PERFORM write_layout_set USING '' 'SET' 'BODY' 'HEADER2'.
      PERFORM write_layout_set USING 'HEADER' 'SET' 'BODY' 'TEST2'.
      PERFORM write_layout_set USING 'FOOTER' 'SET' 'BODY' 'FOOTER2'.
      PERFORM write_layout_set USING '' 'SET' 'BODY' 'SIGN'.
    ENDFORM.                               " WRITE_TO_LAYOUT_SET
    FORM write_layout_set USING wrk_element
                                wrk_function
                                wrk_type
                                wrk_window.
      CALL FUNCTION 'WRITE_FORM'
         EXPORTING
               element       =  wrk_element
               function      =  wrk_function
               type          =  wrk_type
              window         =  wrk_window
       IMPORTING
            PENDING_LINES =
           EXCEPTIONS
                element       = 1
                function      = 2
                type          = 3
                unopened      = 4
                unstarted     = 5
                window        = 6
                OTHERS        = 7.
    +
      IF sy-subrc NE 0.
        PERFORM protocol_update.
      ENDIF.
    +
    ENDFORM.                               " WRITE_LAYOUT_SET

    As per my first reply you have to change the perform
    PERFORM write_layout_set USING 'MAIN' 'SET' 'BODY' 'MAIN'.
    to
    PERFORM write_layout_set USING 'MAIN_DATA' 'SET' 'BODY' 'MAIN'.
    and now check and one more thing whether this main_data element is in main window or not just check.
    if it does not work then just change &W_NETWT(12.3L)&  to
    &W_NETWT& and check

  • MDX script editing error generated at each keystroke

    I'm having the same issue in VS2012. When I edit an MDX script the error window pops open between each keystroke. I have to copy the script into notepad, edit, then return it to the MDX editor. Very annoying!!!

    Actually I get it in the Calculations tab of SSAS 2012 while inside Visual Studio 2012. I can toggle back and forth between script view and form view without error (and the build is clean), but when I start to type anything in form view it pops up the error
    window between every single key stroke.
    I've looked for options to turn off automatica error checking but don't see anything like that.
    chris choate
    Hi Chris,
    Could you please post the detail error message to us for further investigation? If possible, please post a screenshot about this issue.
    Personally, you can try to reinstall Business Intelligence for Visual Studio 2012 to see if this help.
    Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012:
    http://www.microsoft.com/en-us/download/details.aspx?id=36843
    Install SQL Server Data Tools - Business Intelligence for Visual Studio 2012:
    http://technet.microsoft.com/en-us/library/jj856966.aspx
    If you have any feedback on our support, please click
    here.
    Best Regards,
    Elvis Long
    TechNet Community Support

  • Error to execute the script through command prompt

    I tried to execute the script through command prompt. I got some following error. Could you please advice me how to rectify this.
    cscript D:\JS\Test.js
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
    D:\JS\Test.js(1, 1) Microsoft JScript runtime error: 'app' is undefined.
    Thanks,
    Prabudass

    I haven't use CS for quite some time and file associations may not work with the command prompt.
    You can try using Windows Explorer to browse to a .js file then right click on that file. From the popup menu choose Open With. Even if you see Photoshop in the file list choose Browse at the bottom. Browse to Photoshop and make sure to check 'Always use selected program...'
    If that doesn't work you will need to create an action that runs your script and make a droplet from that action. You can then use the droplet in the command prompt. You may also need to create a 'dummy' image file to launch the droplet with if you script doesn't require an open document at startup. See http://www.ps-scripts.com/bb/viewtopic.php?t=967

  • ABAP program to execute shell script !

    Hi Friends,
    I have created some shell scripts and need to be executed through ABAP prog in order to automate some process. can any one tell me how to execute these scripts through ABAP program? i know that we have to setup those scripts through SM69 but i dont have clear idea about this.can some one tell me step by step how to do this. ur help will be awarded in terms of points.
    Thanks

    Define the scripts as commands in SM69. Test them in SM69/SM49 to see if they work.
    Next, go to SE37, run FM SXPG_COMMAND_EXECUTE, and specify your command there. Does it work?
    If yes, you can just code a 'CALL FUNCTION' to this FM in your ABAP program, and you are ready to invoke your script from your ABAP.
    For  a list of functions that work with commands (defined in SM69), do a drop-down on SXPG_COMMAND* in SE37.
    A sample code may look like this
    concatenate zsys_id z_infile z_extfile into parm
        separated by space.
    *C_FTP_COMMAND is a script defined in SM49
        CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
          EXPORTING
            COMMANDNAME                   = C_FTP_COMMAND
            ADDITIONAL_PARAMETERS         = parm
            OPERATINGSYSTEM               = SY-OPSYS
          TABLES
            EXEC_PROTOCOL                 = PROT
          EXCEPTIONS
            NO_PERMISSION                 = 1
            COMMAND_NOT_FOUND             = 2
            PARAMETERS_TOO_LONG           = 3
            SECURITY_RISK                 = 4
            WRONG_CHECK_CALL_INTERFACE    = 5
            PROGRAM_START_ERROR           = 6
            PROGRAM_TERMINATION_ERROR     = 7
            X_ERROR                       = 8
            PARAMETER_EXPECTED            = 9
            TOO_MANY_PARAMETERS           = 10
            ILLEGAL_COMMAND               = 11
            WRONG_ASYNCHRONOUS_PARAMETERS = 12
            CANT_ENQ_TBTCO_ENTRY          = 13
            JOBCOUNT_GENERATION_ERROR     = 14
            OTHERS                        = 15.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        else.
          write: /, 'FTP Function module executed with no errors.'.
        ENDIF.

  • How can I execute a script before connection?.

    Hi ,
    I want to execute a script before retrieving the data.How can I do this?.
    Thanks...

    When you say create a command line, what exactly are you referring to? I assume you have a logical schema mapped to the ebs instance you want to run the fnd_global function in (the same one you will have reverse engineered the models from etc), just set that as the schema on the step parameters and ODI will connect through for you as a SQL session.
    Technology set to Oracle ?
    What does the error actually say in the operator log?
    ETA : might be worth checking a few of these links as the refer to EBS with ODI : Oracle EBS and ODI
    Some of the pre-shipped KM's must do something similar to what you are trying to achieve for the apps security.

  • Can you get the file name of the current executing TSQL script?

    Can you get the file name of the current executing TSQL script? I wrote entries to a generic log file and would like to include the script name.

    Okay, So What you can do is
    1. Read get the version from your  database and redirect it to a text file(SQLCMD outout can be directed to text file using -o option or windows redirection operator >)
    2. Now you can read this value from the text file either inside a batch file or a powershell script and decide what operations you can do. 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Some tags are not showing in SQL when executing the script as per Date

    A) When i am executing below script
    Select ToP 10000 [T_idx],[T_Tag], [T_date], [T_counter] from dbo.[total] ORDER BY T_DATE desc
    i am able to see all tags with respect to date except some tags prefix with ----PO, this 'PO' tags also present in the same table, with same time and date like other tags
    B) When executing below script
    Select top 10000 * FROM dbo.[total] where T_Tag like '%PO%' ORDER BY T_DATE DESC
    i am able to see all tags related to  PO
    How i can all tags including 'PO' with one script. can any one help me ??
    acmi

    Venkat,
    Select ToP 10000 [T_idx],[T_Tag], [T_date], [T_counter] from dbo.[total] ORDER BY T_DATE desc
    The above query MAY or MAY NOT give the records with taag ---PO as they might belong to a later data which might not fit into the top 10,000 dates of the table. This shud be the problem.
    If you want to see all the data irrespective of the number of rows, then below shud help:
    Select
    [T_idx],[T_Tag], [T_date], [T_counter]
    from dbo.[total]
    ORDER BY T_DATE desc
    If you need the rows that CONTAIN --PO then folowing shud do it:
    SELECT
    [T_idx],[T_Tag], [T_date], [T_counter]
    FROM dbo.[total]
    WHERE T_Tag like '%PO%'
    ORDER BY T_DATE desc
    If you need just the top 10,000 rows of the above result, then just add a TOP clause as below:
    SELECT
    TOP 10000
    [T_idx],[T_Tag], [T_date], [T_counter]
    FROM dbo.[total]
    WHERE T_Tag like '%PO%'
    ORDER BY T_DATE desc
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Executing mysql script file in java

    Hello,
    I am working on a research project that involves the creation of anywhere from 50 to 200 MySQL databases at a time. So far I am able to execute CREATE DATABASE commands successfully using the Statement.execute() command.
    So onto my problem.....
    I have the script files needed to create the tables for each database, but I cannot figure out how to run them through java. I am trying to execute a SOURCE /file_location/ statement, but I am getting "you have an error in your mysql syntax....".
    Does anyone know if there is a way to execute a script file from java?

    You mean to say that you have websphear application server (WAS) installed on Windows NT machine. Can you please share how you have deployed your application on WAS. The problem might be just because of configuration. What error/exception you are getting when you run application in WAS.

  • [JSP] I want execute a script only on click image

    Hello.Is it possible to execute a script JSP, only if I click on a image.
    Particulary i want to fill a field in a form only if I click on an image in the same page .jsp. In this field I should insert a name that I can recover like request.getParameter("name"); only if I click on image!!
    Thanks in advance to anyone for any insight.

    mmm. I can set a javaScript variable using JSP. How can I do?
    I have this scenario in my web site. Page 1 have a form where I can insert an username. On submit Page2.jsp has the script jsp at issue(String usr=request.getParameter("username")). In the same page there is the field to fill with above mentioned username when I click on image.
    So i could use usr to set a javaScript variable and onclick image I can set the field using JavaScript.
    If it is possible, there is another problem:
    All other people that access the page have to see the username of each other in the field(I need only two username).Using javaScript is not possible because JavaScript is client side.
    Is it right? (Sorry if I am boring)

  • Execute SQL scripts in Oracle DB

    Hi ,
    Can someone give stepbystep flow to execute sql scripts(patches) in oracle db on unix server.

    SQL scripts and patches are generally two completely different things.
    Assuming you are referring to patches that you download from My Oracle Support (MOS), each patch and patchset comes with a README. That README has specific instructions for installing that particular patch in whatever version of Oracle you have running on whatever operating system you have with whatever database options you have in use. It wouldn't make sense to try to summarize that document here-- we would undoubtedly leave something out that may be important to you and there may be patch-specific instructions.
    Justin

Maybe you are looking for