Showing posts with label cube. Show all posts
Showing posts with label cube. 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 on different domain

Does anyone know how I can connecting to an analysis services cube that
is located on a different server/domain than the one I am developing
the report on.
I am able to remote connect to the server and process the cube, however
I don't know how to create a connection to the cube.
I am woring on the corp domain and the cube is located on the corp2
domain, server name cr2rchmiis10.
Thanks in advance for any help.
John CCan you set up a SQL linked server on a SQL server in the corp domain
that connects to the AS in the corp2 domain?
If you can get the linked server set up across domains, you can run
your query against the linked server in the corp domain.|||If you are using Analysis Services ENTERPRISE edition, you can connect to
Analysis Services through Http, and that would probably solve your problem.
If you are using AS Standard edition, you need to do something else. (Like
Potter suggested.)
With Analysis Services 2005 Enterprise edition
http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx
With ANalysis Services 2000 Enterprise edition:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/olapdmad/aghtconfig_4giq.asp
Kaisa
<john.r.carter@.bankofamerica.com> wrote in message
news:1135094407.938804.228280@.g14g2000cwa.googlegroups.com...
> Does anyone know how I can connecting to an analysis services cube that
> is located on a different server/domain than the one I am developing
> the report on.
> I am able to remote connect to the server and process the cube, however
> I don't know how to create a connection to the cube.
> I am woring on the corp domain and the cube is located on the corp2
> domain, server name cr2rchmiis10.
> Thanks in advance for any help.
> John C
>

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.

Friday, February 17, 2012

Connecting a Cube from Excel 2007

Hi,

i am working with a XP-Client and try to connect to a WinServer2003, (SP2, AS2005) to access an AS2005-cube by Excel 2007. Creating a new connection, i can choose either connect via windows authentification or by entering a user/PW.

The first way (windows authentification) always works fine, but when i try to connect through an sql user, i run on an error at last. The connection works fine, i can select the desired cube but after the last "OK"-Button i get an error message like "Initialization of Data source failed".

the sql user should have admin right on the server.

Do i make sth. wrong?

SQL Server 2005 Analyisis Services Supports only Windows Authentication. (SQL Authentication is only possible if you connect to the SQL Server 2005 Database Engine)

So the username and password you want to enter must be a valid windows nt user with permission on the analysis services database. (check save password otherwise you get errors in excel)

HANNES

Tuesday, February 14, 2012

Connect to SSAS from SQL Management Studio

I'm trying to connect to an SSAS 2005 cube from my XP SP2 workstation. This is at a client's site & my workstation is not connected to their domain but they have given me a domain account & password that has access to the cube. My colleagues who are also running XP SP2 are able to browse to a UNC path on the SSAS server then when prompted enter the account & password. Then they go into SQL Management Studio to create a connection to the SSAS machine. But I can't locate anything different between our configurations. I'm also running Windows OneCare so I'm not sure if that may be the problem. Can you offer any suggestion please?

The trick with opening UNC share, entering credentials and then connecting to SSAS only works with NTLM authentication. Please make sure you are not on Kerberos. Also, it is important that you document the exact steps you do and exact outcomes (i.e. error messages if any etc) in order for the forum to help you.|||

I wasn't aware of that trick you mentioned. I would suggest one of the following:

1. Create yourself a shortcut with the following path:
C:\WINDOWS\SYSTEM32\RUNAS.EXE /net /user:TheirDomain\UserName "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe"
That will launch Mgmt Studio under the credentials of the right domain account (not the account you've logged onto your laptop). Then you should be able to connect to SSAS on their server.

2. An alternative is if they've got Microsoft VPN, if you VPN to their network, then you don't have to bother with the runas command. (This appears to work when using Microsoft VPN, but not Cisco VPN, for example.)