<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>TSSASM</title><link>http://tssasm.codeplex.com/project/feeds/rss</link><description>Using Transact SQL for browsing and managing Analysis Services 2005 Metadata</description><item><title>Source code checked in, #94877</title><link>http://tssasm.codeplex.com/SourceControl/changeset/changes/94877</link><description>Upgrade&amp;#58; New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link&amp;#58; http&amp;#58;&amp;#47;&amp;#47;go.microsoft.com&amp;#47;fwlink&amp;#47;&amp;#63;LinkId&amp;#61;254563</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 22:38:35 GMT</pubDate><guid isPermaLink="false">Source code checked in, #94877 20121001103835P</guid></item><item><title>Source code checked in, #94876</title><link>http://tssasm.codeplex.com/SourceControl/changeset/changes/94876</link><description>Checked in by server upgrade</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 22:31:06 GMT</pubDate><guid isPermaLink="false">Source code checked in, #94876 20121001103106P</guid></item><item><title>New Post: Installing on SQL Server 2008 x64</title><link>http://tssasm.codeplex.com/discussions/205232</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;&lt;span style="color: #000000;"&gt;You need to find the DLL that is registered in the GAC of your server. I managed to do so using a&amp;nbsp;CMD box , i found the file here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;C:\WINDOWS\assembly\GAC_MSIL\Microsoft.AnalysisServices\10.0.0.0__89845dcd8080cc91&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;this dll should be registered in the database first! After that, you&amp;nbsp;need to&amp;nbsp;reference it in the TSSASM .NET project and compile a new TSSASM.dll.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;I managed to make it work in 2008 (not R2). the R2 version of the dll seems to have references to sharepoint...(has something to do with PowerPivot)&amp;nbsp;you may have to install sharepoint foundation services on your server.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;good luck, Michael&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><author>mkoenings</author><pubDate>Mon, 04 Jul 2011 09:58:49 GMT</pubDate><guid isPermaLink="false">New Post: Installing on SQL Server 2008 x64 20110704095849A</guid></item><item><title>Source code checked in, #57274</title><link>http://tssasm.codeplex.com/SourceControl/changeset/changes/57274</link><description>Checked in by server upgrade</description><author>_TFSSERVICE</author><pubDate>Wed, 28 Jul 2010 22:13:23 GMT</pubDate><guid isPermaLink="false">Source code checked in, #57274 20100728101323P</guid></item><item><title>New Post: Code enhancements</title><link>http://tssasm.codeplex.com/Thread/View.aspx?ThreadId=210379</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Applies only if you use the code to add to other VS.net web project ...&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ArrayList is reused on postback !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am just working on your code in a web page.&amp;nbsp;I added your&amp;nbsp;SSASObjects.cs code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am displaying as&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SSASPartitions ss = new SSASPartitions(&amp;quot;localhost&amp;quot;, &amp;quot;CubeCatalogName&amp;quot;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;gvSSASPartitions.DataSource = ss.PartitionList; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Simple gridview with id =gvSSASPartitions&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gvSSASPartitions.DataBind();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Fix: Reset the arraylist when you call the method.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;private static void PopulatePartitionList()&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; partitionlist = new ArrayList(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Add this line to your method so that it will reset when you call.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Hope you consider it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;span style="white-space:pre"&gt; &lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><author>vansree</author><pubDate>Fri, 23 Apr 2010 23:49:01 GMT</pubDate><guid isPermaLink="false">New Post: Code enhancements 20100423114901P</guid></item><item><title>New Post: Installing on SQL Server 2008 x64</title><link>http://tssasm.codeplex.com/Thread/View.aspx?ThreadId=205232</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please could you provide instructions for installing on SQL Server 2008 x64? The following assembly:&lt;/p&gt;
&lt;pre&gt;&lt;div style="color:Black;background-color:White"&gt;&lt;pre&gt;&lt;span style="color:Blue"&gt;Use&lt;/span&gt; &amp;lt;Your &lt;span style="color:Blue"&gt;database&lt;/span&gt;&amp;gt;
&lt;span style="color:Blue"&gt;CREATE&lt;/span&gt; &lt;span style="color:Blue"&gt;ASSEMBLY&lt;/span&gt; MicrosoftAnalysisServices
&lt;span style="color:Blue"&gt;FROM&lt;/span&gt; &lt;span style="color:#A31515"&gt;'&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'&lt;/span&gt;
&lt;span style="color:Blue"&gt;WITH&lt;/span&gt; PERMISSION_SET = UNSAFE
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;p&gt;does not exist!&lt;/p&gt;
&lt;p&gt;I *did* find a&amp;nbsp; version of it in %Program Files%\Microsoft SQL Server\100\Setup Bootstrap\Release\x64 (file version=10.0.2746.0) and I was able to catalog it into the DB however when I attempted to catalog TSSASM I received:&lt;/p&gt;
&lt;p&gt;Msg 10301, Level 16, State 1, Line 2&lt;br&gt;Assembly 'TSSASM' references assembly 'microsoft.analysisservices, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(failed to retrieve text for this error. Reason: 1815)). Please load the referenced assembly into the current database and retry your request.&lt;/p&gt;
&lt;p&gt;I am assuming I need a 2008 version of TSSASM. Do you have one available?&lt;/p&gt;
&lt;p&gt;Any help much appreciated. Thanks!&lt;/p&gt;
&lt;p&gt;-Jamie&lt;/p&gt;&lt;/div&gt;</description><author>jamiet</author><pubDate>Wed, 17 Mar 2010 11:17:24 GMT</pubDate><guid isPermaLink="false">New Post: Installing on SQL Server 2008 x64 20100317111724A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSSASM/Wiki/View.aspx?title=Home&amp;version=20</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services 2005 Metadata
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Index:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;&lt;li&gt;Binary Installation&lt;/li&gt;&lt;li&gt;Deploying from Visual Studio&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h2&gt;
1. Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS 2005 objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
2. Binary Installation 
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),
createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),
aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),
estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),
datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),
remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),
errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),
errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),
errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
3. Deploying from Visual Studio
&lt;/h1&gt; &lt;br /&gt;If you've just downloaded source code and you edited project you can deploy it directly from Visual Studio:&lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Follow steps 1, 2, and 3 from Binary Installation section above so as to set security configuration.&lt;br /&gt;&lt;b&gt;2&lt;/b&gt; Open project properties and select the Database Tab. &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Set the appropiate connection string where assembly will be deployed. &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Build and deploy project.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Sat, 31 May 2008 18:02:35 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080531060235P</guid></item><item><title>CREATED ISSUE: Resultset of function growth with every call</title><link>http://www.codeplex.com/TSASSM/WorkItem/View.aspx?WorkItemId=6119</link><description>In my environment the resultset of SELECT &amp;#42; FROM SSASPartitions&amp;#40;&amp;#39;Server&amp;#39;,&amp;#39;Database&amp;#39;&amp;#41; growth every time.&lt;br /&gt;The function never forgets the last result set and adds every new resultset at the end.&lt;br /&gt;W2003 Ent Eng., 64-Bit&lt;br /&gt;</description><author>kjh24</author><pubDate>Tue, 06 May 2008 13:55:12 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: Resultset of function growth with every call 20080506015512P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSSASM/Wiki/View.aspx?title=Home&amp;version=19</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Index:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;&lt;li&gt;Binary Installation&lt;/li&gt;&lt;li&gt;Deploying from Visual Studio&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h2&gt;
1. Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS 2005 objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
2. Binary Installation 
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
3. Deploying from Visual Studio
&lt;/h1&gt; &lt;br /&gt;If you've just downloaded source code and you edited project you can deploy it directly from Visual Studio:&lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Follow steps 1, 2, and 3 from Binary Installation section above so as to set security configuration.&lt;br /&gt;&lt;b&gt;2&lt;/b&gt; Open project properties and select the Database Tab. &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Set the appropiate connection string where assembly will be deployed. &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Build and deploy project.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Mon, 10 Mar 2008 17:36:13 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080310053613P</guid></item><item><title>UPDATED RELEASE: TSSASM v0.1 beta (mar 10, 2008)</title><link>http://www.codeplex.com/TSSASM/Release/ProjectReleases.aspx?ReleaseId=11545</link><description>This first release is intended to be proof of concept and it has only one SSAS 2005 metadata retrieving function&amp;#58; SSASPartitions.&lt;br /&gt;See Home tab to get detailed steps for installation and using.&lt;br /&gt;Other SSAS 2005 metadata object will be able to be browsed in future releases.&lt;br /&gt;&lt;br /&gt;</description><author></author><pubDate>Mon, 10 Mar 2008 17:35:21 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: TSSASM v0.1 beta (mar 10, 2008) 20080310053521P</guid></item><item><title>RELEASED: TSSASM v0.1 beta (Mar 10, 2008)</title><link>http://www.codeplex.com/TSSASM/Release/ProjectReleases.aspx?ReleaseId=11545</link><description>This first release is intended to be proof of concept and it has only one SSAS 2005 metadata retrieving function&amp;#58; SSASPartitions.&lt;br /&gt;See Home tab to get detailed steps for installation and using.&lt;br /&gt;Other SSAS 2005 metadata object will be able to be browsed in future releases.&lt;br /&gt;&lt;br /&gt;</description><author></author><pubDate>Mon, 10 Mar 2008 17:35:21 GMT</pubDate><guid isPermaLink="false">RELEASED: TSSASM v0.1 beta (Mar 10, 2008) 20080310053521P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSSASM/Wiki/View.aspx?title=Home&amp;version=18</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Index:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;&lt;li&gt;Binary Installation&lt;/li&gt;&lt;li&gt;Deploying from Visual Studio&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h2&gt;
1. Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
2. Binary Installation 
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
3. Deploying from Visual Studio
&lt;/h1&gt; &lt;br /&gt;If you've just downloaded source code and you edited project you can deploy it directly from Visual Studio:&lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Follow steps 1, 2, and 3 from Binary Installation section above so as to set security configuration.&lt;br /&gt;&lt;b&gt;2&lt;/b&gt; Open project properties and select the Database Tab. &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Set the appropiate connection string where assembly will be deployed. &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Build and deploy project.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Mon, 10 Mar 2008 17:19:30 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080310051930P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSSASM/Wiki/View.aspx?title=Home&amp;version=17</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Index:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;&lt;li&gt;Binary Installation&lt;/li&gt;&lt;li&gt;Deploying from Visual Studio&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h2&gt;
1. Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
2. Binary Installation 
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
3. Deploying from Visual Studio
&lt;/h1&gt; &lt;br /&gt;If you've just downloaded source code and you edited project you can deploy it directly from Visual Studio:&lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Follow steps 1, 2, and 3 from Binary Installation section above so as to set security configuration.&lt;br /&gt;&lt;b&gt;2&lt;/b&gt; Open project properties and select the Database Tab. &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Set the appropiate connection string where assembly will be deployed. &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Build and deploy project.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Mon, 10 Mar 2008 17:17:09 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080310051709P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSSASM/Wiki/View.aspx?title=Home&amp;version=16</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Index&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;&lt;li&gt;Binary Installation&lt;/li&gt;&lt;li&gt;Deploying from Visual Studio&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h2&gt;
1. Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
2. Binary Installation 
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
3. Deploying from Visual Studio
&lt;/h1&gt; &lt;br /&gt;If you've just downloaded source code and you edited project you can deploy the project directly from Visual Studio:&lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Follow steps 1, 2, and 3 from Binary Installation section above so as to set security configuration.&lt;br /&gt;&lt;b&gt;2&lt;/b&gt; Open project properties and select the Database Tab. &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Set the appropiate connection string where assembly will be deployed. &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Build and deploy project.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Mon, 10 Mar 2008 17:16:13 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080310051613P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSSASM/Wiki/View.aspx?title=Home&amp;version=15</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Index&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;&lt;li&gt;Binary Installation&lt;/li&gt;&lt;li&gt;Deploying from Visual Studio&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
Binary Installation 
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
Deploying from Visual Studio
&lt;/h1&gt; &lt;br /&gt;If you've just downloaded source code and you edited project you can deploy the project directly from Visual Studio:&lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Follow steps 1, 2, and 3 from Binary Installation section above so as to set security configuration.&lt;br /&gt;&lt;b&gt;2&lt;/b&gt; Open project properties and select the Database Tab. &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Set the appropiate connection string where assembly will be deployed. &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Build and deploy project.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Mon, 10 Mar 2008 17:15:17 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080310051517P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSSASM/Wiki/View.aspx?title=Home&amp;version=14</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSSASM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
Binary Installation 
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
Deploying from Visual Studio
&lt;/h1&gt; &lt;br /&gt;If you've just downloaded source code and you edited project you can deploy the project directly from Visual Studio:&lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Follow steps 1, 2, and 3 from Binary Installation section above so as to set security configuration.&lt;br /&gt;&lt;b&gt;2&lt;/b&gt; Open project properties and select the Database Tab. &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Set the appropiate connection string where assembly will be deployed. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Mon, 10 Mar 2008 17:13:07 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080310051307P</guid></item><item><title>UPDATED RELEASE: TSSASM v0.1 beta (mar 10, 2008)</title><link>http://www.codeplex.com/TSASSM/Release/ProjectReleases.aspx?ReleaseId=11545</link><description>This first release is intended to be proof of concept and it has only one SSAS metadata retrieving function&amp;#58; SSASPartitions.&lt;br /&gt;See Home tab to get detailed steps for installation and using.&lt;br /&gt;Other SSAS metadata object will be able to be browsed in future releases.</description><author></author><pubDate>Mon, 10 Mar 2008 17:03:43 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: TSSASM v0.1 beta (mar 10, 2008) 20080310050343P</guid></item><item><title>UPDATED RELEASE: TSSASM v0.1 beta (mar 10, 2008)</title><link>http://www.codeplex.com/TSASSM/Release/ProjectReleases.aspx?ReleaseId=11545</link><description>This first release has only one TSSASM function&amp;#58; SSASPartitions.&lt;br /&gt;See Home tab to get detailed steps for installation and using.&lt;br /&gt;Other SSAS metadata object will be able to be browsed in future releases.</description><author></author><pubDate>Mon, 10 Mar 2008 16:57:30 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: TSSASM v0.1 beta (mar 10, 2008) 20080310045730P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSASSM/Wiki/View.aspx?title=Home&amp;version=13</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS objects when facing scenarios with a large amount of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but this project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This first release component has limited functionality as only browse partition objects (SSASPartitions function). Additional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSASSM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSASSM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
Installation
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly in SQL Server so as to allow CLR reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has methods not supported with SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function. Hope this help you.&lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Mon, 10 Mar 2008 16:54:31 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080310045431P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/TSASSM/Wiki/View.aspx?title=Home&amp;version=12</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Transact Sql Server Analysis Services Metadata
&lt;/h1&gt;Using Transact SQL for browsing and managing Analysis Services Metadata
&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Introduction
&lt;/h2&gt; &lt;br /&gt;Managing SSAS objects when facing scenarios with lots of cubes (let's say more than a dozen) and lots of partitions (let's say thousands) is not an easy job to deal with.&lt;br /&gt;When trying to control partition states and cube consistency after large and complex processing batches became a costly job and not allways as exact as process quality control requirements need.&lt;br /&gt;SSAS uses SQL Server relational tables as cube data source but thsi project proposes to use SQL Server in the opposite way as well:  as the ideal tool to browse all data about SSAS metadata objects.&lt;br /&gt;Using T-SQL as the query language can help us to fastly answer, for example, several issues about partition processing:&lt;br /&gt; &lt;br /&gt;1) Are there partitions that have not been processed ?&lt;br /&gt;2) are all partitions created after closing period ?&lt;br /&gt;3) How many partitions has aggregation designed ?&lt;br /&gt;4) Which aggregation design are asigned ?&lt;br /&gt;5) List all partitions that has a certain slice.&lt;br /&gt;6) Check if all partitions has the same data source.&lt;br /&gt;7) Want to document all objects and its properties and want to get document updated when an object is changed.&lt;br /&gt; &lt;br /&gt;We can query SSAS object using Transact-SQL query language through SQL Server 2005 CLR  (Common Language Runtime) new feature.&lt;br /&gt;The idea is create a .NET CLR assembly that access SSAS through AMO; then it will provide rows to a table value function (TVF) that can be queried using a T-Sql SELECT statement.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;br /&gt;&lt;u&gt;Component has limited functionality as only browse partition objects (SSASPartitions function). Aditional functions will be added in future releases&lt;/u&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Usage sample 1: knowing all partitions in a certain SSAS Catalog:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSASSM&amp;amp;DownloadId=29443" alt="Sample01.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;Usage sample 2: knowing all partitions of measure group &amp;quot;Internet Sales&amp;quot; that have &amp;quot;molap&amp;quot; storage:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=TSASSM&amp;amp;DownloadId=29444" alt="Sample02.jpg" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
Installation
&lt;/h1&gt; &lt;br /&gt;CLR feature must be activated in the SQL Server 2005 instance. Follow these steps to make binary works:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;1&lt;/b&gt; Activate SQL Server CLR. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;2&lt;/b&gt; SQL Server instance must trust database and its content. Only a user with sysadmin server role can do it.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
 
