3

Azure SQL DW supports all error handing function such as Error_Procedure(), Error_Message() except Error_Line(). Why? Is there any other alternative?

HimalayanNinja
  • 421
  • 3
  • 11
  • As for why, who knows? As for alternatives, my favorite source for working around Azure / PDW limitations doesn't have one for `ERROR_LINE()`: https://learn.microsoft.com/en-in/azure/sql-data-warehouse/sql-data-warehouse-migrate-code Hopefully someone else has an idea. – mallan1121 May 09 '17 at 22:22

1 Answers1

2

The code you submit for execution against SQLDW is not the same as the code that is ultimately executed. This is a good thing! SQLDW uses internal representations for database objects so that renames etc are only simple metadata changes at the control node. However, this does mean that errors generated by the system do not line up, line for line with the code you executed. Therefore the ERROR_LINE() does not mean anything in this context.

You can see the code that is generated by looking at EXPLAIN or by using the DMVs (sys.dm_pdw_sql_requests).

JRJ

JRJ
  • 1,704
  • 7
  • 6