EXEC sp_configure ‘show advanced options’, 1
RECONFIGURE;
EXEC sp_configure ‘clr strict security’, 0;
RECONFIGURE;

EXEC sys.sp_configure N’show advanced options’, N’1′;
RECONFIGURE WITH OVERRIDE;
EXEC sys.sp_configure N’clr strict security’, N’0′;
RECONFIGURE WITH OVERRIDE;
EXEC sys.sp_configure N’show advanced options’, N’0′;
RECONFIGURE WITH OVERRIDE;
GO

EXEC sys.sp_configure N’show advanced options’, N’1′;
RECONFIGURE WITH OVERRIDE;
EXEC sys.sp_configure N’clr strict security’, N’1′;
RECONFIGURE WITH OVERRIDE;
EXEC sys.sp_configure N’show advanced options’, N’0′;
RECONFIGURE WITH OVERRIDE;
GO


USE

master;

GO

EXEC

sp_configure ‘clr enabled’, ‘1’;

RECONFIGURE

WITH OVERRIDE;

go

EXEC sp_configure ‘show advanced options’, ‘1’;

GO

RECONFIGURE;

EXEC sp_configure ‘clr enabled’ ,1

GO

RECONFIGURE

GO

EXEC sp_configure ‘clr enabled’   — make sure it took

GO

ALTER DATABASE MikroDB_V15_XXX SET TRUSTWORTHY ON; 

EXEC sp_configure ‘show advanced options’, 1

RECONFIGURE;

EXEC sp_configure ‘clr strict security’, 0;

RECONFIGURE;

EXEC sys.sp_configure N’show advanced options’, N’0′;

RECONFIGURE WITH OVERRIDE;

GO

EXEC sp_configure ‘show advanced options’, 1

RECONFIGURE;

EXEC sp_configure ‘clr strict security’, 0;

RECONFIGURE;

EXEC sys.sp_configure N’show advanced options’, N’1′;

RECONFIGURE WITH OVERRIDE;

EXEC sys.sp_configure N’clr strict security’, N’0′;

RECONFIGURE WITH OVERRIDE;

EXEC sys.sp_configure N’show advanced options’, N’0′;

RECONFIGURE WITH OVERRIDE;

GO

EXEC sys.sp_configure N’show advanced options’, N’1′;

RECONFIGURE WITH OVERRIDE;

EXEC sys.sp_configure N’clr strict security’, N’1′;

RECONFIGURE WITH OVERRIDE;

EXEC sys.sp_configure N’show advanced options’, N’0′;

RECONFIGURE WITH OVERRIDE;

GO

ALTER DATABASE MikroDB_V15_XXX SET TRUSTWORTHY ON;

GO

USE MikroDB_V15_XXX

GO

EXEC sp_changedbowner ‘SRV\Administrator’

GO