FIX: "Bad variable type" or "Type mismatch" error when you run an UPDATE CUBE statement that has a custom weighted allocation formula in SSAS 2008 R2 or in SSAS 2008

Article translations Article translations
Article ID: 2504524 - View products that this article applies to.
Microsoft distributes Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 or SQL Server 2008 fix release.
Expand all | Collapse all

On This Page

SYMPTOMS

When you create an UPDATE CUBE statement that has a custom weighted allocation formula in Microsoft SQL Server 2008 R2 Analysis Services (SSAS 2008 R2) or in Microsoft SQL Server 2008 Analysis Services (SSAS 2008), you receive one of the following error messages:
  • The following system error occurred: Bad variable type.
  • The following system error occurred: Type mismatch.

CAUSE

This issue occurs because the SSAS 2008 R2 or SSAS 2008 engine tries to read the data type from an invalid memory location after SSAS 2008 R2 or SSAS 2008 releases memory used in the custom formula for weighted allocation.

RESOLUTION

Cumulative update information

SQL Server 2008 Service Pack 3

The fix for this issue was first released in Cumulative Update 5 for SQL Server 2008 Service Pack 3. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2696626 Cumulative update package 5 for SQL Server 2008 Service Pack 3
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2629969 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released
Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 3 hotfix to an installation of SQL Server 2008 Service Pack 3. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

SQL Server 2008 R2

The fix for this issue was first released in Cumulative Update 6. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2489376 Cumulative Update package 6 for SQL Server 2008 R2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about the UPDATE CUBE statement for MDX, visit the following Microsoft Developer Network (MSDN) website:
General information about the UPDATE CUBE statement for MDX
For more information about how to use a cube writeback for MDX, visit the following MSDN website:
General information about how to use cube writebacks for MDX

Properties

Article ID: 2504524 - Last Review: May 21, 2012 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2008 R2 Analysis Services
  • Microsoft SQL Server 2008 Analysis Services
Keywords: 
kbfix kbqfe kbexpertiseadvanced kbsurveynew KB2504524

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com