somewhat incompatible T-SQL on SQL Server 2012 RC0 - by Megasoft2

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
1
Sign in
to vote
ID 708167 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/24/2011 2:58:05 AM
Access Restriction Public

Description

A set of code T-SQL of SQL Server 2005 / 2008 R2, does not work correctly in SQL Server 2012 RC0.

This T-SQL code is within process of administrative system Installation.

Note: OS of use is Windows Developer Preview
Sign in to post a comment.
Posted by Umachandar [MSFT] on 11/30/2011 at 4:26 PM
Hello,
As Aaron described, you are using a deprecated RAISERROR syntax:

RAISERROR 55555'Error en el envio de los parámetros'

So you need to change it after upgrade to SQL Server 2012.

--
Umachandar, SQL Programmability Team
Posted by Megasoft2 on 11/30/2011 at 6:05 AM
Hi
I repeat once again:
I'm aware of changes that there are in SQL server 2012 RC0. by Example: the THROW keyword should be used instead of RAISERROR to raise your own errors, but also should be compatible with RAISERROR!

Why?
Because:This T-SQL code is within installation process of a commercial administrative system.

finally causes the loss of backward compatibility.

Best regards
Posted by AaronBertrand on 11/24/2011 at 3:17 PM
This syntax is deprecated:

     RAISERROR 55555'Error en el envio de los parámetros'

(As well as simply 'RAISERROR 55555')

So it should come as no surprise that this code causes errors. Please update your code to use the proper RAISERROR syntax, e.g.

     RAISERROR(55555, 11, 1, 'Error en el envio de los parámetros');

Or the new THROW syntax:

     THROW 55555, 'Error en el envio de los parámetros', 1;

The deprecation of this raiserror syntax has been documented for a few versions now. Here are the SQL 2008 and SQL 2008 R2 topics documenting that the old syntax should no longer be used:

http://msdn.microsoft.com/en-us/library/ms143729(SQL.100).aspx
http://msdn.microsoft.com/en-us/library/ms143729(SQL.105).aspx
Posted by Megasoft2 on 11/24/2011 at 3:51 AM
I'm aware of changes that there are in SQL server 2012 RC0. by Example: the THROW keyword should be used instead of RAISERROR to raise your own errors, but also should be compatible with RAISERROR!