This was taught to me by bitter experience.
When developing your MDX scripts empty the SSAS cache and test the cube after each script. block. By script. block I mean each SCOPE or CREATE MEMBER/SET statement. I just spent 6 hours backtracking my script. to isolate a strange bug effectively shutting down the SSAS service every time I queried the cube (the offending script. segment was a aggregate([dimension member], [measure]) statement that I changed into a ([dimension member], [measure]) statement). So from now on I:
- Add my script. block
- Run the following XMLA through a XMLA query window (from sql server mngmt studio) to clear the cache:
<DatabaseID>Your SSAS database nameDatabaseID>
- Put all measures up on columns in BIDS "browse cube" window (or reconnect if they already are there) and various combinations of dimensions affected by the script. block on rows.
- Verify that my cube doesnt a) crash and b) returns results within an acceptable timespan before adding the next script. block.
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/12641349/viewspace-134394/，如需转载，请注明出处，否则将追究法律责任。