I am trying to run an assembly I have saved the project and the dll file in the mapped drive on my PC to the server:
USE <TEMP>
GO
CREATE ASSEMBLY [BooksMgr]
AUTHORIZATION [dbo]
FROM 'Z:\FY_2011-12\04 Individual\JohanZ\BooksMgr\BooksMgr\bin\Release\BooksMgr.dll'
WITH PERMISSION_SET = SAFE
GO
and the error I am getting:
CREATE ASSEMBLY failed because it could not open the physical file
“Z:\FY_2011-12\04
Individual\JohanZ\BooksMgr\BooksMgr\bin\Release\BooksMgr.dll”:21
(failed to retrieve text for this error. Reason: 15105).
you may try looking at this MSDN Link
How to: Create and Run a SQL Server User-Defined Function by using Common Language Run-time Integration
As as side not.. make sure that you have created that Assembly first before trying to reference it in the way you are doing in your current code..also make sure that assembly does not reference other assemblies otherwise you will need to create those assemblies first as well..
Make sure the assembly is created in the directory you are looking for in Z: prior to referencing as well