|
Home > Archive > MS SQL Server OLAP > December 2005 > Problem connecting with ADOMD.NET
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Problem connecting with ADOMD.NET
|
|
| Terry Smith 2005-12-20, 8:25 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;Ini
tial Catalog=AdventureWor
ksDW;Integrated Security=SSPI")
connection.Open()
Dim cubeCount As Integer = connection.Cubes.Count
connection.Close()
connection.Dispose()
It blows up on Cubes.Count.
Thanks.
| |
| Darren Gosbell 2005-12-21, 7:23 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;Ini
tial 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@microso
ft.com>, "=?Utf-
8?B?VGVycnkgU21pdGg=?=" <Terry Smith@discussions.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;Ini
tial Catalog=AdventureWor
ksDW;Integrated Security=SSPI")
> connection.Open()
> Dim cubeCount As Integer = connection.Cubes.Count
> connection.Close()
> connection.Dispose()
>
> It blows up on Cubes.Count.
>
> Thanks.
>
| |
| Terry Smith 2005-12-21, 9:23 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:
> 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;Ini
tial 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@microso
ft.com>, "=?Utf-
> 8?B?VGVycnkgU21pdGg=?=" <Terry Smith@discussions.microsoft.com> says...
>
| |
| Darren Gosbell 2005-12-22, 7:23 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@microso
ft.com>,
TerrySmith@discussio
ns.microsoft.com says...[color=darkred]
> 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:
>
--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
|
|
|
|
|