Search code examples
umbracosql-server-2008-express

Cannot open database "UmbracoDB.myDB" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'


I am receiving the following error: Cannot open database "UmbracoDB.myDB" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Previously to this error everything was running fine. My database is running as a user instance as described at http://our.umbraco.org/wiki/install-and-setup/using-umbraco-with-embeded-sql-database-(sqlexpress-user-instance). What seemed to cause this issue was attaching the DB to SQL Server Studio Express and then unattaching it again (I was resetting the umbraco admin password). Nothing was changed or is different (That I am aware of).

I presume this is some kind of authentication error or database owner error. I have tried adding the user as described at http://blog.sqlauthority.com/2009/08/20/sql-server-fix-error-cannot-open-database-requested-by-the-login-the-login-failed-login-failed-for-user-nt-authoritynetwork-service/ but it did not work for me. I have also tried a few other things that failed with user names/owners, but I am a bit of a noob. :|

I am running windows 2008, Sql Server 2008 Express, the database is for Umbraco CMS.

Thank you for any ideas on how to solve this problem.


Solution

  • What I did to solve this error was go to windows explorer, find the database, right click->properties->security tab->click edit

    Then add network services with full control.

    What threw me initially was I was trying to add NT AUTHORITY\NETWORK SERVICE and it wasn't finding it. I had to type network service and click search. Yeah, I'm a noob man.

    Doing it inside SQL Server Management Studio didn't do anything for me.

    Thank you all who read and tried to help with this post and I hope one day this will help someone.