Showing posts with label cubes. Show all posts
Showing posts with label cubes. Show all posts

Monday, March 19, 2012

Connecting to local cube created from AS 2000 and AS 2005 cubes using ADOMD.NET 9.0

Hello,

I created two local cubes, first one: from an AS 2000 cube and the second one from an AS 2005 cube. Then I tried to connect to them using the following code:

' AS 2000

Dim strDataSource As String = "MyFolderPath\AS2000LocalCube.cub"

Dim strDatabase As String = "AS2000LocalCubeName"

' AS 20005

'Dim strDataSource As String = "MyFolderPath\AS2005LocalCube.cub"

'Dim strDatabase As String = "AS2005LocalCubeName"

strConnectString ="Provider=MSOLAP;Data Source=" & strDataSource &";Catalog=" & strDatabase &";MDX Compatibility=2;"

Dim clConnectionAsNew AdomdConnection

clConnection.ConnectionString = strConnectString

clConnection.Open()

It works properly for AS 2000 local cube but for AS 20005 local cube, it return the following exception:

InnerException{"The 'MyFolderPath\AS2005LocalCube.cub' local cube file cannot be opened."}System.Exception

Message"A connection cannot be made. Ensure that the server is running."String

Source"Microsoft.AnalysisServices.AdomdClient"String

StackTrace"at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.ConnectXmla()

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()

Both local cubes were created using the same MDX query.

Abdel

Can you connect to the AS2005 local cube using OLEDB. Excel and the MDX Sample app both use OLEDB, so try one of these.

Try getting rid of MDX Compatibility=2... shouldn't matter.

How did you create the local cube?

|||

Yes I am able to connect using MDX Sample App and Excel 2003.

But for AS 2005 local cube and using Excel 2003, if you are already connected to the file using MDX Sample App, the following message is returned: “AS2005LocalCube.cub’ cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding”.

I create the local cube with the following MDX query:

CREATE GLOBAL CUBE [AS2005LocalCube]

STORAGE 'MyFolderPath\AS2005LocalCube.cub'

FROM [2005SQLServerCube] (

MEASURE [2005SQLServerCube].[Value1],

MEASURE [2005SQLServerCube].[Value1_Footnote1] HIDDEN ,

MEASURE [2005SQLServerCube].[Value1_Footnote2] HIDDEN ,

MEASURE [2005SQLServerCube].[Value2],

DIMENSION [2005SQLServerCube].[GenderDim].[Genders] (

LEVEL [(All)], LEVEL [Genders]

),

DIMENSION [2005SQLServerCube].[ProductDim].[Products] (

LEVEL [(All)], LEVEL [Products]

)

)

|||In AS2005 only one process at a time can open local cube file. This is why if you are already connected in Excel - you won't be able to connect from MDX Sample App.

Connecting to local cube created from AS 2000 and AS 2005 cubes using ADOMD.NET 9.0

Hello,

I created two local cubes, first one: from an AS 2000 cube and the second one from an AS 2005 cube. Then I tried to connect to them using the following code:

' AS 2000

Dim strDataSource As String = "MyFolderPath\AS2000LocalCube.cub"

Dim strDatabase As String = "AS2000LocalCubeName"

' AS 20005

'Dim strDataSource As String = "MyFolderPath\AS2005LocalCube.cub"

'Dim strDatabase As String = "AS2005LocalCubeName"

strConnectString = "Provider=MSOLAP;Data Source=" & strDataSource & ";Catalog=" & strDatabase & ";MDX Compatibility=2;"

Dim clConnection As New AdomdConnection

clConnection.ConnectionString = strConnectString

clConnection.Open()

It works properly for AS 2000 local cube but for AS 20005 local cube, it return the following exception:

InnerException{"The 'MyFolderPath\AS2005LocalCube.cub' local cube file cannot be opened."}System.Exception

Message"A connection cannot be made. Ensure that the server is running."String

Source"Microsoft.AnalysisServices.AdomdClient"String

StackTrace"at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.ConnectXmla()

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()

Both local cubes were created using the same MDX query.

Abdel

Can you connect to the AS2005 local cube using OLEDB. Excel and the MDX Sample app both use OLEDB, so try one of these.

Try getting rid of MDX Compatibility=2... shouldn't matter.

How did you create the local cube?

|||

Yes I am able to connect using MDX Sample App and Excel 2003.

But for AS 2005 local cube and using Excel 2003, if you are already connected to the file using MDX Sample App, the following message is returned: “AS2005LocalCube.cub’ cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding”.

I create the local cube with the following MDX query:

CREATE GLOBAL CUBE [AS2005LocalCube]

STORAGE 'MyFolderPath\AS2005LocalCube.cub'

FROM [2005SQLServerCube] (

MEASURE [2005SQLServerCube].[Value1],

MEASURE [2005SQLServerCube].[Value1_Footnote1] HIDDEN ,

MEASURE [2005SQLServerCube].[Value1_Footnote2] HIDDEN ,

MEASURE [2005SQLServerCube].[Value2],

DIMENSION [2005SQLServerCube].[GenderDim].[Genders] (

LEVEL [(All)], LEVEL [Genders]

),

DIMENSION [2005SQLServerCube].[ProductDim].[Products] (

LEVEL [(All)], LEVEL [Products]

)

)

|||In AS2005 only one process at a time can open local cube file. This is why if you are already connected in Excel - you won't be able to connect from MDX Sample App.

Thursday, March 8, 2012

Connecting to Analysis Services cubes from Reporting Services

Hi,
I have created cubes using Analysis Services. Could I please know how to create a data source to connect to those cubes in Reporting Services to generate reports out of them. When I choose to create a data source in Reporting Services, I am able to see options only to connect to Sql Server, ODBC and Oracle. I do not see an option like 'OLAP Services' to connect to cubes in Analysis Services. I would be happy if anyone could help by giving me the steps to connect to the cubes in Analysis Services and to generate report/pivot table out of it.
Thanks,
Raj.Information on the integration of Reporting Services (RS) 2000 and Analysis
Services (AS) 2000 is provided at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/olapasandrs.asp
It describes how to connect to AS 2000 cubes and use multidimensional data
in RS 2000. The data provider is OleDB provider for OLAP 8.0.
You might also want to check out some samples on parameterized MDX available
for download:
http://www.microsoft.com/downloads/details.aspx?FamilyID=f9b6e945-1f4c-4b7c-9c83-c6801f0576ff&DisplayLang=en
Note: The upcoming SQL 2005 Beta 2 will contain graphical MDX and DMX query
designers, which will work best against AS 2005 cubes, but they also support
AS 2000 cubes.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Raj" <Raj@.discussions.microsoft.com> wrote in message
news:66825BE3-5342-4C34-AD06-589B73491B01@.microsoft.com...
> Hi,
> I have created cubes using Analysis Services. Could I please know how to
create a data source to connect to those cubes in Reporting Services to
generate reports out of them. When I choose to create a data source in
Reporting Services, I am able to see options only to connect to Sql Server,
ODBC and Oracle. I do not see an option like 'OLAP Services' to connect to
cubes in Analysis Services. I would be happy if anyone could help by giving
me the steps to connect to the cubes in Analysis Services and to generate
report/pivot table out of it.
> Thanks,
> Raj.