Wednesday, March 7, 2012

Connecting to a local cube using Server.Connect(strStringConnection) method of AMO

I am trying to connect to a local cube using Server.Connect(strStringConnection) method of AMO

strConnectString = "Data Source=MyPath\LocalcubeName.cub"

Server.Connect(strStringConnection)

The result:

Message"The MyPath\LocalcubeName.cub' local cube file cannot be opened."String

StackTrace"at Microsoft.AnalysisServices.LocalCubeStream..ctor(String cubeFile, MSMDLOCAL_OPEN_FLAGS settings, Int32 timeout, String password)

at Microsoft.AnalysisServices.XmlaClient.OpenLocalCubeConnection(ConnectionInfo connectionInfo)

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

Is there any other way to connect to a local cube using AMO?

Thanks.

Sorry Yones but your schenario is not going to work. AMO is only supported when running against Analysis Server and not with local cube files.

Use Create Global cube state to create local cube files.
http://msdn2.microsoft.com/en-us/library/ms145581.aspx
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/anserddl.mspx

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment