Showing posts with label member. Show all posts
Showing posts with label member. Show all posts

Thursday, March 22, 2012

Analysis 2005 Dimension Max members

Dear Anyone,

Does the dimensions for Analysis Services 2005 have any member limitations? Say a parent can only have so many members?

Thanks,

Joseph

The numbers of members in an level in an attribute hierarchy in Analysis Services 2005 has the limit of a 32-bit signed integer (2**32 = approx. 2 billion). The AS 2000 maximum of no more than 64,000 members per parent no longer applies. Also note that since the concept of a "dimension" has changed between the two versions of Analysis Services, you can now define more than one hierarchy per dimension in AS 2005, which makes it less meaningful to discuss the maximum number of members per parent. As I indicate, it is now the number of members in an attribute hierarchy that is interesting (an attribute hierarchy by default consists of two levels - an "All" level and a level including all of the members of that specific attribute) .|||

Is there a possibility that when processing a dimension (not parent and child) a memory error an happen even though the dimension is quite large?

The reason I asked is that we encountered a memory error problem when processing a large dimension. Understandably our dimension is large but it was also my impression that sql2005 removed the 64k limit.

Saturday, February 25, 2012

Ampersand in Analysis Services Report Alert

I have an alert in AS 2005 that will start a reporting services report. I want to pass the current member position in a hierarchy using a parameter:

settostr({[Dim].[MyHierarchy].currentmember}) .

That causes a URL like this:

http://hosting/reportserver/?%2fReport%20Project6/Report1&DimCurrentMember={[Dim].[MyHierarchy].[Lvl1].&[all].&[west].&[300]}&rs:Command=Render&rs:Renderer=PDF

How do I get AS to use %26 for the &'s .

In order to deal with this scenario, you can use MDX function UrlEscapeFragment. So your code will become:

UrlEscapeFragment(settostr({[Dim].[MyHierarchy].currentmember}) )

|||

Thank you!

I have been searching all over for this solution.

|||Yes - this is not very documented, except for the fact that the sample AdventureWorks cube uses this function in the "Sales Reason Comparisons" report action.

Ampersand in Analysis Services Report Alert

I have an alert in AS 2005 that will start a reporting services report. I want to pass the current member position in a hierarchy using a parameter:

settostr({[Dim].[MyHierarchy].currentmember}) .

That causes a URL like this:

http://hosting/reportserver/?%2fReport%20Project6/Report1&DimCurrentMember={[Dim].[MyHierarchy].[Lvl1].&[all].&[west].&[300]}&rs:Command=Render&rs:Renderer=PDF

How do I get AS to use %26 for the &'s .

In order to deal with this scenario, you can use MDX function UrlEscapeFragment. So your code will become:

UrlEscapeFragment(settostr({[Dim].[MyHierarchy].currentmember}) )

|||

Thank you!

I have been searching all over for this solution.

|||Yes - this is not very documented, except for the fact that the sample AdventureWorks cube uses this function in the "Sales Reason Comparisons" report action.

AMO: Role Member not existing in Active Directory

Hi,

I have a function in VB.Net that checks if role member is existing in Role. It's doing well, however, if role member is not existing in Active Directory it would prompt me this error during role update:

No mapping between account names and security IDs was done.

So, i provided an on error-resume-next error handler just for it to ignore the error. However, in the succeeding loops, eventhough the role member is existing in AD and not existing in Role, it's prompting me the same error each time it does a Role Update.

Was the error cached the first time? How do I manage this situation well?

cherriesh

Are you saying the user account did exist in AD, was added to your SSAS role, and then removed from AD which gives you the initial error? If so, was the user account disabled in AD or dropped from AD?

B.

|||

Hi,

the domain name is maintained in a specific table in the database which the user had keyed in. I access this table to add the domain name in my SSAS role. However, if the domain name is not really a real one or was entered with typo error, the SSAS will prompt an error at Role1.Update() command since the account entered has no match in AD. If i resume-next on this error, in the succeeding role update, it will prompt me the same error.

cherrie

|||

One of my guys ran into a similar issue on an AMO script. Here is the code he used in the script to resolve the problem:

Code Snippet

Try
currentRole.Members.Add(New RoleMember(RTrim(LTrim(dr(1).ToString))))
currentRole.Update()
Catch ex As Exception
currentRole.Refresh()
End Try

Hope that helps,

B.

Friday, February 24, 2012

AMO: Convert string to Role and Role Member

Hi,

I have a functionality in my AMO that deletes role member from a specific role but first I must check if that role member is existing in that role before calling any delete.

This is the function that checks if role member is existing:

Function RoleContains(ByVal MyRole As Role, ByVal MemberName As String) As Boolean

For Each rm As RoleMember In MyRole.Members

If String.Compare(rm.Name, MemberName, True) = 0 Then

Return True

End If

Next

End Function

However, the one i will pass to the parameters are taken from the textbox of vb.net. so the data type is string and i'm having a problem passing this to Role object.

how can i do that?

cherriesh

The role collection includes a FindByName() method. So, if you were after a database role object, you can get a role object from it's name by doing something like:

myRole = db.Roles.FindByName("Test Role")

AMO: Check if role member is existing in Role

Hi,

In AMO, how do I check if role member is existing in Role? I have this command (VB.net):

If UserRole1.Members.Contains(mydatareader(0)) = true then

.

.

end if

But it keeps having an error:

Unable to cast object of type 'System.String' to type 'Microsoft.AnalysisServices.RoleMember'.

How do i check properly?

thanks .

cherriesh

The contains function expects a MemberRole reference, not a string. I can't see anyway of checking directly if a role contains a given member name so you would have to loop over the collection. Something like the following should work. Note: I have coded this off the top of my head so I hope that I have not made any typo's but you should get the general idea.

Code Snippet

If RoleContains(UserRole1, mydatareader(0)) then

.

.

end if

Function RoleContains( myRole as Role, memberName as string)

For each rm as RoleMember in myRole.Members

'// I have used string.compare to do a case-insensitive compare

If string.compare(rm.Name, memberName,true) = 0 then

return true

End If

Next

Return false

End Function

Monday, February 13, 2012

Am I a sysadmin member?

Hi,

I want to check if the currently connected user is a sysadmin(or securityadmin) member. Could I only check whether the user has the CONTROL SERVER permission or not? Is there a straight way to test it?

Try using

SELECT IS_SRVROLEMEMBER( 'sysadmin', 'UserName' )

Returns 1 for true, 0 for false.

|||Thanks