<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Optimization of data step that updates Login Account in Metadata in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962139#M375032</link>
    <description>&lt;P&gt;I think you could improve on the logic you have posted by dropping out of your looping once the password has been updated. Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro update_login_in_metada(name, pwd, auth);

    data _null_;
        length uri_domain $256.;
        length uri_user $256.;
        length uri_login $256.;
        length name_domain $200.;
        length name_user $200.;
        
        * initialize "uri*" and "name_*" variables;
        call missing(of uri_: name_:);
  
        * initialize variable "nobj1";
        nobj1 = -1;

        * write number of person objects found in metadata into "nobj1";
        nobj1 = metadata_getnobj("omsobj:Person?@Id contains '.'", 1, uri_user);

		Password_Updated = 'N';
        
        * loop through all found person objects;
        if nobj1 &amp;gt; 0 then
            do;
                do i = 1 to nobj1 until (Password_Updated = 'Y');
                    nobj2 = metadata_getnobj("omsobj:Person?@Id contains '.'", i, uri_user);
                    rc1 = metadata_getattr(uri_user, "Name", name_user);
                    
                    * lookup person object;
                    if name_user = "&amp;amp;name." then
                        do;
                            * get corresponding Login-Account of Auth-Domain;
                            nobj3 = metadata_getnasn(uri_user, "Logins", 1, uri_login);

                            * loop through all Login-Accounts of particular user;
                            if nobj3 &amp;gt; 0 then
                                do;
                                    do j = 1 to nobj3;
                                        nobj4 = metadata_getnasn(uri_user, "Logins", j, uri_login);

                                        nobj5 = metadata_getnasn(uri_login, "Domain", 1, uri_domain);

                                        rc2 = metadata_getattr(uri_domain, "Name", name_domain);
                                        
                                        if name_domain = "&amp;amp;auth." then  /* update password for selected Auth-Domain*/
                                            do;
                                                rc3 = metadata_setattr(uri_login, "Password", "&amp;amp;pwd.");
                                                Password_Updated = 'Y';
                                            end;
                                    end;
                                end;
                        end;
                end;
            end;
    run;
%mend update_login_in_metada;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 Mar 2025 19:45:37 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2025-03-18T19:45:37Z</dc:date>
    <item>
      <title>Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962103#M375029</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a piece of SAS code that updates for a given user in Metadata (and a given Authentication doman of this particular user)&amp;nbsp; its Login-Credentials:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;&amp;nbsp;%macro update_login_in_metada(name, pwd, auth);

    data _null_;
        length uri_domain $256.;
        length uri_user $256.;
        length uri_login $256.;
        length name_domain $200.;
        length name_user $200.;
        
        * initialize "uri*" and "name_*" variables;
        call missing(of uri_: name_:);
  
        * initialize variable "nobj1";
        nobj1 = -1;

        * write number of person objects found in metadata into "nobj1";
        nobj1 = metadata_getnobj("omsobj:Person?@Id contains '.'", 1, uri_user);
        
        * loop through all found person objects;
        if nobj1 &amp;gt; 0 then
            do;
                do i = 1 to nobj1;
                    nobj2 = metadata_getnobj("omsobj:Person?@Id contains '.'", i, uri_user);
                    rc1 = metadata_getattr(uri_user, "Name", name_user);
                    
                    * lookup person object;
                    if name_user = "&amp;amp;name." then
                        do;
                            * get corresponding Login-Account of Auth-Domain;
                            nobj3 = metadata_getnasn(uri_user, "Logins", 1, uri_login);

                            * loop through all Login-Accounts of particular user;
                            if nobj3 &amp;gt; 0 then
                                do;
                                    do j = 1 to nobj3;
                                        nobj4 = metadata_getnasn(uri_user, "Logins", j, uri_login);

                                        nobj5 = metadata_getnasn(uri_login, "Domain", 1, uri_domain);

                                        rc2 = metadata_getattr(uri_domain, "Name", name_domain);
                                        
                                        if name_domain = "&amp;amp;auth." then  /* update password for selected Auth-Domain*/
                                            do;
                                                rc3 = metadata_setattr(uri_login, "Password", "&amp;amp;pwd.");
                                            end;
                                    end;
                                end;
                        end;
                end;
            end;
    run;
