Showing posts with label clr. Show all posts
Showing posts with label clr. 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 assemblies to SQL Server 2005

I'm investigating the possible problems of transition of my project to
SQL Server 2005.
I'm planning to intensively use the CLR integration as it gives a lot
of benefits.
Here is the problem: to deploy the compiled CLR assembly to SQL Server
I have to put it on the shared location that is visible from the SQL
Server 2005 side, and then run "CREATE ASSEMBLY..." statement.
The question is: In general I won't have such a "shared location" as
the SQL server may be "on the other side of planet", I mean it may not
have access to the shared folders the client may access. My program
will be distributed all over the world, it should work in different
environments, so I cannot rely on the shared location. Is there any
other method to deploy the assembly to SQL Server? This is the only
true problem as far as I can see that stops me from starting the
transition.
Please use the SQL Server 2005 newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1
http://www.aspfaq.com/
(Reverse address to reply.)
"Sergei Almazov" <almazik@.ukr.net> wrote in message
news:1105634014.804208.150320@.c13g2000cwb.googlegr oups.com...
> I'm investigating the possible problems of transition of my project to
> SQL Server 2005.
> I'm planning to intensively use the CLR integration as it gives a lot
> of benefits.
> Here is the problem: to deploy the compiled CLR assembly to SQL Server
> I have to put it on the shared location that is visible from the SQL
> Server 2005 side, and then run "CREATE ASSEMBLY..." statement.
> The question is: In general I won't have such a "shared location" as
> the SQL server may be "on the other side of planet", I mean it may not
> have access to the shared folders the client may access. My program
> will be distributed all over the world, it should work in different
> environments, so I cannot rely on the shared location. Is there any
> other method to deploy the assembly to SQL Server? This is the only
> true problem as far as I can see that stops me from starting the
> transition.
>

How to deploy assemblies to SQL Server 2005

I'm investigating the possible problems of transition of my project to
SQL Server 2005.
I'm planning to intensively use the CLR integration as it gives a lot
of benefits.
Here is the problem: to deploy the compiled CLR assembly to SQL Server
I have to put it on the shared location that is visible from the SQL
Server 2005 side, and then run "CREATE ASSEMBLY..." statement.
The question is: In general I won't have such a "shared location" as
the SQL server may be "on the other side of planet", I mean it may not
have access to the shared folders the client may access. My program
will be distributed all over the world, it should work in different
environments, so I cannot rely on the shared location. Is there any
other method to deploy the assembly to SQL Server? This is the only
true problem as far as I can see that stops me from starting the
transition.Please use the SQL Server 2005 newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1
http://www.aspfaq.com/
(Reverse address to reply.)
"Sergei Almazov" <almazik@.ukr.net> wrote in message
news:1105634014.804208.150320@.c13g2000cwb.googlegroups.com...
> I'm investigating the possible problems of transition of my project to
> SQL Server 2005.
> I'm planning to intensively use the CLR integration as it gives a lot
> of benefits.
> Here is the problem: to deploy the compiled CLR assembly to SQL Server
> I have to put it on the shared location that is visible from the SQL
> Server 2005 side, and then run "CREATE ASSEMBLY..." statement.
> The question is: In general I won't have such a "shared location" as
> the SQL server may be "on the other side of planet", I mean it may not
> have access to the shared folders the client may access. My program
> will be distributed all over the world, it should work in different
> environments, so I cannot rely on the shared location. Is there any
> other method to deploy the assembly to SQL Server? This is the only
> true problem as far as I can see that stops me from starting the
> transition.
>

How to deploy assemblies to SQL Server 2005

I'm investigating the possible problems of transition of my project to
SQL Server 2005.
I'm planning to intensively use the CLR integration as it gives a lot
of benefits.
Here is the problem: to deploy the compiled CLR assembly to SQL Server
I have to put it on the shared location that is visible from the SQL
Server 2005 side, and then run "CREATE ASSEMBLY..." statement.
The question is: In general I won't have such a "shared location" as
the SQL server may be "on the other side of planet", I mean it may not
have access to the shared folders the client may access. My program
will be distributed all over the world, it should work in different
environments, so I cannot rely on the shared location. Is there any
other method to deploy the assembly to SQL Server? This is the only
true problem as far as I can see that stops me from starting the
transition.Please use the SQL Server 2005 newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Sergei Almazov" <almazik@.ukr.net> wrote in message
news:1105634014.804208.150320@.c13g2000cwb.googlegroups.com...
> I'm investigating the possible problems of transition of my project to
> SQL Server 2005.
> I'm planning to intensively use the CLR integration as it gives a lot
> of benefits.
> Here is the problem: to deploy the compiled CLR assembly to SQL Server
> I have to put it on the shared location that is visible from the SQL
> Server 2005 side, and then run "CREATE ASSEMBLY..." statement.
> The question is: In general I won't have such a "shared location" as
> the SQL server may be "on the other side of planet", I mean it may not
> have access to the shared folders the client may access. My program
> will be distributed all over the world, it should work in different
> environments, so I cannot rely on the shared location. Is there any
> other method to deploy the assembly to SQL Server? This is the only
> true problem as far as I can see that stops me from starting the
> transition.
>

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.