ALTER DATABASE &amp;lt;Your database&amp;gt; SET TRUSTWORTHY ON 
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;3&lt;/b&gt; Analysis Services Management Object assembly must be registered firstly so as to allow CLR can reference it&lt;br /&gt;   &lt;u&gt;Must be registered as unsafe because it has method not supported in SAFE and EXTERNAL_ACCESS permission types.&lt;/u&gt;&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Use &amp;lt;Your database&amp;gt;
CREATE ASSEMBLY MicrosoftAnalysisServices
FROM '&amp;lt;Path&amp;gt;\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.AnalysisServices.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;4&lt;/b&gt; Create a new assembly that references TSSASM dll:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
CREATE ASSEMBLY TSSASM
FROM '&amp;lt;Path&amp;gt;\TSSASM.dll'
WITH PERMISSION_SET = UNSAFE
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;5&lt;/b&gt; Create a table function that references the CLR function&lt;br /&gt;	&lt;u&gt;Note: table definition cannot be changed, it must be exactly the same as it is hard coded inside dll&lt;/u&gt;&lt;br /&gt;&lt;pre&gt;
CREATE FUNCTION SSASPartitions(@server nvarchar(100),@catalog nvarchar(100))
RETURNS TABLE 
(cubename NVARCHAR(100),measuregroupname NVARCHAR(100), partitionid NVARCHAR(100), partitionname NVARCHAR(100),createdtimestamp DATETIME,lastprocessed DATETIME,aggregationdesignid NVARCHAR(100),aggregationdesignname NVARCHAR(100),aggregationdesignaggrscount INT,aggregationdesignestperfgain INT,slice NVARCHAR(100),estimatedsize BIGINT,estimatedrows BIGINT,storagemode NVARCHAR(100),storagelocation NVARCHAR(100),processingmode NVARCHAR(100),datasourcename NVARCHAR(100),datasourceconn NVARCHAR(255),datasourceviewname NVARCHAR(100),remotedatasourcename NVARCHAR(100),remotedatasourceid NVARCHAR(100),description NVARCHAR(100),errconfkeyerrorlogfile NVARCHAR(100),errconfkeyduplicate NVARCHAR(100),errconfkeyaction NVARCHAR(100),errconfkeyerrorlimit BIGINT,errconfkeyerrorlimitaction NVARCHAR(100),errconfkeynotfound NVARCHAR(100),errconfnullkeyconvtounknown NVARCHAR(100),errconfnullkeynotallowed NVARCHAR(100))
AS 
EXTERNAL NAME TSSASM.CLRFunctions.SSASPartitions
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;6&lt;/b&gt; Try function.&lt;br /&gt; &lt;br /&gt; ***&lt;br /&gt; &lt;br /&gt;This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.&lt;br /&gt; &lt;br /&gt;There are three requirements before you publish:&lt;br /&gt; &lt;br /&gt;- Edit this page to provide information about your project&lt;br /&gt;- Upload the initial source code for your project&lt;br /&gt;- Add your project license&lt;br /&gt; &lt;br /&gt;Additional information on starting a new project is available here: &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CodePlex&amp;amp;title=CodePlex%20Project%20Startup%20Guide" class="externalLink"&gt;Project Startup Guide&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;</description><author>Ltubia</author><pubDate>Sat, 08 Mar 2008 23:54:38 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080308115438P</guid></item></channel></rss>