Re: SQL Error 4060, SQL State 1
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Sat, 17 Jan 2009 08:22:33 -0800
Chris Hough (sales@xxxxxxxxxxx) writes:
My problem is I fail to connect to the database on the workstation
running the 2005 Express. The security group defined on the W2003 Server
shows up from the SQL 2005 Management studio, and I used the same stored
procedure to grant all rights necessary to that group on the database on
the 2005 Express, but everytime I try and connect from my application, I
get the same error, 4060 State 1.
Error 4060 is "Cannot open database "%.*ls" requested by the login. The
login failed."
This would indicate that the database you are trying to connect to does
not exist, or that the login you are using to not map to a user in that
database.
So the first thing would be to check that you have spelled the database
name correctly. It can be a good idea to change the connection to use "sa"
or somesuch for the test, just to exclude that you are not victim to a
blindness that happen to everyone.
Once that been done, you need to examine the credentials a little closer.
If I understand you correctly, you have granted database access to a
Windows group, and you are using integrated security. But did you also
grant access to SQL Server to this group? The login might be able to
enter SQL Server by some other group belonging.
Run SELECTs on sys.server_principals and sys.databases_principals in the
troublesome database.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: SQL Error 4060, SQL State 1
- From: bass_player
- Re: SQL Error 4060, SQL State 1
- References:
- SQL Error 4060, SQL State 1
- From: Chris Hough
- SQL Error 4060, SQL State 1
- Prev by Date: SQL Error 4060, SQL State 1
- Next by Date: Re: "<MachineName>\ASPNET Account" and "NT Authority\Syst
- Previous by thread: SQL Error 4060, SQL State 1
- Next by thread: Re: SQL Error 4060, SQL State 1
- Index(es):
Relevant Pages
|