Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / SQL Server Tools / September 2008

Tip: Looking for answers? Try searching our database.

SQL Server Management Studio 2008 Express failed to retrieve data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alberto - 12 Sep 2008 17:43 GMT
Failed to retrieve data for this request.
(Microsoft.SqlServer.Management.Sdk.Sfc)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
Server user 'name_user' is not a valid user in database 'winper_db'.
(Microsoft SQL Server, Error: 916)
Erland Sommarskog - 12 Sep 2008 22:08 GMT
> Failed to retrieve data for this request.
> (Microsoft.SqlServer.Management.Sdk.Sfc)
[quoted text clipped - 3 lines]
> Server user 'name_user' is not a valid user in database 'winper_db'.
> (Microsoft SQL Server, Error: 916)

And the question is? The error message is fairly clear. Do you have reason
to expect to be able to access winper_db?

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Alberto - 12 Sep 2008 23:50 GMT
Erlan, this error message is displayed only when i connet to sql server 2000
(version 8.0.760), why ?

> > Failed to retrieve data for this request.
> > (Microsoft.SqlServer.Management.Sdk.Sfc)
[quoted text clipped - 6 lines]
> And the question is? The error message is fairly clear. Do you have reason
> to expect to be able to access winper_db?
Tibor Karaszi - 13 Sep 2008 08:58 GMT
It seems that the login you use has a default database winper_db, but the login doesn't exist as a
user in that database.
Signature

Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi

> Erlan, this error message is displayed only when i connet to sql server 2000
> (version 8.0.760), why ?
[quoted text clipped - 9 lines]
>> And the question is? The error message is fairly clear. Do you have reason
>> to expect to be able to access winper_db?
Bob - 14 Sep 2008 22:05 GMT
> It seems that the login you use has a default database winper_db, but the
> login doesn't exist as a user in that database.

I have tried to connect to remote SQL SERVER 2005 (my default db set in
options) but I get a wrong db permission error (it tries to connect to a
different one than my default) and am unable to browse the db in the object
explorer. I am able to make query to my default db which it seems to find
just fine according to what I specified under connection properties.
Erland Sommarskog - 14 Sep 2008 23:12 GMT
> I have tried to connect to remote SQL SERVER 2005 (my default db set in
> options) but I get a wrong db permission error (it tries to connect to a
> different one than my default) and am unable to browse the db in the
> object explorer. I am able to make query to my default db which it seems
> to find just fine according to what I specified under connection
> properties.

I don't really follow what you are doing. It could help if you could
describe in a little more detail what you are doing and what error you
get and when. Also, you are not the same person as Alberto who started the
thread, are you?

One thing is worth pointing out: you talk about your default db set in
options. I'm not really sure what options you are talking about, but I guess
it's something in Mgmt Studio. When Tibor talks about a default db, he
talks about a setting for your login that is stored in SQL Server. This
is the database you end up in, if you do not specify a database when you
connect. In many cases, this is the master database.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Terry - 24 Sep 2008 13:20 GMT
> I don't really follow what you are doing.

Really?  I could not tell with your arrogant first answer.  The problem is
using Management Studio Express (in my case 2008) accessing a server (in my
case it is 2005 server).  It connects fine to the server but when you goto
the Databases folder list, you get the error from trying to get the list of
databases.  Mgt Studio 2005 gets the list fine but you could only access your
database, which is fine but in 2008 you get that error on the list of
databases so you cant browse to your database.  

So it seems that when requesting the list of databases that it is trying to
access each one and on the first one you do not have access to it throws the
error.  Not sure why it is trying to access each one, I do not want it too or
need it too.

And like Alberto mentioned, in the connection properties the default
database is set to the one I want connected which I am the owner of.
Roy Harvey (SQL Server MVP) - 24 Sep 2008 13:44 GMT
>The problem is
>using Management Studio Express (in my case 2008) accessing a server (in my
[quoted text clipped - 8 lines]
>error.  Not sure why it is trying to access each one, I do not want it too or
>need it too.

This may be a problem that Aaron Bertrand has written about.

http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-s
tudio-oops.aspx


Roy Harvey
Beacon Falls, CT
Terry - 24 Sep 2008 18:34 GMT
Roy, thank you very much for a positive response that addresses the problem.

Reading that article that is exactly what is going on.  I almost even messed
with Colatation but had to run.  Will try it this evening.

Thanks again and if someone the "answer" mark can be changed, Roy's response
should get it.

~Terry

> This may be a problem that Aaron Bertrand has written about.
>
> http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-s
tudio-oops.aspx

>
> Roy Harvey
> Beacon Falls, CT
Erland Sommarskog - 24 Sep 2008 23:31 GMT
>> I don't really follow what you are doing.
>
[quoted text clipped - 5 lines]
> only access your database, which is fine but in 2008 you get that error
> on the list of databases so you cant browse to your database.  

I'm sorry if you found my answer arrogant, but sometimes it's quite
frustrating to answer questions in these forums, because the posts
are quite unclear, and there are several possible options of what
could be wrong.

Yours was very clear, particularly when you say that it happens with
SSMS 2008 only.

The bug is really bad. What is really crazy is that Enterprise Manager
in SQL 2000 had the same behaviour. Well, you did not get an error,
but it still tried access all databases (to see if you had access).
And this is a pain on a server with a lot of databases in autoclose.
It's really incredible that they walked into that trap again.

> Not sure why it is trying to access each one, I do not want it too or
> need it too.

If you press F7 to get the Object Explorer Details, you will find the
reason why. Well, almost. Anyway, the information listed there is
mainly taken from sys.databases, but some information is not available
if the database has been shutdown, because it's set to autoclose.
So SSMS access the databases to get that infomation. Which of course
is a very bad idea for several reasons.

> And like Alberto mentioned, in the connection properties the default
> database is set to the one I want connected which I am the owner of.

I guess you are using a hosting service, and maybe in that context
it makes sense. But keep in mind that a lot of people logs into
SSMS as admins, and have no special connection properties set up.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2012 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.