Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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

This question derives from Deploying a new database on a new server, an msbuild ssdt rookie issue.

Since I have a permission denied error, I expect to find which user is failing to access so I can grant it.

Is there a place in the Event Viewer (Windows 7) where I can look for it?

share|improve this question

You need to look in SQL Server's error log, which is kind of a catch-22, since you need access to the SQL Server in order to see the error log.

enter image description here

enter image description here

You don't need direct access to SQL Server to read the log; if you have physical access to the machine, you can find the log in something like:

C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Log\ERRORLOG

Right-click, open with Notepad, and scroll to the bottom, you'll see things like:

2013-05-23 16:34:56.29 Logon Error: 18456, Severity: 14, State: 5.
2013-05-23 16:34:56.29 Logon Login failed for user 'whatever'. Reason: Could not find a login matching the name provided. [CLIENT: ]

This is, of course, for security purposes. Similar to the reason why these details are not revealed to the end user when they hit the login failure.

share|improve this answer

You can also look in the windows event log, under Application. It will often provide additional depth to the SQL Server error log and can give specific drive/folder information on what was denied. If you don't have administrative tools installed here is how to add them Display Administrative tools Windows 7

share|improve this answer

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.