METADATA Procedure

Example 2: Change a Metadata Repository's Availability

Features:

XML string in IN= argument

Note: You must be an administrative user of the metadata server to perform this task.
A metadata repository's availability, referred to as its state, is computed from both the repository's registered Access value and the metadata server's state. To change the repository's persisted state, submit the UpdateMetadata method with PROC METADATA to change the value in the repository’s Access attribute.
The example code reregisters the repository with a different Access value, causing the repository's state to be recomputed. To properly execute this code, the repository manager must be in a Read-Write state. For example, if the metadata server is paused offline, the repository manager will be offline and cannot be updated with this code.
The value of the Access attribute is specified as an integer. The following integers are supported:
0 full access or online
1 Read-Only access
2 administrative access
4 offline or intentionally unavailable to all users
Change the Access attribute for the repository. The OMI_TRUSTED_CLIENT flag must be set for the UpdateMetadata method to write to a metadata repository. This example results in full access for the repository that was in administrative mode in the previous example.
proc metadata
   in="<UpdateMetadata>
        <Metadata>
         <RepositoryBase Id='A0000001.A5EXCXUI' Access='0'/>
        </Metadata>
        <NS>repos</NS>
        <!-- OMI_TRUSTED_CLIENT flag -->
        <Flags>268435456</Flags>
       </UpdateMetadata>";
   run;