SSAS: New ASSP Function - ListFunctions()

I just added another sample to the Analysis Services Stored Procedure project. The following text is copied from the Wiki documentation which I just updated. This function is not currently available as part of a compiled release, but it is available from the source code repository, so you can download the code and compile it yourself. I also have a Powershell based variation of this proc which was actually how I prototyped the technique. I plan to polish up the rough edges of that script and post it here soon too.

This stored procedure will list all of the available functions in .Net based assemblies that are stored either on the server or in a specified database. If the function is called with no parameters it will return the functions available in all the assemblies located at the server level.

eg. CALL ListFunctions()

If this stored procedure is called with the name of a specific database, it will return the functions available for all the .Net assemblies located in that specific database.

eg. CALL ListFunctions("Adventure Works DW")

This sample has a number of interesting features which set it apart from the other samples currently available.

  • It is currently the only sample for a stored procedure that uses the CALL syntax.
  • It demonstrates returning a DataTable from a stored procedure.
  • It shows how to "re-assemble" an assembly using AMO

This function does not work with any of the system assemblies as none of these assemblies contain "main" files which can be re-assembled and reflected against. The functions in these files should all be well documented in Books online anyway.

Note: This sample requires being deployed with unrestricted security privileges in order for it to work.

Print | posted on Monday, January 8, 2007 9:16 PM