Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The error I'm receiving:

CREATE ASSEMBLY failed because it could not open the physical file "\\<server>\<folder>\<assembly>.dll": 5(Access is denied.).


exec sp_configure 'clr enabled', 1
create assembly <assemblyname> from '\\<server>\<folder>\<assembly>.dll'
with permission_set = safe

How can I create an assembly from a unc path?

share|improve this question
You might get better results if you include details about the software you're using in your question. –  Ernie Apr 5 '11 at 17:40
@Ernie The info's in the tags. –  squillman Apr 5 '11 at 17:44

1 Answer 1

If you are logged into SQL Server with a Windows login, make sure your login has access to the share and the file. If you are logged in using a SQL login, make sure the account that SQL Server is running as has access to the share and the file. Access must be at least read in order to create the assembly in SQL.

share|improve this answer
Connecting using Windows login. I set read/write permissions on the shared folder and read/write permissions on the file itself, but still getting access denied. –  mjw06d Apr 5 '11 at 18:03
@mjw06d Does your assembly include references to any other assemblies that are (or are getting) loaded into SQL or is it a complete standalone assembly? –  squillman Apr 5 '11 at 18:20
Just standalone. The sql virtual server is running on a cluster with 2 nodes if that makes any difference. –  mjw06d Apr 5 '11 at 19:13

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.