Link to home
Start Free TrialLog in
Avatar of TSRich02
TSRich02

asked on

MS SQL 2005 Express Erro 18456

Hello,

When users visit our website in which cases the database to be queried we notice that the user gets a failure.  From our review of the Windows Event log it appears that the NT AUTHORITY\Network Service login fails.  Shortly after it fails it is able to login once again.  In looking at SQL log below is what we see:

2009-01-08 10:51:11.51 Logon       Error: 18456, Severity: 14, State: 16.
2009-01-08 10:51:11.51 Logon       Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. [CLIENT: <local machine>]
2009-01-08 10:52:07.96 Logon       Login succeeded for user 'NT AUTHORITY\NETWORK SERVICE'. Connection: trusted. [CLIENT: <local machine>]
2009-01-08 10:52:07.96 Logon       Error: 18456, Severity: 14, State: 16.
2009-01-08 10:52:07.96 Logon       Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. [CLIENT: <local machine>]
2009-01-08 10:52:16.42 Logon       Login succeeded for user 'NT AUTHORITY\NETWORK SERVICE'. Connection: trusted. [CLIENT: <local machine>]
2009-01-08 10:52:16.42 Logon       Error: 18456, Severity: 14, State: 16.

From what I find on the web it appears that the database is incorrect.  However, once we reboot the system everything works without a problem.  
ASKER CERTIFIED SOLUTION
Avatar of andy232
andy232
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TSRich02
TSRich02

ASKER

Is there a problem with running NT AUTHORITY\NETWORK SERVICE as user?  How could a password problem occur when this user is a system based account.  
I believe so.  I always recommend creating a specific user account to be used by SQL Server and Agent.  Makes life a lot easier, especially when that server has to access resources on other domains.

SQL and Windows have to communicate password changes.  

Here's the MSDN article saying why you shouldn't do this if you need to convince someone:

http://msdn.microsoft.com/en-us/library/ms143170(SQL.90).aspx
This server is not used in a domain.  We have this on our web server only and that is blocked from our internal network.  We do maintain another box that does connect to SQL to get backups for off site storage.
After reviewing the article I am understanding it is best to use a local system account compared to the LOCAL Service accounts (NT Authority\Network Service in this case).  

Would this be the cause of why at first the system fails to connect and then is able to connect on the next attempt?  

I am not sure how this explains why at first the login fails but the next one works.  Doesn't state 16 refer to the database being offline or not accessible?
http://msdn.microsoft.com/en-us/library/ms164086.aspx

According to this, it means "Indicate errors that can be corrected by the user."
That article was not very helpful (I know this is not your fault).  I guess my confusion still comes in as to why it doesn't work at first attempt but does after it tries again.
http://msdn.microsoft.com/en-us/library/ms684272(VS.85).aspx

According to this, the account does not actually have a password.  It also has minimal security.   When a workstation is locked, sometimes it takes two CTRL+ALT+DEL logons and password entries to log on to a PC.  Maybe a similar situation is going on here, where the second time a password is actually required, hence the failure.
I believe you maybe correct with that assessment.  Thanks andy232 for your help on this issue.