Google
 

Wednesday, August 20, 2008

Modifying the model's XML data

PerformancePoint Planning stores the bulk of model metadata in a large, bulky image blob. This blob is actually editable XML. The trick to reading this is to convert the data in the column.

-- view latest model version as XML
SELECT TOP 1 cast(cast(cast(xmlblob as varbinary(max)) as varchar(max)) as xml)
FROM dbo.BizAppNodes
ORDER BY bizappnodeversion desc

-- cast XML back to the image blob
SELECT TOP 1 cast(cast(cast(cast(cast(cast(xmlblob as varbinary(max)) as varchar(max)) as xml) as varchar(max)) as varbinary(max)) as image)
FROM dbo.BizAppNodes
ORDER BY bizappnodeversion desc

You may need to adjust the options within Query Analyzer to return larger blocks of XML. Tools - Options - Query Results - SQL Server - Grid - Unlimited XML.

This may make it possible (though it wouldn't be recommended) to change the XML in the model and report against it with external tools. Backup the databases first!

No comments: