EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
-- Turn advanced options back off
EXEC sp_configure 'show advanced options' , '0';
go
ALTER DATABASE test SET TRUSTWORTHY ON
reconfigure
go
CREATE ASSEMBLY
SMDiagnostics from
'C:WindowsMicrosoft.NETFrameworkv3.0Windows communication FoundationSMDiagnostics.dll'
with permission_set = UNSAFE
GO
CREATE ASSEMBLY
[System.Web] from
'C:WindowsMicrosoft.NETFrameworkv2.0.50727System.Web.dll'
with permission_set = UNSAFE
GO
CREATE ASSEMBLY
[System.Messaging] from
'C:WindowsMicrosoft.NETFrameworkv2.0.50727System.Messaging.dll'
with permission_set = UNSAFE
GO
CREATE ASSEMBLY
[System.IdentityModel] from
'C:Program FilesReference AssembliesMicrosoftFrameworkv3.0System.IdentityModel.dll'
with permission_set = UNSAFE
GO
CREATE ASSEMBLY
[System.IdentityModel.Selectors] from
'C:Program FilesReference AssembliesMicrosoftFrameworkv3.0System.IdentityModel.Selectors.dll'
with permission_set = UNSAFE
GO
CREATE ASSEMBLY -- this will add service modal
[Microsoft.Transactions.Bridge] from
'C:WindowsMicrosoft.NETFrameworkv3.0Windows Communication FoundationMicrosoft.Transactions.Bridge.dll'
with permission_set = UNSAFE
GO