SA0219 : A deprecated build-in function is used
The topic describes the SA0219 analysis rule.
A deprecated build-in function is used
The rule checks for usages of deprecated built-in functions.
The FILE_ID,INDEXKEY_PROPERTY,USER_ID,DATABASEPROPERTY and PERMISSIONS built-in functions are in maintenance mode and may be removed in a future version of Microsoft SQL Server. Avoid using these functions in new development work, and plan to modify applications that currently use them.
Check the documentation for available alternative for the specific function.
The rule has a Batch scope and is applied only on the SQL script.
Rule has no parameters.
The rule does not need Analysis Context or SQL Connection.
New Rules, Deprecated Features
1SELECT FILE_ID('AdventureWorks2012_Data')AS 'File ID'; 2 3SELECT 4 INDEXKEY_PROPERTY(OBJECT_ID('Production.Location', 'U'), 5 1,1,'ColumnId') AS [Column ID], 6 INDEXKEY_PROPERTY(OBJECT_ID('Production.Location', 'U'), 7 1,1,'IsDescending') AS [Asc or Desc order]; 8 9SELECT USER_ID('Harold');
|1||SA0219 : A deprecated build-in function FILE_ID is used.||1||7|
|2||SA0219 : A deprecated build-in function INDEXKEY_PROPERTY is used.||4||4|
|3||SA0219 : A deprecated build-in function INDEXKEY_PROPERTY is used.||6||4|
|4||SA0219 : A deprecated build-in function USER_ID is used.||9||7|
© Ubitsoft Ltd. All Rights Reserved.