Click or drag to resize

SA0203 : A deprecated system function is used

The topic describes the SA0203 analysis rule.

Message

A deprecated system function is used

Description

The rule checks for usages of deprecated system functions.

The 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.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

New Rules, Deprecated Features

Additional Information
Example Test Script
SQL
1DECLARE @Handle varbinary(64);  
2set @Handle = sql_handle   
3SELECT @Handle = sql_handle   
4FROM sys.dm_exec_requests   
5WHERE session_id = 52 and request_id = 0;  
6SELECT * FROM sys.fn_get_sql(@Handle);  
7
8SELECT * FROM master.sys.fn_get_sql(@Handle);  
9SELECT * FROM  fn_get_sql(@Handle);

Analysis Results

 MessageLineColumn
1SA0203 : A deprecated system function sys.fn_get_sql is used.618
2SA0203 : A deprecated system function sys.fn_get_sql is used.825
3SA0203 : A deprecated system function sys.fn_get_sql is used.915
See Also

Other Resources