Re: SQL Error 4060, SQL State 1



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

.



Relevant Pages

  • RE: Backups have Shadow Copy Problems
    ... and restarted the server. ... suggested and changed the recovery model to simple on the one database called ... I understand the issue to be: the backup task failed ... You back up data from a volume that contains a Microsoft SQL Server ...
    (microsoft.public.windows.server.sbs)
  • Re: upsizing to sql 2005
    ... the word SERVER in it, ... You can access to the database by multiple means (Access, ... and how does it update the SQL database with the new records in Access? ... Query Name: Arcadia - ARC ...
    (microsoft.public.access.queries)
  • Re: Linked Tables in Access
    ... any use of SQL Passthru, Linked Tables or any other use of MDB / MDE ... server, or would I also need to convert *those* queries to passthrough ... I've been trying to understand why Access database files become corrupt. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Leveling by ID vs. "Standard"
    ... of this trade called Project Management. ... a database for the "Project Tables," ... to write reports on data from the server database. ... product supporting queries created with SQL. ...
    (microsoft.public.project)
  • Re: Trouble Getting VS.Net 2003 WalkThroughs MSDE Connection
    ... Config Tool of SQL Server? ... > link to download the PUBs database. ... >>> Setup and they directed me to install MSDE and they attached a ...
    (microsoft.public.sqlserver.msde)