Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Alright, I have a classic asp application and I have a connection string to try to connect to db.

MY connection string looks as follows:

 Provider=SQLOLEDB;Data Source=MYPC\MSSQLSERVER;Initial
 Catalog=mydb;database=mydb;User Id=me;Password=123

Now when I'm accessing db though front-en I get this error:

Microsoft OLE DB Provider for SQL Server error '80040e4d'
Login failed for user 'me'. 

I looked in the sql profiler and I got this:

 Login failed for user 'me'.  Reason: Password did not match that
 for the login provided. [CLIENT: <named pipe>]
 Error: 18456, State:8. 

What I've tried:

  1. checked 100 times that my password is actually correct.
  2. Tried this: alter login me with check_policy off (Do not even know why I did this)
  3. Enable ALL possible permissions for this account in SSMS.
  4. I've tried this connection string: Provider=SQLOLEDB;Data Source=MYPC\MSSQLSERVER;Initial Catalog=mydb;database=mydb; Integrated Security = SSPI

And I got this error:

  Microsoft OLE DB Provider for SQL Server error '80004005' Cannot open database mydb requested by the login. The login failed.
share|improve this question

I think you will need to enable Named Pipes in Configuration Manager and restart the services. Also start the SQL Browser service.

share|improve this answer
I did this. Still the same error. SQL Browser was on, but I enabled named pipes and restarted PC. – user194076 Oct 19 '11 at 17:51
is this a restored database? sometimes you get user accounts at both a server level and a database level, leading to a password mismatch. Normally you can delete the database-level one and re-map permissions at for the server-level user. – BoyMars Oct 20 '11 at 7:24
Hm. But I'm using new account specifically for my local DB. – user194076 Oct 20 '11 at 16:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.