Click or drag to resize

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

New Rules, Deprecated Features

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

 MessageLineColumn
1SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.59
2SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.89
3SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.119
4SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.149
5SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.179
6SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.209
7SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.239
8SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.269
9SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.299
10SA0204 : The system catalog view is deprecated and may be removed in a future version of SQL Server.329
...
See Also

Other Resources