For SQL Server 2016 upgrade – compatibility level to 130 – replace deprecated system tables with system views of function

Mapping deprecated system tables with system views of functions. We replaced “sys.sysusers” with “sys.database_principals” and it worked successfully.

MSDN Reference

The following table maps the system tables to their corresponding system views or functions in SQL Server 2012.

System table System views or functions Type of view or function
sysaltfiles sys.master_files Catalog view
syscacheobjects sys.dm_exec_cached_plans

sys.dm_exec_plan_attributes (Transact-SQL)

sys.dm_exec_sql_text

sys.dm_exec_cached_plan_dependent_objects

Dynamic management view

Dynamic management view

Dynamic management view

Dynamic management view

syscharsets sys.syscharsets Compatibility view
sysconfigures sys.configurations Catalog view
syscurconfigs sys.configurations Catalog view
sysdatabases sys.databases Catalog view
sysdevices sys.backup_devices Catalog view
syslanguages sys.syslanguages Compatibility view
syslockinfo sys.dm_tran_locks Dynamic management view
syslocks sys.dm_tran_locks Dynamic management view
syslogins sys.server_principals

sys.sql_logins

Catalog view
sysmessages sys.messages Catalog view
sysoledbusers sys.linked_logins Catalog view
sysopentapes sys.dm_io_backup_tapes Dynamic management view
sysperfinfo sys.dm_os_performance_counters Dynamic management view
sysprocesses sys.dm_exec_connections

sys.dm_exec_sessions

sys.dm_exec_requests

Dynamic management view

Dynamic management view

Dynamic management view

sysremotelogins sys.remote_logins Catalog view
sysservers sys.servers Catalog view

The following table maps the system tables or functions that are in every database in SQL Server 2000 to their corresponding system views or functions in SQL Server 2012.

System table or function System view or function Type of view or function
fn_virtualfilestats sys.dm_io_virtual_file_stats Dynamic management view
syscolumns sys.columns Catalog view
syscomments sys.sql_modules Catalog view
sysconstraints sys.check_constraints

sys.default_constraints

sys.key_constraints

sys.foreign_keys

Catalog view

Catalog view

Catalog view

Catalog view

sysdepends sys.sql_expression_dependencies Catalog view
sysfilegroups sys.filegroups Catalog view
sysfiles sys.database_files Catalog view
sysforeignkeys sys.foreign_key_columns Catalog view
sysindexes sys.indexes

sys.partitions

sys.allocation_units

sys.dm_db_partition_stats

Catalog view

Catalog view

Catalog view

Dynamic management view

sysindexkeys sys.index_columns Catalog view
sysmembers sys.database_role_members Catalog view
sysobjects sys.objects Catalog view
syspermissions sys.database_permissions

sys.server_permissions

Catalog view

Catalog view

sysprotects sys.database_permissions

sys.server_permissions

Catalog view

Catalog view

sysreferences sys.foreign_keys Catalog view
systypes sys.types Catalog view
sysusers sys.database_principals Catalog view
sysfulltextcatalogs sys.fulltext_catalogs Catalog view
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s