dbTalk Databases Forums  

Problem connecting with ADOMD.NET

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Problem connecting with ADOMD.NET in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Terry Smith
 
Posts: n/a

Default Problem connecting with ADOMD.NET - 12-20-2005 , 05:43 PM






I've been unable to connect using an AdomdConnection. I've tried different
changes to the connection string and still get an error that says, "Either
the user, TSMITH\Terry Smith, does not have access to the AdventureWorksDW
database, or the database does not exist.". The database does exist, and my
account is a member of the DB. I can also browse cubes with BI Studio. I set
my account in the DB to db_Owner thinking it was a security problem and still
can't connect. Any suggestions please?

Here's some sample code:

Dim connection As New AdomdConnection("Provider=SQLNCLI.1;Data
Source=localhost;Initial Catalog=AdventureWorksDW;Integrated Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
connection.Close()
connection.Dispose()

It blows up on Cubes.Count.

Thanks.

Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Problem connecting with ADOMD.NET - 12-21-2005 , 03:55 AM






AdventureWorksDW is a relational database, the sample OLAP database is
called Adventure Works. Also you would want to use the msolap provided
to access the cubes, not the relational SQL Server driver.

Note you will need to be set up as an administrator or under role in the
OLAP database. Once the OLAP database is processed it does not need to
access the AdventureWorksDW database, so it will not matter what your
rights are there.

Try the following:

Dim connection As New AdomdConnection("Provider=msolap.3;Data
Source=localhost;Initial Catalog=Adventure Works;Integrated
Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
connection.Close()
connection.Dispose()

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <2E438033-008C-4924-8C0A-2107472FFBD2 (AT) microsoft (DOT) com>, "=?Utf-
8?B?VGVycnkgU21pdGg=?=" <Terry Smith (AT) discussions (DOT) microsoft.com> says...
Quote:
I've been unable to connect using an AdomdConnection. I've tried different
changes to the connection string and still get an error that says, "Either
the user, TSMITH\Terry Smith, does not have access to the AdventureWorksDW
database, or the database does not exist.". The database does exist, and my
account is a member of the DB. I can also browse cubes with BI Studio. I set
my account in the DB to db_Owner thinking it was a security problem and still
can't connect. Any suggestions please?

Here's some sample code:

Dim connection As New AdomdConnection("Provider=SQLNCLI.1;Data
Source=localhost;Initial Catalog=AdventureWorksDW;Integrated Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
connection.Close()
connection.Dispose()

It blows up on Cubes.Count.

Thanks.


Reply With Quote
  #3  
Old   
Terry Smith
 
Posts: n/a

Default Re: Problem connecting with ADOMD.NET - 12-21-2005 , 09:15 AM



Thanks for your response, but I still have the problem. I've tried
AdventureWorksDW and AdventureWorks. (Some the examples online use
AdventureWorksDW instead of AdventureWorks by the way.) I tried changing the
provider as well as making myself db_Owner on the AdventureWorks database and
still get the same error. What else could it be?



"Darren Gosbell" wrote:

Quote:
AdventureWorksDW is a relational database, the sample OLAP database is
called Adventure Works. Also you would want to use the msolap provided
to access the cubes, not the relational SQL Server driver.

Note you will need to be set up as an administrator or under role in the
OLAP database. Once the OLAP database is processed it does not need to
access the AdventureWorksDW database, so it will not matter what your
rights are there.

Try the following:

Dim connection As New AdomdConnection("Provider=msolap.3;Data
Source=localhost;Initial Catalog=Adventure Works;Integrated
Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
connection.Close()
connection.Dispose()

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <2E438033-008C-4924-8C0A-2107472FFBD2 (AT) microsoft (DOT) com>, "=?Utf-
8?B?VGVycnkgU21pdGg=?=" <Terry Smith (AT) discussions (DOT) microsoft.com> says...
I've been unable to connect using an AdomdConnection. I've tried different
changes to the connection string and still get an error that says, "Either
the user, TSMITH\Terry Smith, does not have access to the AdventureWorksDW
database, or the database does not exist.". The database does exist, and my
account is a member of the DB. I can also browse cubes with BI Studio. I set
my account in the DB to db_Owner thinking it was a security problem and still
can't connect. Any suggestions please?

Here's some sample code:

Dim connection As New AdomdConnection("Provider=SQLNCLI.1;Data
Source=localhost;Initial Catalog=AdventureWorksDW;Integrated Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
connection.Close()
connection.Dispose()

It blows up on Cubes.Count.

Thanks.



Reply With Quote
  #4  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Problem connecting with ADOMD.NET - 12-22-2005 , 04:03 AM



Sorry, it looks like I got the cube name and database name reversed, you
will need to connect to "Adventure Works DW" (with the spaces in the
name). "AdventureWorks" and "AdventureWorksDW" are both relational SQL
Server databases.

Note that Analysis Services is a completely different server to the
relational SQL server, db_owner is a relational security role and will
have no effect in Analysis Services. Analysis Services maps all its
roles to Windows Users so if you are local admin you should not have any
problems accessing the cubes.

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <355C7091-8EAD-42B6-A459-D1C49E0C3EDD (AT) microsoft (DOT) com>,
TerrySmith (AT) discussions (DOT) microsoft.com says...
Quote:
Thanks for your response, but I still have the problem. I've tried
AdventureWorksDW and AdventureWorks. (Some the examples online use
AdventureWorksDW instead of AdventureWorks by the way.) I tried changing the
provider as well as making myself db_Owner on the AdventureWorks database and
still get the same error. What else could it be?



"Darren Gosbell" wrote:

AdventureWorksDW is a relational database, the sample OLAP database is
called Adventure Works. Also you would want to use the msolap provided
to access the cubes, not the relational SQL Server driver.

Note you will need to be set up as an administrator or under role in the
OLAP database. Once the OLAP database is processed it does not need to
access the AdventureWorksDW database, so it will not matter what your
rights are there.

Try the following:

Dim connection As New AdomdConnection("Provider=msolap.3;Data
Source=localhost;Initial Catalog=Adventure Works;Integrated
Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
connection.Close()
connection.Dispose()

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <2E438033-008C-4924-8C0A-2107472FFBD2 (AT) microsoft (DOT) com>, "=?Utf-
8?B?VGVycnkgU21pdGg=?=" <Terry Smith (AT) discussions (DOT) microsoft.com> says...
I've been unable to connect using an AdomdConnection. I've tried different
changes to the connection string and still get an error that says, "Either
the user, TSMITH\Terry Smith, does not have access to the AdventureWorksDW
database, or the database does not exist.". The database does exist, and my
account is a member of the DB. I can also browse cubes with BI Studio. I set
my account in the DB to db_Owner thinking it was a security problem and still
can't connect. Any suggestions please?

Here's some sample code:

Dim connection As New AdomdConnection("Provider=SQLNCLI.1;Data
Source=localhost;Initial Catalog=AdventureWorksDW;Integrated Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.