Reputation: 1257
do you know if there is a way to change the name of an assembly in transact-sql. I am using sql server. Alter Assembly look like you can't change the name with it. Do you know a trick or something using a script?
The script I use to create the Assembly:
CREATE ASSEMBLY [RocheWebService2Sql]
AUTHORIZATION [dbo]
FROM 'C:\Program Files\stxkk0\Assemblies\Wssdaw2Sql.dll'
WITH PERMISSION_SET = EXTERNAL_ACCESS
GO
I don't want to drop the assembly as a solution.
Upvotes: 0
Views: 364
Reputation: 5545
First drop any functions that reference it
DROP FUNCTION XXXX
Then drop the assembly
DROP ASSEMBLY YYYYY
Then create the assembly with the right name
CREATE ASSEMBLY WWWW from 'C:\MY.dll' -- WITH PERMISSION_SET = UNSAFE
The recreate your functions
CREATE FUNCTION XXXX(Your parameters)
RETURNS INT(your return type)
AS EXTERNAL NAME WWWW.[Namespace].YourMethod
Upvotes: 1