CLR Deployment Fails

This drove me mad!

I was getting this error:-

Deploy error SQL01268: .Net SqlClient Data Provider: Msg 325, Level 15, State 1, 
Procedure 'procedurename', Line 5 Incorrect syntax near 'EXTERNAL'. 
You may need to set the compatibility level of the current database to a higher value
to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.

Changed everything one at a time and eventually found the solution.

Check your compatibility level in your SQL Database

sp_dbcmptlevel 'thedatabasename' 

In my case I found that it was set to 80.

To solve this, it should be 90 or above.

sp_dbcmptlevel 'thedatabasename', 90

Fixed and deployed!

Author Ric Hayman MCPD

Ric is an MCPD Microsoft Certified Professional Developer with over 25 years commercial development experience using Microsoft technologies.


Matt Penner said:

Thanks! This is exactly what I needed!

31/Aug/2011 21:43 PM

Tim Settlemoire said:

Dude, THANK YOU!!!!!!!!!!!

05/Oct/2012 00:41 AM

Add Comment


Your comment has been received and will be shown once it passes moderation.