%mend update_login_in_metada;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It takes approximately 50 seconds for one user to run this step:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%update_login_in_metada(johndoe, abc123, DBAuth)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To me it seems, that the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n18ms866h26lgpn1nr5zr9nic0am.htm" target="_self"&gt;Data Step Metadata Functions&lt;/A&gt; are very slow...&lt;/P&gt;&lt;P&gt;I know of the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n0dbwih2jqqfmcn1kmkutzd5gal1.htm" target="_self"&gt;Metadata Procedure&lt;/A&gt; as a potential alternative way to update metadata. However, I do not know, how to set up/write the appropriate xml file structure as input to the procedure.&lt;/P&gt;&lt;P&gt;Also, is the Metadata Procedure faster than the Data Step Metadata Functions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated,&lt;/P&gt;&lt;P&gt;FK21&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 15:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962103#M375029</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-03-18T15:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962139#M375032</link>
      <description>&lt;P&gt;I think you could improve on the logic you have posted by dropping out of your looping once the password has been updated. Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro update_login_in_metada(name, pwd, auth);

    data _null_;
        length uri_domain $256.;
        length uri_user $256.;
        length uri_login $256.;
        length name_domain $200.;
        length name_user $200.;
        
        * initialize "uri*" and "name_*" variables;
        call missing(of uri_: name_:);
  
        * initialize variable "nobj1";
        nobj1 = -1;

        * write number of person objects found in metadata into "nobj1";
        nobj1 = metadata_getnobj("omsobj:Person?@Id contains '.'", 1, uri_user);

		Password_Updated = 'N';
        
        * loop through all found person objects;
        if nobj1 &amp;gt; 0 then
            do;
                do i = 1 to nobj1 until (Password_Updated = 'Y');
                    nobj2 = metadata_getnobj("omsobj:Person?@Id contains '.'", i, uri_user);
                    rc1 = metadata_getattr(uri_user, "Name", name_user);
                    
                    * lookup person object;
                    if name_user = "&amp;amp;name." then
                        do;
                            * get corresponding Login-Account of Auth-Domain;
                            nobj3 = metadata_getnasn(uri_user, "Logins", 1, uri_login);

                            * loop through all Login-Accounts of particular user;
                            if nobj3 &amp;gt; 0 then
                                do;
                                    do j = 1 to nobj3;
                                        nobj4 = metadata_getnasn(uri_user, "Logins", j, uri_login);

                                        nobj5 = metadata_getnasn(uri_login, "Domain", 1, uri_domain);

                                        rc2 = metadata_getattr(uri_domain, "Name", name_domain);
                                        
                                        if name_domain = "&amp;amp;auth." then  /* update password for selected Auth-Domain*/
                                            do;
                                                rc3 = metadata_setattr(uri_login, "Password", "&amp;amp;pwd.");
                                                Password_Updated = 'Y';
                                            end;
                                    end;
                                end;
                        end;
                end;
            end;
    run;
%mend update_login_in_metada;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 19:45:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962139#M375032</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-03-18T19:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962322#M375080</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, this is definitely an improvement in logical terms!&lt;/P&gt;&lt;P&gt;However, the runtime wasn't really significantly lowered (24 seconds versus 23 seconds).&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I wonder, why is there such a big margin of error regarding the runtime? Yesterday I ran the exaxt same code and it took 47 seconds. Today it is only 24/23 seconds.&lt;/P&gt;&lt;P&gt;Of course, there could be different amounts of traffic regarding the server, but I do have the feeling, that the metadata handling is slow. I already ran the CLI admin tools to reorg and clean the metadata, but still it is very slow.&lt;/P&gt;&lt;P&gt;Is there another action I could pursue to speed up metadata access?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 09:34:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962322#M375080</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-03-20T09:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962327#M375081</link>
      <description>&lt;P&gt;You could simplify your macro:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; %macro update_login_in_metada(name, pwd, auth);
    data _null_;
        length uri_login $ 250;
        uri_login = cats("omsobj:Login?Login[AssociatedIdentity/Person[@Name = '&amp;amp;name']]",
               "[Domain/AuthenticationDomain[@Name = '&amp;amp;auth']]"
            );
        rc = metadata_setattr(uri_login, "Password", "&amp;amp;pwd.");
        put rc=;
    run;
 %mend;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if rc ^= 0 then no user exists with a login in the given auth-domain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 12:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962327#M375081</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2025-03-20T12:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962335#M375085</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp; : this is awesome code! The only problem I have at the moment:&lt;/P&gt;&lt;P&gt;when executing this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%update_login_in_metada(TESTUSR7, someString1234, SPDSAuth);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n0t9rzceun8o14n0zi8a1hfls9h7.htm#n0jyl4mkrkgygtn1brqgwmbb4593:~:text=set%20the%20attribute.-,%2D3,-No%20objects%20match" target="_self"&gt;rc=-3 (meaning that no objects match the URI)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I know, that this object with the given Authdomain exists as you can see in the scrennshot below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TESTUSR7.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105559iC7F42375B982037D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TESTUSR7.JPG" alt="TESTUSR7.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I guess, the omsobj-query string does not fully fit yet or am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 14:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962335#M375085</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-03-20T14:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962336#M375086</link>
      <description>&lt;P&gt;Interesting, omsobj-query should work, but this was a rather long day for me, so maybe this hides the error. &lt;/P&gt;
