Showing posts with label assembly. Show all posts
Showing posts with label assembly. Show all posts

Friday, March 9, 2012

How to deploy assembly from remote system, without using VS.NET

Hi

I'm developing a tool to deploy the CLR objects from any where to the server

But I'm unable to deploy from remote system to the server.

I'm getting the error like

CREATE ASSEMBLY failed because it could not open the physical file 'D:\Working\DBS2005V2\GL\GLREPORTS\DBS.GL.RM.SQL\bin\Debug\sample.dll': 3(The system cannot find the path specified.).

when I try to deploy using

EXEC dbo.sp_executesql @.statement = N' CREATE ASSEMBLY [DBS.GL.RM.SQL]

FROM ''D:\Working\DBS2005V2\GL\GLREPORTS\DBS.GL.RM.SQL\bin\Debug\sample.dll''

WITH PERMISSION_SET = SAFE'

can anybody tell how to generate assembly_bits for assembly

the VS.NEt is generating assembly bits instead of physical path to deploy the assembly on the remote server.

as

CREATE ASSEMBLY [sample]

AUTHORIZATION [dbo]

FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD215 ..

WITH PERMISSION_SET = SAFE

But nothing is provided reg this in MSDN.

will u help me in handle this please

Thank u

See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=288119&SiteID=1 for code that will allow you to generate the assembly bits string.

How to deploy an assembly (CLR)?

Good day to ALL,

I have already setup a db to my client.

My sp's are all created using CLR.

If my sp's are changed, how do I deploy them back to my client?

I usually send them a backup of the DB during the first few implementation.

But currently, their DB now contains live data, so I can't just let them restore the backup.

Is there another way?

Thanks and more power!

Arthur

If you just changed the code without adding any param on any other object you just need to issue an ALTER ASSEMBLY

If you added some object then you need to
- ALTER ASSEMBLY
- CREATE PROCEDURE or FUNCTION

If your changes are very hard, say you have modified SP params you need to drop all your objects, drop the assembly and recreate all from scartch.