Discussion:
how to find version of the analysis services?
(too old to reply)
light_wt
2007-11-01 20:35:02 UTC
Permalink
i know how to find the database version liked using tsql

select serverproperty('ProductVersion')
or
select @@version

how can i find the version of the cube or the analysis services? thanks.
Dejan Sarka
2007-11-02 10:44:50 UTC
Permalink
Post by light_wt
i know how to find the database version liked using tsql
select serverproperty('ProductVersion')
or
how can i find the version of the cube or the analysis services? thanks.
I created myself a CLR procedure. Here is the main part you need:

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using AMO = Microsoft.AnalysisServices;
using ADOMD = Microsoft.AnalysisServices.AdomdServer;
namespace ServerProcs
{
public class ASProcs
{
public static string GetSrvVersion()
{
AMO.Server currSvr = new AMO.Server();
currSvr.CaptureXml = false;
currSvr.Connect("DataSource=" + ADOMD.Context.CurrentServerID + ";");
return currSvr.Version;
}
}
}

After you build and register the assebly, you can call this from DMX
language:

SELECT ServerProcs.GetSrvVersion()
FROM [Customer Clusters];
--
Dejan Sarka
http://blogs.solidq.com/EN/dsarka/
light_wt
2007-11-02 18:09:01 UTC
Permalink
that is great.

is there a step by step guide on build and register the assembly? thanks.
Post by Dejan Sarka
Post by light_wt
i know how to find the database version liked using tsql
select serverproperty('ProductVersion')
or
how can i find the version of the cube or the analysis services? thanks.
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using AMO = Microsoft.AnalysisServices;
using ADOMD = Microsoft.AnalysisServices.AdomdServer;
namespace ServerProcs
{
public class ASProcs
{
public static string GetSrvVersion()
{
AMO.Server currSvr = new AMO.Server();
currSvr.CaptureXml = false;
currSvr.Connect("DataSource=" + ADOMD.Context.CurrentServerID + ";");
return currSvr.Version;
}
}
}
After you build and register the assebly, you can call this from DMX
SELECT ServerProcs.GetSrvVersion()
FROM [Customer Clusters];
--
Dejan Sarka
http://blogs.solidq.com/EN/dsarka/
Dejan Sarka
2007-11-03 08:31:33 UTC
Permalink
Post by light_wt
is there a step by step guide on build and register the assembly? thanks.
Yes - take a look at the "Creating Stored Procedures (Analysis Services)"
chapter in BOL (http://msdn2.microsoft.com/en-us/library/ms175340.aspx).
--
Dejan Sarka
http://blogs.solidq.com/EN/dsarka/
light_wt
2007-11-08 22:37:02 UTC
Permalink
thanks,

i'll try it. :)

Continue reading on narkive:
Loading...