Fastest way to grant cube permissions per AMO (250 roles, 30 cubes)?

Hi there,
can anybody tell me the fastest way to grant cube permissions in a scenario, where for example 250 roles have to be granted for 30 cubes?
Now, I do it with AMO, iterating throgh the roles, setting cube permissions.
My method for granting access looks like this:
public void GrantCubePermission(Role pRole, Database pDatabase, string pCubeName, ReadAccess pReadAccess, WriteAccess pWriteAccess, ReadSourceDataAccess pReadSourceDataAccess, bool pProcess, ReadDefinitionAccess pReadDefinitionAccess)
try
if (pRole == null) return;
Cube cube = pDatabase.Cubes.FindByName(pCubeName);
if (cube == null) return;
CubePermission cubePermission = cube.CubePermissions.FindByRole(pRole.ID);
if (cubePermission == null)
cubePermission = cube.CubePermissions.Add(pRole.ID);
cubePermission.Read = pReadAccess;
cubePermission.Write = pWriteAccess;
cubePermission.ReadSourceData = pReadSourceDataAccess;
cubePermission.Process = pProcess;
cubePermission.ReadDefinition = pReadDefinitionAccess;
cubePermission.Update(UpdateOptions.AlterDependents, UpdateMode.UpdateOrCreate);
catch (Exception ex)
Msg(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Doing it this way, the operation tooks about 4 seconds per role (the given method is executed 30 times per role, the number of the cubes to be granted for).
Finally, for 250 roles, the operation tooks about 16 minutes.
Is there a way to do it faster?

Did you consider XMLA ?
<
Createxmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
    <
ParentObject>
        <
DatabaseID>DAtabasename</DatabaseID>
    </
ParentObject>
    <
ObjectDefinition>
        <
Rolexmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100"xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300"xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300"xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400"xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400">
            <
ID>Role</ID>
            <
Name>ReadRole</Name>
            <
Members>
                <
Member>
                    <
Name>domain\user</Name>
                </
Member>
                <
Member>
            </
Members>
        </
Role>
    </
ObjectDefinition>
</
Create>

Similar Messages

  • Fastest way to calculate total sales per material?

    I'm creating a report where I need the total sum of sales per material. 
    Is the fastest & most efficient / only way to do this by querying VBAP?  We're talking about millions of lines.
    I guess I'm hoping that there is a FM already in place or that some sort of summary table exists.
    Any ideas?

    There is no FM. In the program you should be able to use table VAPMA, which has the same data as VBAP but the primary key is MATNR.
    Depending on the requirements, it might be beneficial to create an info structure (LIS) to track summarized sales. Your SD consultant should be able to do that, there is no programming required.
    Hope this helps.

  • Per-service SID's are not being granted correct permissions

    Hi,
    I had posted this here :
    https://connect.microsoft.com/SQLServer/feedback/details/770984/per-service-sid-s-are-not-being-granted-correct-permissions, but no response as yet.
    When installing SQL 2012 (on a VMWare VM), based on the following article :
    http://msdn.microsoft.com/en-us/library/ms143504(v=sql.110), I have noticed that the SQL per service SIDs are not being granted the correct permissions. From the initial install, the following is what was observed (the red x's being permissions that
    should have been granted but were not).
    When re-installing and changing from specifying a domain account, to the default values, during set-up, the 4 service SIDs that were not added to 'Log on as a Service' initially were then correctly granted permission, but the other 4 in 'Bypass traverse
    checking', 'Adjust Memory Quotas for a process' and 'Impersonate a Client after authentication' were still not added.
    When running a repair on this install, 'NT Service\MSSQLFDLauncher' was then granted the correct permissions, but 'NT SERVICE\MsDtsServer110' was still missing 'Bypass traverse checking' and 'Impersonate a Client after authentication'.
    This also resulted in the installation of Reporting Services - Native failing in the original installation with 'Attempted to perform an unauthorized operation'.
    If anyone has recently installed SQL 2012, can you check (via gpedit.msc) that the correct 'User Right Assignment' was granted to the per Service SIDs as per
    http://msdn.microsoft.com/en-us/library/ms143504(v=sql.110) ?

    Have you resolved this yet?  Group policy for the OU with my desktop removes all SQL per-service rights.  If group policy is your issue, I'd be interested in how some are retained.  
    Randy in Marin

  • Fastest way to read a 5MB textfile (200,000 lines)?

    My current code:
    String file = "";
    BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
    while(in.ready()) file = file.concat(in.readLine());Unfortunately it is awfully slow (starting with 2,000 lines per second but dropping to like 100 lines per second over time). What is the fastest way to load the content of that file in a string and out of curiosity, why are my lines per second dropping?
    Thank you for your help!

    tjacobs01 wrote:
    This is exactly what I've done - it's the fastest thing out there. One thing to comment on though: Using a BufferedInputStream is not necessary; BufferedInputStream only improves performance if you're doing inefficient reading (such as reading blocks by newlines). If you doubt what I'm saying set up a quick performance test bed and test it... I did this a while back which is why I know the truth :)I believe you. Thanks for the tip.
    In my case I needed the BIS because I only wanted to load the 40 MB audio file in 1 MB chunks at a time
    to process it and store it in my own representation.

  • Is there a best practice way of segregating biztalk permissions across the SDLC?

    I'm working on the SQL Server side of things, helping some people set up a biztalk project. There are some issues with figuring out the SQL permissions required by biztalk and how to set them up.
    I have read the guide
    here which indicates which SQL permissions to assign to which AD groups. I assume these groups are created by the biztalk install process (if that's not true then please let me know).
    I generally try to grant SQL permissions to AD groups rather than individual users, but it seems like all of the biztalk services (dev, uat and production) would be using the same AD groups (eg, "SSO Administrators"). So if I grant permission to the
    groups, then all biztalk services would be able to access all SQL Servers. For example, someone could point the development biztalk services at the production biztalk SQL server, and it would work because on both SQL Servers the permission would be assigned
    to the same AD group.
    Is there any way to have biztalk create, for example, the AD group "SSO Administrators - DEV" and "SSO Administrators - UAT" so that I can prevent biztalk from violating SDLC boundaries, or do I just have to accept this in biztalk-land?

    Yes, our SQL services and biztalk serviecs are hosted on different machines, but that's not really relevant to this particular topic.
    Yep, the goal here is to assign the appropriate rights to the appropriate groups.
    You said "Separate AD windows group for Production and Test Environment is preferred"
    - I definitely agree. But this is the reason for the question. If the biztalk install creates the AD groups (SSO Administrators, SSO Affiliate adminstrators, Biztalk Administrators, Biztalk Host users, etc) then every biztalk install (dev, UAT and prod) will
    all use the same AD groups. If permissions in SQL are assigned to these groups, then it doesn't seem possible for different phases of the SLDC to be accessible only to specific biztalk services. In other words, it doesn't seem like I can enforce the idea that
    the biztalk dev services should only be able to access the biztalk dev databases.

  • Fastest way to transfert data from cRIO

    Is anybody know the fastest way to transfert data from cRIO? I tested shared variable, but it's not fast enough. What is the fastest speed could we achieve with shared variable in cRIO? how can I transfert 50000 32 bit word per second from cRIO to my PC? This should run 24h/day.
    Thanks
    B.
    Benoit Séguin
    Software Designer

    Hi Benoit,
    Thanks for your post and I hope your well. I noticed you've not received a reply - and I would like offer my advice.
    Shared variables are one way to communicate over the Ethernet. You can use UDP, TCP and VI Server also. 
    UDP is the fastest network protocol but it includes little error handling and can lose data. TCP is commonly used for large systems. TCP takes more programming effort than shared variables, however, it provides a good mix of speed and reliability. You can use the VI server to run Vis and/or access and set the value of controls and indictors, but it is slower and not recommended for larger data sets. 
    Please let me know what you think,
    Kind Regards,
    James.
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • Fastest way to activate the camera?

    What is the fastest way to activate the camera on the iPhone 3GS? (rather than pressing the on key; going to camera app;etc).

    As to another place to click, I am in some doubt there. When I updated, it was just one of those things available and I did this in one go (as per previous post). I am not sure why this is not working in your case, but did you try powering down and then turning it back on again?
    As to the point about 3.1.2 and 3.1.3 I so not think that makes a difference.
    Ah, going straight from a locked phone to the camera? I know that one: no. And I regret this as much as you. How do you know you are going to take a spontaneous shot, eh?
    A later note on your settings and iLukeKendall's input: you both have the iPod Controls Off, while mine are ON, but the double click reveals the camera for me. Hmmmm.

  • Most efficient/quickest way to set NTFS permissions in PowerShell

    Hello all,
    Trying to figure out what the most efficient/quickest way to set NTFS permissions via PowerShell is. I am currently using ICACLS but it is taking FOREVER as I can't figure out how to make inheritance work with this command.
    This has prompted me to begin looking at other options for setting NTFS permissions in PowerShell, and I wondered what everyone here likes to use for this task in PowerShell?

    Ah ok. Unfortunately, my ICACLS is taking FOREVER. Here is the code I'm using:
    ICACLS "C:\users\[user]\Desktop\test" /grant:r ("[user]" + ':r') /T /C /Q
    However:
    1.  I can't figure out how to make the inheritance parameter work with ICACLS
    2. If I do make the inheritance parameter work with ICACLS, I still need a way to add the permission to child objects that aren't inheriting.
    Any tips on how to improve performance of ICACLS?
    1. icacls folder /grant GROUPNAME:(OI)(CI)(F)  (i will post corrected code later, this works in CMD but not powershell couse of bracers)
    2.  get-childitem -recurse -force |?{$_.psiscontainer} |%{icacls ....}  (or u can list only folders where inheritance is disabled and apply icacls just on them)
    I think jrv and Mekac answered the first question about inheritance flags. I would just add that you probably don't want to use the /T switch with icacls.exe because that appears to set an explicit entry on all child items (that's probably why it's taking
    so long).
    For your second question, I'd suggest using the Get-Acl cmdlet. It throws terminating errors, so I usually wrap it in a try/catch block. Something like this might work if you just wanted the paths to files/folders that aren't inheriting permissions:
    dir $Path -Recurse | ForEach-Object {
    try {
    Get-Acl $_.FullName | where { $_.AreAccessRulesProtected } | ForEach-Object { Convert-Path $_.Path }
    catch {
    Write-Error ("Get-Acl error: {0}" -f $_.Exception.Message)
    return
    If you're looking for speed/performance, you don't want to just use the PowerShell Access Control (PAC) module that Mike linked to above by itself. It's implemented entirely in PowerShell, so it's incredibly slow right now (unless you use it along with Get-Acl
    / see below for an example). I'm slowly working on creating a compiled version that is much faster, and I think I'm pretty close to having something that I can put in the gallery.
    Since I wasn't sure which command would give you the best results, I used Measure-Command to test a few different ones. Each of the following four commands should do the exact same thing. Here are my results (note that I just ran the commands a few times
    and averaged the results on a test system; this wasn't very rigorous testing):
    # Make sure that this folder and user/group exist:
    $Path = "D:\TestFolder"
    $Principal = "TestUser"
    # Native PowerShell/.NET -- Took about 15 ms
    $Acl = Get-Acl $Path
    $Acl.AddAccessRule((New-Object System.Security.AccessControl.FileSystemAccessRule(
    $Principal,
    "Read", # [System.Security.AccessControl.FileSystemRights]
    "ContainerInherit, ObjectInherit", # [System.Security.AccessControl.InheritanceFlags]
    "None", # [System.Security.AccessControl.PropagationFlags]
    "Allow" # [System.Security.AccessControl.AccessControlType]
    (Get-Item $Path).SetAccessControl($Acl)
    # PAC Module 3.0 w/ PowerShell/.NET commands -- Took about 35 ms
    $Acl = Get-Acl $Path | Add-AccessControlEntry -Principal $Principal -FolderRights Read -PassThru
    (Get-Item $Path).SetAccessControl($Acl)
    # icacls.exe -- Took about 40ms
    icacls.exe $Path /grant "${Principal}:(OI)(CI)(R)"
    # PAC Module 3.0 w/o Get-Acl -- Took about 350 ms
    Add-AccessControlEntry -Path $Path -Principal $Principal -FolderRights Read -Force
    Unless I messed something up, it looks like the native PowerShell/.NET commands are faster than icacls.exe, at least for modifying a single folder's DACL.

  • Fastest way to update column in all tables of schema

    In our schema we have two columns ColA and ColB common in all tables in our schema.
    Suppose these columns have values as below in all tables
    ColA     ColB     
    A1     B11     
    A12     B22     
    ABC     DEF     
    Now we have to update ColA and ColB where we have alphanumeric values in all tables, some tables have few hundred records and some tables have millions of records.
    Could you gurus suggest me with a fastest way to acheive this.
    What we are thinking is to write a procedure where we can input multiple tables which could be updated simultaneously and make a collection within procedure with following values
    ColA     ColA_R     ColB     ColB_R     
    A1     aa     B11     bb     
    A12     aaa     B22     bbb     
    ABC     No Update DEF     No Update     
    So whenever we have value matching A1 update it with value aa if we have value matching B11 update it with value bb and so on.
    Your inputs are welcome so that to acheive this in fastest manner.
    Thanks,
    Tony
    Edited by: tony29743 on Nov 9, 2010 9:15 AM

    I would be tempted to do it something like this:
    Create an index organized table for the cola updates (old_val, new_val) with a PK on old_val and another one for the colb Values. This could possibliy be a single table, depending on how many distinct values there were for cola and colb and if you are sure that "But if colA and colB have value A1 then it will be updated with aa".
    Then do the updates as an updateable join view something like:
    UPDATE (SELECT t1.cola, iot.new_val
            from tab1 t1, new_values_iot iot
            where t1.cola = iot.old_val)
    SET cola = new_valThis would require two rounds of updates, one for cola and one for colb, but they could be parallelized somewhat by distributing the tables to be updated through several pl/sql blocks each updating a different set of tables.
    You may be able to do it in a single query like:
    UPDATE (SELECT t1.cola, t1.colb, iota.new_val new_vala, iotb.new_val new_valb
            from tab1 t1, new_values_iot iota, new_values_iot iotb,
            where t1.cola = iota.old_val and
                  t1.cola = iotb.old_val)
    SET cola = new_vala,
        colb = new_valbHowever, given that you said there were some values in both cola and colb that did not require updating, that may not work since the join will fail on one of cola or colb if that value is not in the IOT, so you will not get all of the rows updated. If, and it is a big if, either both of cola and colb or neither of cola annd colb need to be updated in a single row, it might work. So, looking at your original examples (ABC and DEF do not require updates but A1 does), if there could be as case where cola = 'A1' and colb = 'DEF' then you will have to do it in two updates per table.
    John

  • Granting of permissions

    Okay, here is what I am trying to achieve (from my last thread):
    I work at a K-12 school. I have a superintendent that wants to have a folder that only himself and the administrator can have access to. This part seems to be easy. Just do some arranging of folders that are used by other lower-level admins and grant them permissions on the folder that would contain said folders.
    The second part is trickier. I want the admin secretary, bookkeeper, and assistant admin to have the power to add and delete names into the NDS. The only way they can currently enter names is if they have admin powers. I want to remove those powers but still allow them to have the ability to add/remove names from NDS.
    My question is this. Is there a step-by-step ( or can one be provided in this thread) of how to create the permissions necessary for Console One 1.3.6.h or even iManager 2.7x and where to apply said permissions that allows me to grant the power to add/delete an user from NDS.
    Thanks,
    Kevin

    Originally Posted by dgersic
    On Thu, 09 Jun 2011 18:36:02 +0000, wheatonr3 wrote:
    > Okay, that made sense. Now, my next question has to do with those
    > trustee rights after I created the Organizational Container. There are
    > a lot of things on the trustee list when you click on the "Add Property"
    > button. Which properties/rights do I need to assign an user to add and
    > delete users, change accounts from locked to active (and vice-versa),
    > and change passwords when needed.
    Creating objects requires Create rights at the container.
    Deleting objects requires Delete rights.
    By "locked" I'm assuming you mean "disabled". They'll need rights to the
    Login Disabled attribute.
    For password changes, they'll need rights to the "Password Management"
    attribute.
    David Gersic dgersic_@_niu.edu
    Novell Knowledge Partner http://forums.novell.com
    Please post questions in the newsgroups. No support provided via email.
    Okay. This then has no bearings on permissions into folders and whatnot so if I assign some folders with administrator permissions only, then those I assign the permissions you stated cannot get into that folder unless they themselves are administrators.

  • How to print the table values in fastest way?

    Dear Friends,
    I'm having table in my application and i need to print the table values. For that I used print() method to print the table values.
    boolean complete = tableObj.print(mode, header, footer, showPrintDialog, null, interactive,
                                  null);But, the time taken for displaying print dialouge box so late and printing operation is done very slowly.
    Could anyone please tell me is there any better way and fastest way to print the table values?
    Thanks in advance

    Hi,
    In the Module pool you will have fields. For those fields you have created the name also. Assign those name to work area and from there to internal table.
    And for your requirement viceversa you need to done.
    With Regards,
    Sumodh.P

  • What is the fastest way of getting data?

    With a scanning electron microscope, I need to scan a 512*512 pixel area with a pixel repetition of 15000 (two channels), meaning averaging over 15000 measurements. Simultaneously I have to adjust the voltage output for every pixel.
    I am using a 6111E Multifunction I/O board in a 800MHz P3. The whole task has do be done as fast as possible (not more than 20 minutes altogether).
    What is the fastest way to get this huge amount of data with averaging and output in between? (E.g. do I use buffered read with hardware triggering or is there a faster way?)

    Using the NI-DAQ API (not LabView) will give you a significant amount of more control over what happens and when to the data stream; which translates to a more efficient program. But you need to program in C/C++ or Delphi then. The Measurement Studio provides ActiveX controls that are like the LabView ones for C&C++ (they�re slow like the LabView ones though � not a lot you can do about the Windows GDI).
    What are you trying to sample 15000 times? The 512*512 pixel field?
    That�s almost 15Gigs of data! And it means you need to process data at 12.8MB/s to finish it in 20 minutes. I hope you know C, x86 assembly and MMX.
    I would setup a huge circular buffer (NI-DAQ calls them �double buffers�), about 30 seconds worth or so, to use with SCAN_Start. Then I would proces
    s the actual buffer the card is DMA�ing the data into with a high priority thread. Progressively sum the scan values from the 16bit buffer (the samples are only 12 bit, but the buffer should still be 16bits wide) into a secondary buffer of DWORDs the size of the screen (512*512), and you�ll need two of those, one for each channel. Once the 15000 scans are complete, convert each entry into a float divide by 15000.0f, and store it in a third buffer of floats.
    If you wish to contract this out, send me an email at [email protected]

  • Fastest way to transfer information from my old MacBook Pro to a new one?

    What is fastest way to transfer data between MacBook pros? It takes forever on wi-if.

    Sometimes the fastest way would be just to transfer only your files via a external hard drive via drag and drop methods into the same named accounts on the new machine. This is especially useful if you want to avoid corruption of the old machine and have a chance to clean house of older files.
    By the time one fiddles around finding a Firewire cable and adpaters, a standard USB 3 external hard drive could be done already and be gotten at any local computer or office store.
    Also Retina's have SSD's and any data on them is not scrubbable like hard drives can be. Scrubbing SSD's would involve the entire drive being filled and this would wear them out prematurely as they have limited writes to each sector.
    If you want to use Migration or Setup Assistant, there is some element of risk involved because your copying the corruption over from the previous machine if it exists. If you know the previous software is fine on the older machine, then you can use Carbon Copy Cloner to clone the whole OS X boot parititon to the external USB drive, then hook this up to the new machine and run Migration/Setup Assistant against it, just like you would in Firewire Target Disk Mode if you don't want to wait to get a Thunderbolt to Firewire adpater from Apple.
    If you already have the Thunderbolt to Firewire adapter and a cable/adpater to the old Mac, then that's the fastest way.

  • Fastest way to load a BufferedImage on a JPanel

    I am looking for the fastest way to display a BufferedImage on a JPanel.
    I am using JAI to take in photo files (JPG, BMP, GIF, TIFF, PNG) and create thumbnails (BufferedImage).
    I was reading through the forums and saw you can either
    1)overwrite the Graphics method or
    2)imageicon->JLabel->JPanel
    Currently, I am doing number 2, but I was wondering what the best way truly is.

    as you arn't doing any animation or that kind of thing, using Swing Components will work just fine.

  • Fastest way to create child class from parent?

    As the subject states, what do you folks find is fastest when creating child classes directly from the parent? (esp. when the parent is in a lvlib) I thought I'd post up and ask because the fastest way I've found to get working takes a few steps.
    Any suggestions ae appreciatized!
    -pat

    Thanks for the quick response Ben!
    Yea, I apologize, in your response I realize my OP was more than vague haha (it hapens when you get used to your own way of doing things I guess huh)- I'm trying to create a child from a parent so that it has all of the methods that the parent has.
    In order to do so I currently have to open and close LV a few times during my current process so that vi's in memory dont get mixed up- Currently I save a copy of the parent class in a sub dir of where it is saved, close out of LV, open the new 'copy of parent.lvclass', save as>>rename 'child class.lvclass', close LV, and open up the project to 'add file', then right click>>properties>>inheritance.
    Is this the only way to do this?
    Thanks again!
    -pat
    p.s. I'm tempted to steal your cell phone sig, hope you dont mind haha good stuff!

Maybe you are looking for

  • Multiple instances of firefox in task manager but FF doesn't open

    - Windows XP SP3 (up to date with all critical updates) - FireFox 25.0.1 (Note: Originally I had version 31 but a few days ago that stopped working) - Norton Security Suite (the comcast version) up to date - I have IE6 and Chrome 37 as backup browser

  • GOTCHA's with Setting up ADF Security with JDev 11.1.1.6.0

    If you're getting into ADF security, you're probably going to want to get rid of that ugly default login.html page. I mean, it gets the job done, but we want something a little better. And if you want something a little better and you're using JDev 1

  • Decimal Value display in ALV Field display

    Hi Expert, I need to dispaly one ALV Field "Routine Work Hour" value up to 2 decimal place in ALV output i.e if value is 2.5 then it should display as 2.50.The field which refers to this is ISMNW and the database table is AFRU.Now if this value is ma

  • Macro not working in BEx Analyzer (Refresh selection Screen)

    Hi All, We have migrated work book for 3.x to 7.x and work book having lot of macros calculated and using multiple quires in single work books for inpt selection screen written Macro same macro is not working after Migration to 7.x 7.X Macro code bel

  • 401 Unauthorized Error when Registering Workflow Manager

    I have installed the workflow manager successfully. However, when I try to run Register-SPWorkflowService I get a 401 Unauthorized error. I am running SharePoint 2013 Management Shell as administrator. When I use internet explorer to browse to https: