With SQL 2005 and higher you have the ability to include and use .net assemblies within SQL server and TSQL code, and at some point in time you will have the requirement to do a restore of one of these databases and after the restore is complete and you go to use the newly restored databases you may get an error such as the following;
This error occurs because the .net code within the database requires a certain level of trust / permission in order for it to be allowed to execute, and for security as default this permission is turned off on a new or a newly restored database by SQL server.
In order to enable CLR assemblies to execute then this is as simple as setting the database as being trustworthy by using the below TSQL command
ALTER DATABASE MyDatabaseName SET TRUSTWORTHY ON
EXEC sp_ChangeDBOwner 'sa'
This command will then allow the database to execute calls on the contained .net assemblies, and if you want to disable this feature then you are able to run the same command only using the OFF keyword instead of ON.