Friday, February 24, 2012

local computer Admin through AMO?

Hi everybody.

I know that members of the Administrators local group of the local computer where SQL Server 2005 is installed are automatically members of the server role in an instance of Analysis Services.

My problem is that in my application, through AMO I am able to see the Analysis Services server administrator added explicitally in the server role, ma am not able to obtain also the ones who are AS server administrators because inherit from the Administrators local group.

Does anyone can suggest me how to obtain also this list, through AMO, ADOMD.NET or something else?

Thank you so much.

Your statement "members of the Administrators local group of the local computer where SQL Server 2005 is installed are automatically members of the server role" is not entirely correct.

Yes, members of local Administrators group are AS admins, but that is not through membership in the server role. Actually after installation the server role membership is empty. The local Administrators are just given the admn right to AS bypassing the server role membership.

You can use server property BuiltinAdminsAreServerAdmins to revoke rights of local admins.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Thank you very much for your kind answer.

Actually the property BuiltinAdminsAreServerAdmins is very useful for us to check if the local admins are also AS admins or not.

Our application wouldn't like to prevent this behaviour, but simply needs to retrieve all the AS admins: both the ones added in the server role, both the ones who have the admin rights bypassing the server role membership, because inherit from the local group, if the BuiltinAdminsAreServerAdmins is set to True.

Could you suggest us a way? Maybe we should directly extract the members of the local admin group? Do you know a way to do this, because I am not aware of such an instruction (we are using C#).

Thank you very much.

|||

Yes, you would have to query for the memebership in the local admin group.

Some simple search should give you quite a few C# samples like this one http://www.thecodeproject.com/csharp/groupandmembers.asp. I am sure you would find more.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment