dbTalk Databases Forums  

Unexpected error in Cube Calculations, SSAS 2005

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Unexpected error in Cube Calculations, SSAS 2005 in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pat
 
Posts: n/a

Default Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 06:35 AM






I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and click on the
"Calculations" tab, the middle window doesn't show anything but "Unexpected
error occurred: 'Attempted to read or write protected memory. This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in Notepad, I
can see the MDX script defining my calculations and it looks fine.

Where can I start investigating this problem ?


Reply With Quote
  #2  
Old   
Chris Webb
 
Posts: n/a

Default RE: Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 08:53 AM






Are you running SP1 or the post SP1 hotfix rollup? I had the same problem the
other week.

I think it's something to do with BIDS not being able to deal with syntax
errors in the MDX Script. What I did was use SQL Management Studio to create
an ALTER TO script for my cube, then in that ALTER TO command comment out
every single statement in my MDX Script. I then ran the command, resulting in
a cube with no calculations on it. I then found I could connect to my cube
again in Visual Studio, and went through each statement in the script
uncommenting them one at a time until I found the statements which were
causing the error - in my case, there were references to dimensions and
members which were no longer present in the cube.

HTH,

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

Quote:
I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and click on the
"Calculations" tab, the middle window doesn't show anything but "Unexpected
error occurred: 'Attempted to read or write protected memory. This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in Notepad, I
can see the MDX script defining my calculations and it looks fine.

Where can I start investigating this problem ?


Reply With Quote
  #3  
Old   
Pat
 
Posts: n/a

Default RE: Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 09:43 AM



I'm running on SP1 and I installed a hotfix from MS last week regarding calls
to VBA functions in an MDX query called through OPENQUERY. I don't have the
post-SP1 hotfix.
Kind of following your suggestion, I edited the MyCube.cube file directly
and commented out the whole script.
I could then open the script in the "calculations" tab and switch to script
view, and it showed just a CALCULATE; statement, followed by my commented out
script.
However, as soon as I uncommented the first CREATE MEMBER and went back to
Form View, the same error appeared again.

Then, I completely removed all contents of the script instead of commenting
out and could open the Calculations again. I subsequently tried to create a
new calculated member, the error appeared again.



"Chris Webb" wrote:

Quote:
Are you running SP1 or the post SP1 hotfix rollup? I had the same problem the
other week.

I think it's something to do with BIDS not being able to deal with syntax
errors in the MDX Script. What I did was use SQL Management Studio to create
an ALTER TO script for my cube, then in that ALTER TO command comment out
every single statement in my MDX Script. I then ran the command, resulting in
a cube with no calculations on it. I then found I could connect to my cube
again in Visual Studio, and went through each statement in the script
uncommenting them one at a time until I found the statements which were
causing the error - in my case, there were references to dimensions and
members which were no longer present in the cube.

HTH,

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and click on the
"Calculations" tab, the middle window doesn't show anything but "Unexpected
error occurred: 'Attempted to read or write protected memory. This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in Notepad, I
can see the MDX script defining my calculations and it looks fine.

Where can I start investigating this problem ?


Reply With Quote
  #4  
Old   
Chris Webb
 
Posts: n/a

Default RE: Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 09:56 AM



Hmm, strange. I don't suppose you could post up the definition of a
calculated member which, when added to an otherwise empty script, produces
the error?

Chris
--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

Quote:
I'm running on SP1 and I installed a hotfix from MS last week regarding calls
to VBA functions in an MDX query called through OPENQUERY. I don't have the
post-SP1 hotfix.
Kind of following your suggestion, I edited the MyCube.cube file directly
and commented out the whole script.
I could then open the script in the "calculations" tab and switch to script
view, and it showed just a CALCULATE; statement, followed by my commented out
script.
However, as soon as I uncommented the first CREATE MEMBER and went back to
Form View, the same error appeared again.

Then, I completely removed all contents of the script instead of commenting
out and could open the Calculations again. I subsequently tried to create a
new calculated member, the error appeared again.



"Chris Webb" wrote:

Are you running SP1 or the post SP1 hotfix rollup? I had the same problem the
other week.

I think it's something to do with BIDS not being able to deal with syntax
errors in the MDX Script. What I did was use SQL Management Studio to create
an ALTER TO script for my cube, then in that ALTER TO command comment out
every single statement in my MDX Script. I then ran the command, resulting in
a cube with no calculations on it. I then found I could connect to my cube
again in Visual Studio, and went through each statement in the script
uncommenting them one at a time until I found the statements which were
causing the error - in my case, there were references to dimensions and
members which were no longer present in the cube.

HTH,

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and click on the
"Calculations" tab, the middle window doesn't show anything but "Unexpected
error occurred: 'Attempted to read or write protected memory. This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in Notepad, I
can see the MDX script defining my calculations and it looks fine.

Where can I start investigating this problem ?


Reply With Quote
  #5  
Old   
Pat
 
Posts: n/a

Default RE: Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 10:22 AM



Sure. Here is the script before, in Form View:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is
affected.
You should edit this command only if you manually specify how the cube is
aggregated.
*/
CALCULATE

I click on "New Calculated Member", expand the Measures node in the Metadata
pane, and choose for instance Units (which is not a calculated measure, but
is present in the fact table), and drag it to the Expression text box.
Straight after that, I click on the Script View and get the error message
"Unexpected error, ..."

Conversely, If I open the empty script in Script View and edit it as follows:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is
affected.
You should edit this command only if you manually specify how the cube is
aggregated.
*/
CALCULATE;
CREATE MEMBER CURRENTCUBE.[MEASURES].[Test]
AS [Measures].[Units];

and then click on the Form View icon, I get the error message.

By the way, thanks for taking the time look into this. Do you think we
should open a support ticket with MS at this stage?

"Chris Webb" wrote:

Quote:
Hmm, strange. I don't suppose you could post up the definition of a
calculated member which, when added to an otherwise empty script, produces
the error?

Chris
--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I'm running on SP1 and I installed a hotfix from MS last week regarding calls
to VBA functions in an MDX query called through OPENQUERY. I don't have the
post-SP1 hotfix.
Kind of following your suggestion, I edited the MyCube.cube file directly
and commented out the whole script.
I could then open the script in the "calculations" tab and switch to script
view, and it showed just a CALCULATE; statement, followed by my commented out
script.
However, as soon as I uncommented the first CREATE MEMBER and went back to
Form View, the same error appeared again.

Then, I completely removed all contents of the script instead of commenting
out and could open the Calculations again. I subsequently tried to create a
new calculated member, the error appeared again.



"Chris Webb" wrote:

Are you running SP1 or the post SP1 hotfix rollup? I had the same problem the
other week.

I think it's something to do with BIDS not being able to deal with syntax
errors in the MDX Script. What I did was use SQL Management Studio to create
an ALTER TO script for my cube, then in that ALTER TO command comment out
every single statement in my MDX Script. I then ran the command, resulting in
a cube with no calculations on it. I then found I could connect to my cube
again in Visual Studio, and went through each statement in the script
uncommenting them one at a time until I found the statements which were
causing the error - in my case, there were references to dimensions and
members which were no longer present in the cube.

HTH,

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and click on the
"Calculations" tab, the middle window doesn't show anything but "Unexpected
error occurred: 'Attempted to read or write protected memory. This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in Notepad, I
can see the MDX script defining my calculations and it looks fine.

Where can I start investigating this problem ?


Reply With Quote
  #6  
Old   
Chris Webb
 
Posts: n/a

Default RE: Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 10:35 AM



Hmm, strange indeed. The only thing I could think of that might be causing a
problem in your script fragment is having MEASURES all uppercase. Can you try
pasting the following in to see what happens?

CREATE MEMBER CURRENTCUBE.[Measures].[Test] AS [Measures].[Units];

Of course this would only be a problem if your AS instance was case
sensitive. Otherwise yes, I'd recommend opening a ticket with PSS - you've
definitely got a bug here.

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

Quote:
Sure. Here is the script before, in Form View:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is
affected.
You should edit this command only if you manually specify how the cube is
aggregated.
*/
CALCULATE

I click on "New Calculated Member", expand the Measures node in the Metadata
pane, and choose for instance Units (which is not a calculated measure, but
is present in the fact table), and drag it to the Expression text box.
Straight after that, I click on the Script View and get the error message
"Unexpected error, ..."

Conversely, If I open the empty script in Script View and edit it as follows:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is
affected.
You should edit this command only if you manually specify how the cube is
aggregated.
*/
CALCULATE;
CREATE MEMBER CURRENTCUBE.[MEASURES].[Test]
AS [Measures].[Units];

and then click on the Form View icon, I get the error message.

By the way, thanks for taking the time look into this. Do you think we
should open a support ticket with MS at this stage?

"Chris Webb" wrote:

Hmm, strange. I don't suppose you could post up the definition of a
calculated member which, when added to an otherwise empty script, produces
the error?

