SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server

The topic describes the SA0204 analysis rule.

Message

The system catalog view is deprecated and may be removed in a future version of SQL Server

Description

The rule checks SQL code for usages of deprecated system catalog views.

These views are in maintenance mode and may be removed in a future version of Microsoft SQL Server.

Avoid using these views in new development work, and plan to modify applications that currently use them.

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

Deprecated Features, Bugs

Additional Information
Example Test Script
SQL
 1select *
 2from users
 3
 4select *
 5from sys.traces
 6
 7select *
 8from sys.trace_events
 9
10select *
11from sys.trace_event_bindings
12
13select *
14from sys.trace_categories
15
16select *
17from sys.trace_columns
18
19select *
20from sys.trace_subclass_values
21
22select *
23from sys.numbered_procedures
24
25select *
26from sys.numbered_procedure_parameters
27
28select *
29from sys.sql_dependencies
30
31select *
32from sys.endpoint_webmethods
33
34select *
35from sys.soap_endpoints

Analysis Results

  Message Line Column
1 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 5 9
2 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 8 9
3 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 11 9
4 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 14 9
5 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 17 9
6 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 20 9
7 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 23 9
8 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 26 9
9 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 29 9
10 SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server. 32 9
See Also

Other Resources