Tuesday, March 27, 2012

DataSource Renaming

How do you check to find a data source....We were testing a cube, decided that we wanted to change the names of the dimensions, datasources, etc.

I thought I had gone though each data source, dimension, data source view, that had a reference to datasource view "A" and changed it to reference "B". I did this by going into the view code and finding each reference to "A" and replacing it with "B". However, now when I try to process a dimension, I get the following error message:

The 'DataSourceView' with 'ID' = 'A' doesn't exist in the collection.

Well, I didn't want it to exist because I thought I had changed it to reference "B". Every time I try to go in to the view code section to see if I missed a reference to "A", it says that it can't find a "A".

I was just wondering if there is another way that I could go about finding if I have truly changed all references from "A" to "B"

Every object in SSAS has a name and ID propety. You can change the name freely, but the ID is not meant to be changed as the ID can be used all over the place internally.The Id's are unique within their object type, but not within the database, so doing a straight search and replace in the script can create problems.

If you haven't already tried this, Try connecting to the server, right clicking on the database and getting it to script the whole database as an alter script and then search through for datasource "A".