Deploy MDX Script - issue with database IDs and names

Topics: Resolved
Jun 1, 2007 at 4:11 PM
Hello,

I am using Deploy MDX script and love it. but today had problem.

I did full process on database days ago, and after testing was completed I renamed that database. So I have database ID and name do not match.
This looks like a problem to Deploy MDX script.
I had to fix few issues and open BIDS. I change project properties to point to database with new name and submitted mdx script. Everything seems OK, no errors. After multiple attempts to fix my problem I realized that something should be wrong, and my changes were not impacting database. Profiler showed error:

XML for Analysis parser: The 'CreatedTimestamp' read-only element at line 10, column 24 (namespace http://schemas.microsoft.com/analysisservices/2003/engine) under Envelope/Body/Execute/Command/Alter/ObjectDefinition/MdxScript was ignored. The following system error occurred: . XML for Analysis parser: The 'LastSchemaUpdate' read-only element at line 11, column 24 (namespace http://schemas.microsoft.com/analysisservices/2003/engine) under Envelope/Body/Execute/Command/Alter/ObjectDefinition/MdxScript was ignored. The following system error occurred: . Errors in the metadata manager. Either the database with the ID of 'MySSASDBID' does not exist in the server with the ID of 'MyServerName', or the user does not have permissions to access the object.

So it looked like you were using database name as ID. So I though I'll change project properties to point to old database name, so ID's will exists. But then I got error that Database with that old name does not exists.

Any ways you can adjust this utility so when it fails deployment for any reasons, it shows error message? I am back to doing online updates and I hate that part - I am so used to MDX deployment :-).

Thanks

Vidas Matelis
Coordinator
Jun 4, 2007 at 5:37 AM
Thanks for reporting this Vidas,

There are 2 issues that I see here

1) You are correct, this feature is taking the database name from the target database setting and using it as a database ID. I have a fix for this and hope to get a release out in a few days. At the moment the alter script is built from an XSLT template, but I have a better way of doing this now using the AMO scripter object.

2) The error produced by 1) was not being trapped correctly. I suspect that the error is being returned in the xmla response, but an exception is not being thrown. I want to see if I can sort this out before doing a release as any errors like this should be displayed to the user.
Coordinator
Jun 6, 2007 at 12:06 PM
Edited Jun 6, 2007 at 12:34 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.

This is also a situation which BIDS and the deployment wizard cannot handle. I have setup an issue on connect about this here https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=281595