Cube script parameters

Hello!
Finally we are starting our huge migration project from 10.2.0.4 to 11.2.0.3. Now we are doing study what to change in our OLAP build scripts. Originally we use DML and now would like to build cubes using "proper" way. My question concerns clearing of variables. Are there any way to setup a parameter for dimension status for clear step in cube script?
Let's say I would like to define before execution the day I would like to clear from sales cube. How should I accomplish this without DML programming?
Thanks in advance!
Regards,
Kirill

Kirill,
Since you are moving from 10golap to 11golap, few points to keep in mind (for you and for others on this forum):
(1). Convert AW's calc measures logic from olap dml to new OLAP EXPRESSION syntax. http://docs.oracle.com/cd/E11882_01/olap.112/e23381/toc.htm
(2). If there is any olap dml program to populate an attribute, move that logic to relational side (i.e., in your dimension source view)
(3). Try to understand, how XML can be used to manage the AW and its objects. There are lot of posts by David Greenfield on this forum.
(4). Its very important to understand DBMS_CUBE package. Try to understand all its details, since you will use this a lot. http://docs.oracle.com/cd/E11882_01/appdev.112/e16760/d_cube.htm
(5). It is also important to use as little olap dml as possible, even for calc measures. Use this forum for any help you need with that. There should be only few cases now, where olap dml is necessary. Use the standard cube-aware olap dml statements: http://docs.oracle.com/cd/E11882_01/olap.112/e17122/dml_basics.htm#BABFDBDJ
(6). Logging is much extensive now. So if you have any code that relied on olapsys.XML_LOAD_LOG that need to be changed also.
http://docs.oracle.com/cd/E11882_01/appdev.112/e16760/d_cube_log.htm#ARPLS72789
(7). Use compressed cubes now. See David's post about how much to precompute: Question on cube build / query performance (11.2.0.3)
(8). If you have a RAC environment, then look at this new functionality where you can Pin dbms_cube.build parallel jobs to specific node on RAC Pin dbms_cube.build parallel jobs to specific node on RAC
(9). For any write-back to cube, see if you can use this tip: http://oracleolap.blogspot.com/2010/10/cell-level-write-back-via-plsql.html
(10). If you had any custom work done to improve looping during queries, then keep in mind that it is provided out-of-the-box now by properties like: $LOOP_VAR and $LOOP_DENSE
http://docs.oracle.com/cd/E11882_01/olap.112/e17122/dml_properties013.htm
http://docs.oracle.com/cd/E11882_01/olap.112/e17122/dml_properties014.htm
(11). Better features for handling security through AWM. http://docs.oracle.com/cd/E11882_01/olap.112/e17123/security.htm
(12). Cube Materialized Views features also available. You may or may not need it.
http://docs.oracle.com/cd/E11882_01/olap.112/e17123/admin.htm#CHDBCEGB
(13). OLAP_TABLE function is still fully supported. OBIEE 11.1.1.5 uses OLAP_TABLE to generate queries. So if you like you can continue using OLAP_TABLE, or you can look at the new CUBE_TABLE function: http://docs.oracle.com/cd/E11882_01/server.112/e17118/functions042.htm
And finally... Go through all David Greenfield's posts. You will find lot of good ideas on how to do things differently in 11gOLAP.
.

