3.1.1.1.20.2.2 GetServerRolesForServer

This procedure can be used to get the list of server roles that are present on a server. It takes the following input parameter.

Param_serverInfo: The ServerInfo instance for which the ServerRoles are being queried.

There are no output parameters for this procedure. The Param_serverInfo.ServerRoleCollection is filled with the various server roles for the server instance provided.

The following are the steps involved:

  1. Enumerate the rows in ADM_ServerRolesTable having ServerRecordId being Param_serverInfo.RecordId.

  2. Initialize Param_serverInfo.ServerRoleCollection.

  3. For each row meeting the criteria, perform the following steps.

    1. Create an instance of ServerRoleInfo with the following assignments:

      1. Assign RecordId to ServerRoleInfo.RecordId.

      2. Copy ServerRoleDetails into ServerRoleInfo.

      3. Set ServerRoleInfo.ServerInfo to Param_serverInfo.