Friday, February 14, 2014

SSAS Calculations tab : Unexpected error occurred: 'Length cannot be less than zero. Parameter name 'length'

Recently I came across one error under Calculations tab. I was not able to access my calculations tab and calculations tab was showing following error.

Unexpected error occurred: 'Length cannot be less than zero. Parameter name 'length'


Sometimes if you are modifying your MDX code under calculations tab and if you missed any syntax under any of the calculations then probably you may encounter the same issue. Now how to resolve this error because you are not even able to access calculations tab if want to correct the syntax, So the solution is simple, connect to analysis services under management studio, right click on SSAS database and open your cube database XMLA using "Script Database as" and then using "ALTER To" option.


Under XMLA, find <MdxScript> node and check the syntax of your calculations, correct that and execute the script. As you are doing changes to calculations tab, you don't need to process/deploy cube. After execution of XMLA, if you open your project using BIDS, you will  be able to access your Calculations tab.





Wednesday, February 12, 2014

OLE DB error: OLE DB or ODBC error: Login failed for user 'NT AUTHORITY\SYSTEM'.; 28000; Cannot open database "DatabaseName" requested by the login. The login failed.; 42000.

Sometimes while doing cube deployment, you may come across following error and we are going to talk on the resolution for the same in this post.

OLE DB error: OLE DB or ODBC error: Login failed for user 'NT AUTHORITY\SYSTEM'.; 28000; Cannot open database "ODW" requested by the login. The login failed.; 42000.

You may encounter this error if the user you are using to deploy cube does not have access. Since error is saying "NT AUTHORITY\SYSTEM", just go to relational database and expand "Security" folder.


Double click on "NT AUTHORITY\SYSTEM" node, it will open "Login Properties" wizard, go to "User Mapping" tab and check the check-box of relational database which you are using for processing cube.
Give appropriate permissions and click ok. And you will be able to deploy cube successfully.