&lt;P&gt;Some ideas to debug:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;num_users = metadata_getnobj("omsobj:Login?Login[AssociatedIdentity/Person[@Name = '&amp;amp;name']]", 1, uri);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Returns the number of login-objects for the person. Using your screenshot, should be 3 in your case. &lt;/P&gt;
&lt;P&gt;You should check the number of logins in the auth-domain, too:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;logins_in_domain = metadata_getnobj("omsobj:Login?Login[Domain/AuthenticationDomain[@Name = '&amp;amp;auth']]", 1, uri);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 15:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962336#M375086</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2025-03-20T15:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962343#M375090</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446234"&gt;@FK21&lt;/a&gt;&amp;nbsp;- The speed of reading a SAS metadata repository will likely depend on a number of factors. How big is your repository? The bigger it is the slower it will be to read it. Do you regularly compact its size? There is a tool in SAS Management Console for doing this. Also the repository is stored on your metadata server, but you are reading it from your application server so there is likely a lot of network traffic necessary to read it. And the busier your SAS installation is, the slower it will be to read the repository. How long does an after-hours read take?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 19:14:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962343#M375090</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-03-20T19:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962359#M375095</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;: In deed, there are several factors to consider. I am under the impression, though, that we do have an issue with our production metadata.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you suggested, I ran the code after the usual business hours in two of our environments: production and test&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Statistics of Test environment:&lt;/U&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&lt;STRONG&gt;real time 2.58 seconds&lt;/STRONG&gt;&lt;BR /&gt;user cpu time 0.01 seconds&lt;BR /&gt;system cpu time 0.01 seconds&lt;BR /&gt;memory 1132.59k&lt;BR /&gt;OS Memory 20892.00k&lt;BR /&gt;Timestamp 03/21/2025 06:45:31 AM&lt;BR /&gt;Step Count 5 Switch Count 164&lt;BR /&gt;Page Faults 20&lt;BR /&gt;Page Reclaims 281&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 975&lt;BR /&gt;Involuntary Context Switches 3&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;U&gt;Statistics of Production environment:&lt;/U&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&lt;STRONG&gt;real time 24.40 seconds&lt;/STRONG&gt;&lt;BR /&gt;user cpu time 0.12 seconds&lt;BR /&gt;system cpu time 0.02 seconds&lt;BR /&gt;memory 7216.50k&lt;BR /&gt;OS Memory 27548.00k&lt;BR /&gt;Timestamp 03/21/2025 06:47:40 AM&lt;BR /&gt;Step Count 5 Switch Count 1364&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 1763&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 7944&lt;BR /&gt;Involuntary Context Switches 104&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;As you can see, in production it took ~12 times the amount of time it took in test.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I compared the size of the &amp;lt;config-dir&amp;gt;/SASMeta/MetadataServer/MetadataRepositories/Foundation/ directories for PROD and TEST: 250 MB (PROD) vs.&amp;nbsp;248 MB (TEST).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the factor of network traffic, I also ran this code directly in a Workspaceserver session on the MetadataServer machine on PROD and TEST, respectively. The "deviation" of roughly 12 times remains!&lt;/P&gt;&lt;P&gt;Therefore, I would rule out the following factors:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;size of Repo&lt;/LI&gt;&lt;LI&gt;traffic on network&lt;/LI&gt;&lt;LI&gt;load on the server&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This only leaves me with the topic of "compacting the size of the metadata repo". What excatly do you mean with "tool in SMC"? Do you mean the Metadata Analysis/Repair Tools?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 08:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962359#M375095</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-03-21T08:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962367#M375096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I ran your debug lines within the macro and put them into the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;uri_login=omsobj:Login?Login[AssociatedIdentity/Person[@Name = 'TESTUSER7']][Domain/AuthenticationDomain[@Name = 'SPDSAuth']]&lt;BR /&gt;&lt;STRONG&gt;num_users=-4&lt;/STRONG&gt;&lt;BR /&gt;logins_in_domain=1&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As you said, the expected value for "logins_in_domain" should equal "1", which it does. But the value of "num_users" indicates, that "&lt;EM&gt;n&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;is out of range." &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n15d0r212fbucen1s6kwjtf2qpdf.htm#:~:text=the%20metadata%20server.-,%2D4,-n%20is%20out" target="_self"&gt;according to the SAS documentation .&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does this translate to "TESTUSR7" cannot be found in the person objects of the metadata tree or is the syntax&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Login?Login[AssociatedIdentity/Person[@Name = '&amp;amp;name']]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;maybe skewed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 10:32:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962367#M375096</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-03-21T10:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962370#M375098</link>
      <description>&lt;P&gt;Strange. Looks as if TESTUSER7 is not the exact string in the name filed of a person-object.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 10:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962370#M375098</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2025-03-21T10:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962579#M375165</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;: &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;your code is correct!&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;It turned out, that I had forgotten to explicitly code the metadata connection information, i.e.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options metaserver=&amp;lt;FQDN&amp;gt;