Similar Messages

  • Writing Unicode characters to scripting parameters on Windows

    I am trying to read/write a file path that supports Unicode characters to/from scripting parameters (PIDescriptorParameters) with an Export plug-in. This works fine on OS X by using AliasHandle together with the "typeAlias" resource type in the "aete" section of the plugin resource file.
    On Windows I am having trouble to make Photoshop correctly display paths with Unicode characters. I have tried:
    - Writing null-terminated char* (Windows-1252) in a "typePath" parameter -- this works but obviously does not support Unicode.
    - Writing null-terminated wchar* (UTF-16) in a "typePath" parameter -- this causes the saved path in the Action palette to be truncated to the first character, caused by null bytes in UTF-16. It appears PS does not understand UTF-16 in this case?
    - Creating an alias record with sPSAlias->WinNewAliasFromWidePath and storing in a "typePath" or "typeAlias" parameter -- this causes the Action palette to show "txtu&", which does not make sense to me at all.
    The question is: what is the correct scripting parameter resource type (typePath, typeAlias, ... ?) for file paths on Windows, and how do I write to it in such way that Photoshop will correctly display Unicode characters in the Actions palette?

    Hi
    Skip the first (4 or 6 characters) and you'll get the Unicode value.
    regards
    Bartek

  • How to add batch server group in script parameters

    Hi All,
    Is there any way to incorporate the "background server groups" directly in the script parameters in REDWOOD? There is an option to provide the target server in parameter TARGET_SERVER. But its not working if i maintain a server group. Any help will be appreciated.
    Thanks
    Arun Raghavan

    Hi Blom,
    Thanks for the reply. I am not able to find any parameter with the name TARGET_GROUP. Can I add this explicitly as a new parameter? But i am not sure how it will correlate to the batch server group in SAP. I also tried to import a job with target group defined. But the imported copy doesn't contain any values for it.

  • Read Scripting Parameters within a Filter

    Hello,
    I'd like to have a Plug In which can read Scripting Parameters and run accordignly.
    One of the code samples in the SDK is called "PoorMansTypeTool".
    In its documentation it is said to be able to "Read scripting parameters".
    I look into its code yet I couldn't figure how it does it.
    Let's say I have a script with a variable 'a'.
    The script launches a filter from the filter lists and want to pass the valu of the parameter 'a' to the filter.
    How could that be done?
    Are there any constraints on the parameter type, size, etc?
    Has anyone tried it before?
    If someone could guide me through the plug in code I'd be happy.
    Thank You.

    // make this a function so we can hide these from harness script
    main();
    function main() {
    // Save the current preferences
    var startRulerUnits = preferences.rulerUnits;
    var startTypeUnits = preferences.typeUnits;
    var startDisplayDialogs = displayDialogs;
    // Set Photoshop to use pixels and display no dialogs
    preferences.rulerUnits = Units.PIXELS;
    preferences.typeUnits = TypeUnits.PIXELS;
    displayDialogs = DialogModes.NO;
    // make this stuff controlled by the harness
    var maxTime = 1 * 60;
    var iterations = 5;
    var percIncrease = 20;
    var timeIt = new Timer();
    var tests = 0;
    var errors = 0;
    var eArray = new Array();
    var dissolveLog = new File( "~/Desktop/Dissolve.log" );
    dissolveLog.open( "w", "TEXT", "????" );
    dissolveLog.writeln( "width,\theight,\tdepth,\tpercent,\tdoc create time,\tdissolve time" );
    var maxWidth = 30000;
    var minWidth = 256;
    var incWidth = parseInt( (maxWidth - minWidth) / iterations );
    if ( incWidth == 0 )
              incWidth = 1;
    var maxHeight = 30000;
    var minHeight = 256;
    var incHeight = parseInt( (maxHeight - minHeight) / iterations );
    if ( incHeight == 0 )
              incHeight = 1;
    // start clean
    while (documents.length) {
        activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    var d = BitsPerChannelType.EIGHT;
    for ( var w = minWidth; w < maxWidth; w += incWidth ) {
              for ( var h = minHeight; h < maxHeight; h += incHeight ) {
                        try {
                                  var timeImport = new Timer();
                                  if ( d == BitsPerChannelType.EIGHT )
                                            d = BitsPerChannelType.SIXTEEN;
                                  else
                                            d = BitsPerChannelType.EIGHT;
                                  app.documents.add(UnitValue(w, "px"), UnitValue(h,"px"), undefined, "Dissolve Test", undefined, undefined, undefined, d);
                 timeImport.stop();
                                  if ( activeDocument.width != w )
                    error++; // alert( activeDocument.width + ", " + w );
                                  if ( activeDocument.height != h )
                    error++; // alert( activeDocument.height + ", " + h );
                                  if ( d == 16 && activeDocument.bitsPerChannel != BitsPerChannelType.SIXTEEN )
                    error++; // alert( activeDocument.bitsPerChannel + ", " + d );
                                  if ( d == 8 && activeDocument.bitsPerChannel != BitsPerChannelType.EIGHT )
                    error++; // alert( activeDocument.bitsPerChannel + ", " + d );
                                  if ( activeDocument.bitsPerChannel == BitsPerChannelType.ONE )
                    error++; // alert( activeDocument.bitsPerChannel + ", " + d );
                 FitOnScreen(); // this makes everything really slow
                                  var historyState = activeDocument.activeHistoryState;
                                  for ( var dPerc = 0; dPerc <= 100; dPerc += percIncrease ) {
                                            tests++;
                                            var timeDissolve = new Timer();
                                            Dissolve(dPerc);
                                            timeDissolve.stop();
                                            // WaitForRedraw(); // guess what this does to our slowness ness er
                                            dissolveLog.write(w + ",\t" + h + ",\t" + d + ", " + dPerc );
                                            dissolveLog.writeln(",\t" + timeImport.getTime() + ", " + timeDissolve.getTime() );
                     WaitForRedraw();
                                            activeDocument.activeHistoryState = historyState;
                    if ( timeIt.getElapsed() > maxTime ) {
                        w = maxWidth + 1;
                        h = maxHeight + 1;
                        dPerc = 101;
                        catch(e) {
                            alert(e + ":" + e.line);
                                  if ( e.message.search(/cancel/i) != -1 ) {
                                            w = maxWidth + 1;
                                            h = maxHeight + 1;
                                  eArray[eArray.length] = e;
                                  errors++;
                                  // debugger;
                        } // end catch
              } // end for height
    } // end for width
    dissolveLog.writeln( errors + " errors. " + tests + " tests in " + timeIt.getElapsed() + " seconds. " + tests/timeIt.getElapsed() + " tests/sec.");
    dissolveLog.close();
    dissolveLog.execute();
    // end clean
    while (documents.length) {
        activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    // Reset the application preferences
    preferences.rulerUnits = startRulerUnits;
    preferences.typeUnits = startTypeUnits;
    displayDialogs = startDisplayDialogs;
    //     1) " FAIL" for failures
    //     2) " PASS" for test results OK
    //     3) "  BUG" for known bugs, have the file name give the bug number
    //     4) "ERROR" this comes from the harness if the script barfed/exception,
    return errors == 0 ? ' PASS' : ' FAIL';
    } // end function main
      Function WaitForRedraw
      Usage: Use it to force Photoshop to redraw the screen before continuing
      Example:
           WaitForRedraw();
    function WaitForRedraw() {
              var keyID = charIDToTypeID( "Stte" );
              var desc = new ActionDescriptor();
              desc.putEnumerated( keyID, keyID, charIDToTypeID( "RdCm" ) );
              executeAction( charIDToTypeID( "Wait" ), desc, DialogModes.NO );
    // WaitNSeconds, slow the script down so you can watch and figure out issues
    function WaitNSeconds(seconds) {
       startDate = new Date();
       endDate = new Date();
       while ((endDate.getTime() - startDate.getTime()) < (1000 * seconds))
                        endDate = new Date();
    // FitOnScreen, fits the document and redraws the screen
    function FitOnScreen() {
              var id45 = charIDToTypeID( "slct" );
        var desc7 = new ActionDescriptor();
        var id46 = charIDToTypeID( "null" );
              var ref1 = new ActionReference();
              var id47 = charIDToTypeID( "Mn  " );
              var id48 = charIDToTypeID( "MnIt" );
              var id49 = charIDToTypeID( "FtOn" );
              ref1.putEnumerated( id47, id48, id49 );
              desc7.putReference( id46, ref1 );
              executeAction( id45, desc7, DialogModes.NO );
    // Dissolve, given a percentage
    function Dissolve( dPercent ) {
              var id18 = stringIDToTypeID( "d9543b0c-3c91-11d4-97bc-00b0d0204936" );
        var desc3 = new ActionDescriptor();
        var id19 = charIDToTypeID( "Amnt" );
        var id20 = charIDToTypeID( "#Prc" );
        desc3.putUnitDouble( id19, id20, dPercent );
        var id21 = charIDToTypeID( "disP" );
        var id22 = charIDToTypeID( "mooD" );
        var id23 = charIDToTypeID( "moD1" );
        desc3.putEnumerated( id21, id22, id23 );
              executeAction( id18, desc3, DialogModes.NO );
    // DissolveOld, our old scripting params was this
    // an interesting test would be to see the old plug-in vs the current one
    function DissolveOld( dPercent ) {
        var id12 = charIDToTypeID( "disS" );
        var desc3 = new ActionDescriptor();
        var id13 = charIDToTypeID( "Amnt" );
        var id14 = charIDToTypeID( "#Prc" );
        desc3.putUnitDouble( id13, id14, dPercent );
        var id15 = charIDToTypeID( "disP" );
        var id16 = charIDToTypeID( "mooD" );
        var id17 = charIDToTypeID( "moD1" );
        desc3.putEnumerated( id15, id16, id17 );
        executeAction( id12, desc3, DialogModes.NO );
    // Library for timing things in JavaScript
    function Timer() {
              // member variables
              this.startTime = new Date();
              this.endTime = new Date();
              // member functions
              // reset the start time to now
              this.start = function () { this.startTime = new Date(); }
              // reset the end time to now
              this.stop = function () { this.endTime = new Date(); }
              // get the difference in milliseconds between start and stop
              this.getTime = function () { return (this.endTime.getTime() - this.startTime.getTime()) / 1000; }
              // get the current elapsed time from start to now, this sets the endTime
              this.getElapsed = function () { this.endTime = new Date(); return this.getTime(); }
    // end Dissolve.jsx

  • Project Online - Cube script for building files

    Hi
    We have to use Project Online for our solution and we need to build a reporting database in SQL.
    Instead of building the schema manually,are there any pre built 2013 ones for use?
    Also, would there be any ETL scripts for building the cubes available or are all of these only developed through paid services - ie Project Hosts, Agorain?
    Regards
    Sean 

    Hello,
    There are some SSIS package examples / blog posts you can start with but each organisation would have different requirements so it would be difficult to have a pre-built production SSIS package that suited all. The links below might help get you started
    with creating your custom SQL Reporting database / data warehouse:
    http://pwmather.wordpress.com/2014/03/26/projectonline-data-via-odata-and-ssis-in-sql-database-table-on-premise-msproject-sharepointonline-bi-ssrs-office365-cloud/
    http://nearbaseline.com/blog/2014/04/project-site-custom-list-reporting-using-ssis-odata-connector/
    http://msdn.microsoft.com/en-us/library/office/dn794163(v=office.15).aspx &
    http://www.microsoft.com/en-us/download/details.aspx?id=43736
    To create an OLAP cube from you custom data warehouse would required you to create the code to do that. You could look at using one of the Microsoft partners to do all of this for you as a paid service.
    http://office.microsoft.com/en-gb/project/microsoft-project-partner-resources-ms-project-FX103802119.aspx
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • EventOpen action play results in error when adding scripting parameters

    Hi all,
    I have a setup that involves two plugins:
    A file format plugin which I've made scripting-aware and takes one parameter and,
    An automation plugin that opens a number of files of this format and which passes the parameter to the first plugin.
    For achieving this, I am playing eventOpen via the Action Control Suite, and using the code the Listener plugin from the SDK generates:
    SPErr PlayeventOpen(/*your parameters go here*/void)
         PIActionDescriptor result = NULL;
         DescriptorTypeID runtimeKeyID;
         DescriptorTypeID runtimeTypeID;
         DescriptorTypeID runtimeObjID;
         DescriptorTypeID runtimeEnumID;
         DescriptorTypeID runtimeClassID;
         DescriptorTypeID runtimePropID;
         DescriptorTypeID runtimeUnitID;
         SPErr error = kSPNoError;
         // Move this to the top of the routine!
         PIActionDescriptor desc0000000000000570 = NULL;
         error = sPSActionDescriptor->Make(&desc0000000000000570);
         if (error) goto returnError;
         // Move this to the top of the routine!
         Handle aliasValue = NULL;
         FullPathToAlias("C:\dev\data\test.dat", aliasValue);
         error = sPSActionDescriptor->PutAlias(desc0000000000000570, keyNull, aliasValue);
         if (error) goto returnError;
              // Move this to the top of the routine!
              PIActionDescriptor desc0000000000000578 = NULL;
              error = sPSActionDescriptor->Make(&desc0000000000000578);
              if (error) goto returnError;
              error = sPSActionDescriptor->PutFloat(desc0000000000000578, keyGamma, 2.2);
              if (error) goto returnError;
         error = sPSActionDescriptor->PutObject(desc0000000000000570, keyAs, 'tdfP', desc0000000000000578);
         if (error) goto returnError;
         error = sPSActionControl->Play(&result, eventOpen, desc0000000000000570, plugInDialogSilent);
         if (error) goto returnError;
    returnError:
         if (result != NULL) sPSActionDescriptor->Free(result);
         if (desc0000000000000570 != NULL) sPSActionDescriptor->Free(desc0000000000000570);
         if (aliasValue != NULL) sPSHandle->Dispose(aliasValue);
         if (desc0000000000000578 != NULL) sPSActionDescriptor->Free(desc0000000000000578);
         return error;
    By using this code, the call in line 47 returns an error code -25923 and the error string contains "The parameters for command “Open” are not currently valid.".
    These are some of the things I've tried already:
    Escaping the file path backslashes does not seem to help although it seems necessary.
    Playing the event with no parameter (remove lines 27:36) does work.
    Playing the event thought the Actions tab results in a dialog for browsing a file being open and no parameters are passed to my plugin.
    Changing plugInDialogSilent to plugInDialogDontDisplay in line 43 causes the same effect as the previous point.
    The plugin writes correctly the parameter into the scripting plugin (when provided via its UI) but it seems that somehow it is not able to retrieve it correctly when passed via the host application.
    In case it helps, this is the relevant part of my PiPL resources file:
    resource 'aete' (ResourceID, plugInName " dictionary", purgeable)
      1, 0, english, roman, /* aete version and language specifiers */
           vendorName, /* vendor suite name */
           "", /* optional description */
           plugInSuiteID, /* suite ID */
           1, /* suite code, must be 1 */
           1, /* suite level, must be 1 */
           {}, /* structure for filters */
           {      /* non-filter plug-in class here */
                plugInName,     /* unique class name */
                plugInClassID, /* class ID, must be unique or Suite ID */
                plugInAETEComment, /* optional description */
                {      /* define inheritance */
                     "<Inheritance>", /* must be exactly this */
                     keyInherits, /* must be keyInherits */
                     classFormat, /* parent: Format, Import, Export */
                     "parent class format", /* optional description */
                     flagsSingleProperty, /* if properties, list below */
                    "gamma",
                     keyGamma,
                     typeFloat,
                     "Source data gamma",
                     flagsSingleProperty
                     /* no properties */
                {}, /* elements (not supported) */
                /* class descriptions */
           {}, /* comparison ops (not supported) */
           {} /* any enumerations */
    I'll appreciate any help
    Thanks.

    Hi,
    If anyone come across this issue in the future, I've manged to get it working with what it seems to be a workaround by using the plugin runtime descriptor, replacing line 39 with the following code:
    error = sPSActionDescriptor->StringIDToTypeID("Test Data Plug-In", &runtimeObjOD));
    if (error) goto returnError;
    error = sPSActionDescriptor->PutObject(desc0000000000000570, keyAs, runtimeObjID, desc0000000000000578); 
    I'm not sure if anyone from the dev team can help clarify what's going on here, but seems to be either a bug in the Action Control Suite or the Listener plugin from the SDK not generating the correct output.
    Thanks.

  • Error trap on extraneous script parameters

    I have a script that accepts named parameters at the command line, and I would like to error trap any extraneous parameters, rather than having a malformed shortcut cause an error. I tried just wrapping the Param section at the top of the script in a Try/Catch
    but that doesn't work at all. Is there any mechanism to address this more gracefully, or do i just need to document proper argument syntax and let users see the error if they mess it up?
    Note, I used Try/Catch with and without cmdletbinding, and with camdletbinding in and out of the Try. Some variations caused errors, and some caused all parameters to be ignored, even the ones that where correctly being passed.
    Gordon

    So, basically what I want to do is have two named parameters, one required and one optional, and then catch the error when someone includes a third, or gets a name wrong. It seems like there is no way to catch that, you are just going to get a standard
    PowerShell error. Not the end of the world, but like not being able to natively run a powershell script with no console at all, a little annoying, if in fact it can't be done.
    It sounds like this is what you want (as far as the 1 mandatory and 1 option params go):
    Function Test {
    [cmdletbinding()]
    Param (
    [parameter(Mandatory=$True)]
    [string]$Param1,
    [parameter()]
    [string]$Param1
    #CODE HERE
    Unfortunately, you will not be able to get around the issue of someone attempting to use a 3rd parameter and having an error thrown. This will happen at runtime and can't be caught.
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Script parameters

    I have some scripts in the repository that I'm trying to use to build an applications data from. Some include parameters in the where clause of the insert statements such as:
    d.date_due_at_dock_rev >= to_date(:P1_START_DATE,'DD-MON-YY') and
    I keep getting ORA-00904 and ORA-00911 errors when I set the parameters on the parameter page when I try to run them.
    I've checked the manual (chapt 5) and tried using &P1_START_DATE and also #P1_START_DATE# with no luck.
    What is the correct syntax for this???
    Greg

    >
    Ok..
    But , is there another way to send a script to
    DataBase ? Maybe another class that provide to set
    parameter value by name.I'm almost certain there's not in the core API. You might find something from a 3rd party if you're good with google.
    But what are you really trying to do? Why do you need to do it by name?
    Depending on your ultimate goal, you might want to look at an object-relational bridge tool such as [url http://www.hibernate.org]Hibernate.

  • Maitain cube script clarification

    Guys,
    I have already posted one of the thread regarding Maintain cube/AWM script in the discoverer forum
    Thread ID
    What is MaxJobQueues,RunSolve and CleanMeasures in Maintain AWM Script??
    Sorry to post again in the same question in different forum/Way??.
    I am not able to understand what is the meaning of RunSolve and cleanMeasures when this parameter values changes from true,false to false,true/false,false
    and Why we want to give MaxJobQueues!!!???
    Anybody can clarify the same.
    Thanks for your timings!!!
    Nats

    for RunSolve and cleanMeasures not sure....
    for maxjobqueues I would say that if you are specifying some value then u will see that while you run the maintainance task it will pick the partition and run x number of processes in parallel , here x is the number u specified. it will not run in parallel x partitions but for each partition task will be divided into x process and run in parallel. you can see these into table called xml_load_log in olapsys schema.
    hope this helps..!!!
    Thanks
    Brijesh

  • Scripts Parameters

    Hello everyone,
    I've created a file named grant.sql (on oracle 9i)which contains following query:
    grant all on &table to ms23 with grant option;
    The problem is after providing input for first time, it doesn't ask for the same in subsequently executions.
    can somebody tell me what the problem is ... ???

    Not sure why you want to do it. There could be a whole bunch of other solutions, once we know what the problem (business case) ist.
    Also you can consider the follwoing approach
    grant all on &1 to ms23 with grant option;
    then call the script with
    @yourScript TableName
    @yourScript TableName2
    @yourScript TableName3
    @yourScript TableName4
    @yourScript TableName5

  • Need to Understand 2 Scripting parameters

    Hi, 
    Can someone tell me what this is doing in script of ActiveSync stats:
    $EASDevices = “”
    $AllEASDevices = @()
    The complete script is:
    ####  Get Mailbox
    $EASDevices = “”
    $AllEASDevices = @()
    $EASDevices = “”| select ‘User’,'PrimarySMTPAddress’,'DeviceType’,'DeviceModel’,'DeviceOS’, ‘LastSyncAttemptTime’,'LastSuccessSync’
    $EasMailboxes = Get-Mailbox -ResultSize unlimited
    foreach ($EASUser in $EasMailboxes) {
    $EASDevices.user = $EASUser.displayname
    $EASDevices.PrimarySMTPAddress = $EASUser.PrimarySMTPAddress.tostring()
        foreach ($EASUserDevices in Get-ActiveSyncDevice -Mailbox $EasUser.alias) {
        $EASDeviceStatistics = $EASUserDevices | Get-ActiveSyncDeviceStatistics
        $EASDevices.devicetype = $EASUserDevices.devicetype
        $EASDevices.devicemodel = $EASUserDevices.devicemodel
        $EASDevices.deviceos = $EASUserDevices.deviceos
        $EASDevices.lastsyncattempttime = $EASDeviceStatistics.lastsyncattempttime
        $EASDevices.lastsuccesssync = $EASDeviceStatistics.lastsuccesssync
        $AllEASDevices += $EASDevices | select user,primarysmtpaddress,devicetype,devicemodel,deviceos,lastsyncattempttime,lastsuccesssync
    $AllEASDevices = $AllEASDevices | sort user
    $AllEASDevices
    $AllEASDevices | Export-Csv $exportpath\ActiveSyncReport.csv
    Hasan

    They are just creating empty varibles so that data can be added to them later in the script.
    The first one
    $EASDevices = “”
    creates an empty string.
    the second one
    $AllEASDevices = @()
    creates an empty array.
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com
    Hi DJ, 
    What is the purpose of empty string. 
    Hasan

  • Problem with script parameters

    Hi,
    I want to pass the parameter 'RTE REFERENCE' to a script.
    Here is my script :
    define UTIL = &1
    set serveroutput on
    declare
    UTI VARCHAR2(20);
    begin
    dbms_output.enable(100000);
    UTI := '&UTIL';
    dbms_output.put_line('Valeur passée en paramètre : '||UTI);
    end;
    EXIT;
    I run the script as following :
    sqlplus -S infolig/xxxx@REFI @test.sql 'RTE REFERENCE'
    If I replace 'RTE REFERENCE' by "RTE REFERENCE", I obtain the same result.
    But dbms_output returns RTE instead of RTE REFERENCE.
    What is the problem ?
    Regards,
    Rachel

    or you can simplify it by:
      set serveroutput on
      declare
        UTI VARCHAR2(20) := '&1';;
      begin
        dbms_output.enable(100000); 
        dbms_output.put_line('Valeur passée en paramètre : '||UTI);
      end;
      EXIT;

  • [shellscript] Passing a script with parameters to AT

    Hey everybody,
    I would like to learn shell scripting so I created a script to mount/unmount my truecrypt volume. This is what I have so far:
    #!/bin/bash
    case "$1" in
    start)
    truecrypt -k '' /dev/array/vault /home/<user>/vault
    stop)
    truecrypt -d /home/<user>/vault
    echo "usage: $0 (start|stop)"
    esac
    exit 0
    Now I would like to add another feature. I want it to automatically unmount after 2 hours. I found the "at" command which should be able to do this.
    I would need to do something like:
    start)
    truecrypt -k '' /dev/array/vault /home/<user>/vault
    at -f "$1 stop" now + 2 hours
    However, running just " at -f "./vault.sh start" now + 2 minutes " fails:
    warning: commands will be executed using /bin/sh
    Cannot open input file ./vault.sh start: No such file or directory
    If I can get this working I would like the "stop" code to remove any scheduled stop operations (for when I do it manually).  Also, I would like to include a "keepalive" function that allows me to kill the scheduled stop task and reschedule it again to restart the countdown. This would allow me to keep the volume mounted if I want to use it for a longer period of time.
    Is it possible to execute scripts + parameters with "at"?  Can somebody help me to make this work?
    Thanks a bunch!
    P.S: Truecrypt also keeps asking me this:
    Protect hidden volume (if any)? (y=Yes/n=No) [No]:
    I would like to specify this in the command so that I don't have to hit enter every time. I've looked at the man page but found nothing helpfull. Anyone?

    Make sure that vault.sh exists in the directory that you are executing it from. It may be better to refer to the whole file location rather than just './'. eg use " at -f "~/vault.sh start" now + 2 minutes " rather than just  " at -f "./vault.sh start" now + 2 minutes ".
    Providing thatyou are happy for TrueCrypt to accept the default answer for any questions it asks you can just pipe yes into it:
    yes | truecrypt -k '' /dev/array/vault ~/vault
    Yes will 'press enter' to any questions that TrueCrypt asks.
    Last edited by gadget3000 (2011-07-14 16:46:01)

  • Pass parameters to MNU_eDATA_SELECTPACKAGE macro

    Hi!
    Is it possible to pass additional parameters to MNU_eDATA_SELECTPACKAGE (dimension members to fill promt automatically)?
    Thank you in advance for any help.

    Dear Andrei Loginovskiy,
    Unfortunately, it's impossible to run packages from VBA with automatic passing parameters to package (at least at the current moment).
    However, it's possble to solve your problem for running scripts.
    I have created workaround for running Script Logic with parameteres. So, the user just click the button, VBA determine parameters for the script.
    We created indepedent cube with dimensions which can be used as parameters for script. Also we created special dimension TASK which attributes describe script which has to be run and the cube (in which the script have to be run). Then we created BADI (ABAP) which catch saving records to this cube, load parameters from the records and run scripts which is saved in attributes of TASK.
    Some important points:
    - dimensions which are used for these cube contain special base members which describe aggregated members through attributes, so the badi can be run for "2010.TOTAL" or "ALL_ENTITIES"
    - To run scripts we are using RUNLOGIC technology which has been created in 7.5 SP4 but it doesn't mean that it is impossible to run ABAP functions which compile and run script logic in 7.0 or 7.5 SP3 version.
    This technology seems to be a little bit difficult however it is not difficult to realize. Practically, this technology is part of our custom developed workflow. if you want you can write me, I will provide your contacts of the freelancer who write me BADIs for this design.
    Pavel

  • Script privilege errors

    I'm trying to install sharepoint tools to users machines. This requires admin privledges. The script below is in a .bat files and installs the product no problems with admin rights. To be able to apply this to users when they log on is where I'm stuck.
    Ive tried it as a computer startup script in GPO when the computer starts but it doesnt do anything. Its also hard to know as you cant see any messages.
    Any suggestions?
    script below:
    setlocal
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    REM Get ProductName from the Office product's core Setup.xml file, and then add "office14." as a prefix.
    set ProductName=Office14.SharePointDesigner
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\clientsource\clientSource\Sharepoint
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\clientsource\clientSource\Sharepoint\SharePointDesigner.WW\config.xml
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation=\\clientsource\clientsource\Sharepoint\log
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line.
    REM *********************************************************************
    IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
    REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
    :ARP64
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if NOT %errorlevel%==1 (goto End)
    REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
    :ARP86
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if %errorlevel%==1 (goto DeployOffice) else (goto End)
    REM If 1 returned, the product was not found. Run setup here.
    :DeployOffice
    start /wait %DeployServer%\setup.exe /config %ConfigFile%
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
    REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
    :End
    Endlocal

    Hello,
    Have you checked that the script is in a place where it can be run with the local system account of the computer the "default" location of the scripts is \\domain.com\SysVol\domain.com\scripts OR inside the Group Policy.
    Have you checked that the Group policy / script are assigned to the right place (common mistake). If you assign COMPUTER-settings make sure the GP is assigned so that the test computer will get the policy (you can the rcop.msc or GPRESULT /h c:\pathherewhereyouwanttheraport.html
    to make sure the computer really gets the right policy)
    When you have created the group policy and selected: Computer Configuration, Windows settings, Scripts (Startup/Shutdown), Startup. On Scripts-tab selected ADD. please check that the information is
    right
    Script name: MyScript.bat
    Script Parameters (the path where the script is located comes here): \\domain.com\SysVol\domain.com\Policies\{557740FF-AFAE-4300-9BD7-B90555FDA1BE}\Machine\Scripts\Startup

Maybe you are looking for