When executing a stored procedure, you get the error message, “Execution of user code in the .NET Framework is disabled. Enable ‘clr enabled’ configuration option.” What statement do you need to execute to get the stored procedure to execute?

When executing a stored procedure, you get the error message, “Execution of user code in the .NET Framework is disabled. Enable ‘clr enabled’ configuration option.” What statement do you need to execute to get the stored procedure to execute?


Answer: – sp_configure ‘clr enabled’, 1

(You need to execute the sp_configure statement with option 1 to enable the CLR; option 0 disables it. sp_dboption is a system stored procedure that is used to configure database options. The use of CLR functionality is a server setting, so db_option cannot be used.)