Hi Lubomir,
The assembly is stored on the server after you run CREATE ASSEMBLY. For
access to it, use the SQL statement "select content from sys.assembly_files
where name = 'your_assembly_name_here' ". Once you run CREATE ASSEMBLY, you
do not need access to the original file. SQL Server will not use it.
You can move assemblies in a few different ways.
1. If you move the .DLL to the remote server, the SQL Server principal
executing CREATE ASSEMBLY must have windows access to the file.
2. Alternately, if you have the assembly already cataloged to a test system,
you can right-click on [your
database]/Programmability/Assemblies/[your_assembly] and select "Script
Assembly as" then "Create to" then "File". You now have a file that contains
the DDL to re-create the assembly on the production system. It catalogs the
assembly from the binary held in the 'content' field in sys.assembly_files.
Each way has its strengths and weaknesses. Moving the file means you need to
keep the location of the file and the DDL that run CREATE ASSEMBLY in sync.
Scripting the assembly is simpler (no assembly .DLL to keep track of), but
corrupting the binary (for example, by sending the Create Script in mail and
introducing a carriage return-line feed in the binary) is possible.
Hope this helps,
Bob Beauchemin
SQLskills
> Hi,
>
[quoted text clipped - 23 lines]
> Thanks for help,
> Lubomir
Lubomir - 28 Aug 2008 01:04 GMT
Hi Bob,
Thanks.
Lubomir
> Hi Lubomir,
>
[quoted text clipped - 51 lines]
> > Thanks for help,
> > Lubomir
Kaleem Khan - 12 Nov 2008 22:12 GMT
I have some what related issue. Actually we are migrating from SQL Server
2005 to SQL Server 2008. Everything seems smooth but there is a problem
accessing report from report server page. This reports calls a stored
procdure in the dll. I have used 'create assembly' to deploy and then create
procdure.
The reports that have queries built into template means not calling SPs are
displayed fine while accessing them from report server pages.
There is no problem at all generating report from within BI Studio on the
same server machine.
The error message is:
Failed to load expression host assembly. Details: Attempted to perform an
operation that was forbidden by the CLR host.
(rsErrorLoadingExprHostAssembly)
Can you please advise something?
> Hi Lubomir,
>
[quoted text clipped - 51 lines]
> > Thanks for help,
> > Lubomir