Chris
--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I'm running on SP1 and I installed a hotfix from MS last week regarding calls
to VBA functions in an MDX query called through OPENQUERY. I don't have the
post-SP1 hotfix.
Kind of following your suggestion, I edited the MyCube.cube file directly
and commented out the whole script.
I could then open the script in the "calculations" tab and switch to script
view, and it showed just a CALCULATE; statement, followed by my commented out
script.
However, as soon as I uncommented the first CREATE MEMBER and went back to
Form View, the same error appeared again.

Then, I completely removed all contents of the script instead of commenting
out and could open the Calculations again. I subsequently tried to create a
new calculated member, the error appeared again.



"Chris Webb" wrote:

Are you running SP1 or the post SP1 hotfix rollup? I had the same problem the
other week.

I think it's something to do with BIDS not being able to deal with syntax
errors in the MDX Script. What I did was use SQL Management Studio to create
an ALTER TO script for my cube, then in that ALTER TO command comment out
every single statement in my MDX Script. I then ran the command, resulting in
a cube with no calculations on it. I then found I could connect to my cube
again in Visual Studio, and went through each statement in the script
uncommenting them one at a time until I found the statements which were
causing the error - in my case, there were references to dimensions and
members which were no longer present in the cube.

HTH,

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and click on the
"Calculations" tab, the middle window doesn't show anything but "Unexpected
error occurred: 'Attempted to read or write protected memory. This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in Notepad, I
can see the MDX script defining my calculations and it looks fine.

Where can I start investigating this problem ?


Reply With Quote
  #7  
Old   
Pat
 
Posts: n/a

Default RE: Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 11:10 AM



