I'm developing an ASP.NET MVC3 web app, which connects to a SQL Server 2008 R2 database.
Everything was working fine, until I started getting this error:
The database myDb is not accessible. (ObjectExplorer)
This issue appears also when I try and browse the database in SQL Server Management Studio. It seems I have somehow lost permission to access my database? I can browse other databases just fine.
I am using mixed mode authentication (up until now Windows Authentication has been working fine). If I login as sa
I get the same error.
How can I give the required permissions back to my user account, if I cannot access the database?
What sort of things might have caused this to happen in the first place?
The only changes I have made recently have not been database related at all, I'm struggling to figure out what has caused this.
Update Well, after restarting my computer, it all started working again :/ I didn't change anything, hadn't read the replies here yet. Very odd!