My application is working on SQL Server 2008 R2 and I need to move it to SQL Server 2012, so first I restored the database backup on SQL Server 2012 and then set compatibility level to 100, but RAISEERROR syntax errors are showing up which are related to triggers. There are so many triggers in the database, do I have to amend each and every trigger manually or what should be its best approach?
ALTER DATABASE YourDatabaseName SET COMPATIBILITY_LEVEL = 100
I'm assuming the code is using the undocumented version of RAISEERROR that is no longer supported in 2012+
replace anything like this
to something like this