OK, since it looked like an AS bug, I uninstalled the Microsoft Hotfix, and
everything is fine again, I see all my calculated measures (the real ones are
a lot more complex too

Thanks again for helping me with this.

"Chris Webb" wrote:

Quote:
Hmm, strange indeed. The only thing I could think of that might be causing a
problem in your script fragment is having MEASURES all uppercase. Can you try
pasting the following in to see what happens?

CREATE MEMBER CURRENTCUBE.[Measures].[Test] AS [Measures].[Units];

Of course this would only be a problem if your AS instance was case
sensitive. Otherwise yes, I'd recommend opening a ticket with PSS - you've
definitely got a bug here.

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

Sure. Here is the script before, in Form View:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is
affected.
You should edit this command only if you manually specify how the cube is
aggregated.
*/
CALCULATE

I click on "New Calculated Member", expand the Measures node in the Metadata
pane, and choose for instance Units (which is not a calculated measure, but
is present in the fact table), and drag it to the Expression text box.
Straight after that, I click on the Script View and get the error message
"Unexpected error, ..."

Conversely, If I open the empty script in Script View and edit it as follows:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is
affected.
You should edit this command only if you manually specify how the cube is
aggregated.
*/
CALCULATE;
CREATE MEMBER CURRENTCUBE.[MEASURES].[Test]
AS [Measures].[Units];

and then click on the Form View icon, I get the error message.

By the way, thanks for taking the time look into this. Do you think we
should open a support ticket with MS at this stage?

"Chris Webb" wrote:

Hmm, strange. I don't suppose you could post up the definition of a
calculated member which, when added to an otherwise empty script, produces
the error?

Chris
--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I'm running on SP1 and I installed a hotfix from MS last week regarding calls
to VBA functions in an MDX query called through OPENQUERY. I don't have the
post-SP1 hotfix.
Kind of following your suggestion, I edited the MyCube.cube file directly
and commented out the whole script.
I could then open the script in the "calculations" tab and switch to script
view, and it showed just a CALCULATE; statement, followed by my commented out
script.
However, as soon as I uncommented the first CREATE MEMBER and went back to
Form View, the same error appeared again.

Then, I completely removed all contents of the script instead of commenting
out and could open the Calculations again. I subsequently tried to create a
new calculated member, the error appeared again.



"Chris Webb" wrote:

Are you running SP1 or the post SP1 hotfix rollup? I had the same problem the
other week.

I think it's something to do with BIDS not being able to deal with syntax
errors in the MDX Script. What I did was use SQL Management Studio to create
an ALTER TO script for my cube, then in that ALTER TO command comment out
every single statement in my MDX Script. I then ran the command, resulting in
a cube with no calculations on it. I then found I could connect to my cube
again in Visual Studio, and went through each statement in the script
uncommenting them one at a time until I found the statements which were
causing the error - in my case, there were references to dimensions and
members which were no longer present in the cube.

HTH,

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and click on the
"Calculations" tab, the middle window doesn't show anything but "Unexpected
error occurred: 'Attempted to read or write protected memory. This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in Notepad, I
can see the MDX script defining my calculations and it looks fine.

Where can I start investigating this problem ?


Reply With Quote
  #8  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: Unexpected error in Cube Calculations, SSAS 2005 - 06-28-2006 , 01:29 PM



Yes, there is an issue with this -- the problem is that the hotfix installer
is not installing some Tools binaries that are affected by the change to the
OLE DB binaries.

Packages must be installed in the order of : Server, AS, IS, RS, Tools

If you don't have the Tools package then you should ask your CSS contact for
it -- if they need more information, ask them to contact me directly.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

"Pat" <pat (AT) online (DOT) nospam> wrote

Quote:
OK, since it looked like an AS bug, I uninstalled the Microsoft Hotfix,
and
everything is fine again, I see all my calculated measures (the real ones
are
a lot more complex too

Thanks again for helping me with this.

"Chris Webb" wrote:

Hmm, strange indeed. The only thing I could think of that might be
causing a
problem in your script fragment is having MEASURES all uppercase. Can you
try
pasting the following in to see what happens?

CREATE MEMBER CURRENTCUBE.[Measures].[Test] AS [Measures].[Units];

Of course this would only be a problem if your AS instance was case
sensitive. Otherwise yes, I'd recommend opening a ticket with PSS -
you've
definitely got a bug here.

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

Sure. Here is the script before, in Form View:
/*
The CALCULATE command controls the aggregation of leaf cells in the
cube.
If the CALCULATE command is deleted or modified, the data within the
cube is
affected.
You should edit this command only if you manually specify how the cube
is
aggregated.
*/
CALCULATE

I click on "New Calculated Member", expand the Measures node in the
Metadata
pane, and choose for instance Units (which is not a calculated measure,
but
is present in the fact table), and drag it to the Expression text box.
Straight after that, I click on the Script View and get the error
message
"Unexpected error, ..."

Conversely, If I open the empty script in Script View and edit it as
follows:
/*
The CALCULATE command controls the aggregation of leaf cells in the
cube.
If the CALCULATE command is deleted or modified, the data within the
cube is
affected.
You should edit this command only if you manually specify how the cube
is
aggregated.
*/
CALCULATE;
CREATE MEMBER CURRENTCUBE.[MEASURES].[Test]
AS [Measures].[Units];

and then click on the Form View icon, I get the error message.

By the way, thanks for taking the time look into this. Do you think we
should open a support ticket with MS at this stage?

"Chris Webb" wrote:

Hmm, strange. I don't suppose you could post up the definition of a
calculated member which, when added to an otherwise empty script,
produces
the error?

Chris
--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available for
hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I'm running on SP1 and I installed a hotfix from MS last week
regarding calls
to VBA functions in an MDX query called through OPENQUERY. I don't
have the
post-SP1 hotfix.
Kind of following your suggestion, I edited the MyCube.cube file
directly
and commented out the whole script.
I could then open the script in the "calculations" tab and switch
to script
view, and it showed just a CALCULATE; statement, followed by my
commented out
script.
However, as soon as I uncommented the first CREATE MEMBER and went
back to
Form View, the same error appeared again.

Then, I completely removed all contents of the script instead of
commenting
out and could open the Calculations again. I subsequently tried to
create a
new calculated member, the error appeared again.



"Chris Webb" wrote:

Are you running SP1 or the post SP1 hotfix rollup? I had the same
problem the
other week.

I think it's something to do with BIDS not being able to deal
with syntax
errors in the MDX Script. What I did was use SQL Management
Studio to create
an ALTER TO script for my cube, then in that ALTER TO command
comment out
every single statement in my MDX Script. I then ran the command,
resulting in
a cube with no calculations on it. I then found I could connect
to my cube
again in Visual Studio, and went through each statement in the
script
uncommenting them one at a time until I found the statements
which were
causing the error - in my case, there were references to
dimensions and
members which were no longer present in the cube.

HTH,

Chris

--
I blog about Microsoft BI here:
http://spaces.msn.com/cwebbbi/
Do you need help with Analysis Services or MDX? I''m available
for hire:
http://www.crossjoin.co.uk/


"Pat" wrote:

I have a 2005 BI solution that is deployed and in production.

I was looking to make a change to a calculated measure.
When I open the solution in Visual Studio, go to the cube and
click on the
"Calculations" tab, the middle window doesn't show anything but
"Unexpected
error occurred: 'Attempted to read or write protected memory.
This is often
an indication that other memory is corrupt' "
However, when I open the cube definition file (MyCube.cube) in
Notepad, I
can see the MDX script defining my calculations and it looks
fine.

Where can I start investigating this problem ?




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.