metaport=&amp;lt;Metaport number&amp;gt;
metaprotocol='bridge'
metauser='sasadm@saspw'
metapass='&amp;lt;encoded passwort&amp;gt;'
metarepository='Foundation'
metaconnect='NONE'
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, it threw "rc = -3".&lt;/P&gt;
&lt;P&gt;Thank's a lot for your help&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 10:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962579#M375165</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-03-25T10:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962616#M375172</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446234"&gt;@FK21&lt;/a&gt;&amp;nbsp;- I'm curious to know if&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;'s version runs any faster than your version. I suspect it probably does as there is a lot less looping.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 19:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962616#M375172</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-03-25T19:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962809#M375215</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446234"&gt;@FK21&lt;/a&gt;&amp;nbsp; - I was referring to the "Reorganize" option when you run a manual backup. This is supposed to compact the repository.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 00:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962809#M375215</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-03-28T00:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962995#M375241</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran my, as well as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;'code a couple of times (10 times each) in our production as well as our test environment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the average run times (standard deviation in paranthesis):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;U&gt;&lt;STRONG&gt;Average run times&lt;/STRONG&gt;&lt;/U&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;FK21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;andreas_lds&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;TEST&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;2.68&amp;nbsp; &amp;nbsp; (0.08)&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;2.62 (0.45)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;PROD&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;22.89 (0.39)&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;23.39 (0.5)&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;One striking observation, which I already wrote about in this post, is the fact, that in &lt;STRONG&gt;production it takes about 10 to 12 times longer than in test (we do a Reorg of the metadata once every week)!&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Between the two code versions, there is merely any difference run time wise, which is surprising to me!&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Aside from the fact that in TEST it runs roughly 10 times faster, it also runs more consistent, meaning lower standard deviations - for both code versions!&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 09:44:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/962995#M375241</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-03-31T09:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/963053#M375251</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446234"&gt;@FK21&lt;/a&gt;&amp;nbsp;- what's the size difference of the repository PROD versus TEST? A much larger PROD repository might explain some of the difference in processing time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 20:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/963053#M375251</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-03-31T20:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of data step that updates Login Account in Metadata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/963555#M375367</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;:&amp;nbsp; I also suspected, that the file size of the Foundation folder of the metadata repository could be part of the explanation, but there is only a difference of &lt;U&gt;2 MB&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;PROD:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="METAREPO_FOUNDATION_PROD.jpg" style="width: 659px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105963i9DD8E9BA2FA71DC3/image-size/large?v=v2&amp;amp;px=999" role="button" title="METAREPO_FOUNDATION_PROD.jpg" alt="METAREPO_FOUNDATION_PROD.jpg" /&gt;&lt;/span&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;TEST:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="METAREPO_FOUNDATION_TEST.jpg" style="width: 619px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105964i95375056B66501FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="METAREPO_FOUNDATION_TEST.jpg" alt="METAREPO_FOUNDATION_TEST.jpg" /&gt;&lt;/span&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 06:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-of-data-step-that-updates-Login-Account-in-Metadata/m-p/963555#M375367</guid>
      <dc:creator>FK21</dc:creator>
      <dc:date>2025-04-07T06:58:07Z</dc:date>
    </item>
  </channel>
</rss>

