Click or drag to resize

SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead

The topic describes the SA0161 analysis rule.

Message

The compatibility views are deprecated. It is recommended to use catalog views instead

Description

The rule checks for usage of compatibility views,

The compatibility views do not expose metadata for features that were introduced in SQL Server 2005.

It is recommended to use catalog views.

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

Design Rules

Additional Information
Example Test Script
 1select * from syscolumns
 2select * from syscomments
 3select * from sysconfigures
 4
 5select * from dbo.sysopentapes
 6select * from dbo.sysperfinfo
 7select * from dbo.syspermissions
 8select * from dbo.sysprocesses
 9
10select * from sys.sysprotects
11select * from sys.sysreferences
12
13select * from sys.syscomments1, dbo.syscolumns1, syscolumns1

Analysis Results

 MessageLineColumn
1SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.114
2SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.214
3SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.314
4SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.518
5SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.618
6SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.718
7SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.818
8SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.1018
9SA0161 : The compatibility views are deprecated. It is recommended to use catalog views instead.1118
See Also

Other Resources