Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option.

Error message [while running a stored procedure designed to restore multiple databases from a given drive location]:

Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option.

Solution [execute]:

sp_configure ‘clr enabled’, 1
go
reconfigure
go