Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

When running

FROM 'S:\SourceCode\TryUDF\bin\Debug\TryUDF.dll'

an error is returned:

Could not find file 'SqlAccess.dll' in directory 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\'.

The assembly is a class library built with VS2008. SQL Server is 2005. SqlAcesss.dll exists in the above location, and that Binn directory is in the PATH environment variable for the system. How can I diagnose what is causing this problem?

share|improve this question
Someone replied suggesting restarting the server. That has been tried and no change. – Robert Kerr Feb 17 '11 at 15:46

If it was built with VS2008 check to see if the references to SQL objects in the project are using SQL 2008 libraries. That could be your problem. You might need to recompile your library against SQL 2005 libraries.

share|improve this answer
No SQL Server 200x references at all. The data references are System.Data, System.Data.DataSetExtensions. The other references are System, System.Core, System.Xml, System.Xml.Linq (which I could probably remove the latter two). – Robert Kerr Feb 17 '11 at 16:10

I can't find the article right now but I'm pretty sure it's related to the DLL not being signed or the TRUSTWORTHY setting on the SQL Server. The error says file not found but it actually means it wasn't able to load it (not the same thing!).

I'd suggest re-asking on if you don't get it sorted.

share|improve this answer
up vote 0 down vote accepted

Solved. Since I had followed procedures suggested by Microsoft Baseline Security Analyzer to secure the SQL Server, possibly incompletely or incorrectly, the SQL Server service account did not have permissions as required to the folder where sqlaccess.dll exists. Immediately upon granting permissions (read, execute, list), the error went away.

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.