SQL Server 2016 中不推荐使用的数据库引擎功能Deprecated Database Engine Features in SQL Server 2016

适用对象: 是SQL Server 2016 及更高版本 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库APPLIES TO: YesSQL Server 2016 and later NoAzure SQL Database NoAzure Synapse Analytics (SQL DW) NoParallel Data Warehouse

本主题介绍 SQL Server 数据库引擎SQL Server Database Engine 中仍然可用但不推荐使用的 SQL Server 2016 (13.x)SQL Server 2016 (13.x)功能。This topic describes the deprecated SQL Server 数据库引擎SQL Server Database Engine features that are still available in SQL Server 2016 (13.x)SQL Server 2016 (13.x). 在新的应用程序中不应使用这些不推荐使用的功能。Deprecated features should not be used in new applications.

如果功能标记为已弃用,表示:When a feature is marked deprecated, it means:

  • 该功能仅处于维护模式。The feature is in maintenance mode only. 无法进行新的更改,包括与新功能的互操作性有关的更改。No new changes will be done, including those related to inter-operability with new features.
  • 我们努力不从将来的版本中删除已弃用的功能,使升级更简单。We strive not to remove a deprecated feature from future releases to make upgrades easier. 但是,在极少数情况下,如果该功能限制了将来的创新,我们可能选择从 SQL ServerSQL Server 中将其永久删除。However, under rare situations, we may choose to permanently remove the feature from SQL ServerSQL Server if it limits future innovations.
  • 对于新的开发工作,不建议使用已弃用的功能。For new development work, we do not recommend using deprecated features.

对于 SQL Server 2017 (14.x)SQL Server 2017 (14.x),请参阅 SQL Server 2017 中弃用的数据库引擎功能For SQL Server 2017 (14.x)SQL Server 2017 (14.x), see Deprecated Database Engine Features in SQL Server 2017.

可以使用 SQL ServerSQL Server Deprecated Features Object 性能计数器监视不推荐使用的功能的使用情况并跟踪事件。You can monitor the use of deprecated features by using the SQL ServerSQL Server Deprecated Features Object performance counter and trace events. 有关详细信息,请参阅 使用 SQL Server 对象For more information, see Use SQL Server Objects.

这些计数器的值也可通过执行以下语句而得:The value of these counters are also available by executing the following statement:

SELECT * FROM sys.dm_os_performance_counters   
WHERE object_name = 'SQLServer:Deprecated Features';  

SQL Server 的下一版本中弃用的功能Features deprecated in the next version of SQL Server

下一版 SQL Server 数据库引擎SQL Server Database Engine 将不再支持以下 SQL ServerSQL Server功能。The following SQL Server 数据库引擎SQL Server Database Engine features will not be supported in the next version of SQL ServerSQL Server. 请不要在新的开发工作中使用这些功能,并尽快修改当前还在使用这些功能的应用程序。Do not use these features in new development work, and modify applications that currently use these features as soon as possible. 功能名称值在跟踪事件中显示为 ObjectName,而在性能计数器和 sys.dm_os_performance_counters 中显示为实例名称 。The Feature name value appears in trace events as the ObjectName and in performance counters and sys.dm_os_performance_counters as the instance name. 功能 ID 值在跟踪事件中作为 ObjectId。The Feature ID value appears in trace events as the ObjectId.

类别Category 不推荐使用的功能Deprecated feature 替代功能Replacement 功能名称Feature name 功能 IDFeature ID
备份和还原Backup and Restore 仍弃用 RESTORE { DATABASE | LOG } WITH [MEDIA]PASSWORD。RESTORE { DATABASE | LOG } WITH [MEDIA]PASSWORD continues to be deprecated. 停止使用 BACKUP { DATABASE | LOG } WITH PASSWORD 和 BACKUP { DATABASE | LOG } WITH MEDIAPASSWORD。BACKUP { DATABASE | LOG } WITH PASSWORD and BACKUP { DATABASE | LOG } WITH MEDIAPASSWORD are discontinued. None BACKUP DATABASE 或 LOG WITH PASSWORDBACKUP DATABASE or LOG WITH PASSWORD

BACKUP DATABASE 或 LOG WITH MEDIAPASSWORDBACKUP DATABASE or LOG WITH MEDIAPASSWORD
104104

103103
兼容级别Compatibility levels 从版本 100(SQL Server 2008SQL Server 2008SQL Server 2008 R2SQL Server 2008 R2)升级。Upgrade from version 100 (SQL Server 2008SQL Server 2008 and SQL Server 2008 R2SQL Server 2008 R2). 如果 SQL ServerSQL Server 版本结束支持,相关数据库兼容性级别将标记为已弃用。When a SQL ServerSQL Server version goes out of support, the associated database compatibility level will be marked deprecated. 但是,我们将继续支持在任何支持的数据库兼容性级别上认证的应用程序尽可能长的时间,使升级更简单。However, we will continue to support applications certified on any supported Database Compatibility Level as long as possible, to make the upgrades easier. 有关兼容性级别的详细信息,请参阅 ALTER DATABASE 兼容级别 (Transact-SQL)For more information about compatibility levels, see ALTER DATABASE Compatibility Level (Transact-SQL). 数据库兼容性级别 100Database compatibility level 100 108108
数据库对象Database objects 从触发器返回结果集的功能Ability to return result sets from triggers None 从触发器返回结果Returning results from trigger 1212
加密Encryption 不推荐使用通过 RC4 或 RC4_128 进行加密,并计划在下一个版本中删除这种加密方法。Encryption using RC4 or RC4_128 is deprecated and is scheduled to be removed in the next version. 不推荐使用 RC4 和 RC4_128 解密。Decrypting RC4 and RC4_128 is not deprecated. 请使用其他加密算法,例如 AES。Use another encryption algorithm such as AES. 不推荐使用的加密算法Deprecated encryption algorithm 253253
哈希算法Hash algorithms 使用 MD2、MD4、MD5、SHA 和 SHA1 已弃用。Using the MD2, MD4, MD5, SHA, and SHA1 is deprecated. 请改用 SHA2_256 或 SHA2_512。Use SHA2_256 or SHA2_512 instead. 旧算法将继续起作用,但会抛出弃用事件。Older algorithms will continue working, but they will raise a deprecation event. 弃用的哈希算法Deprecated hash algorithm None
远程服务器Remote servers sp_addremoteloginsp_addremotelogin

sp_addserversp_addserver

sp_dropremoteloginsp_dropremotelogin

sp_helpremoteloginsp_helpremotelogin

sp_remoteoptionsp_remoteoption
用链接服务器替代远程服务器。Replace remote servers by using linked servers. sp_addserver 仅可与本地选项一起使用。sp_addserver can only be used with the local option. sp_addremoteloginsp_addremotelogin

sp_addserversp_addserver

sp_dropremoteloginsp_dropremotelogin

sp_helpremoteloginsp_helpremotelogin

sp_remoteoptionsp_remoteoption
7070

6969

7171

7272

7373
远程服务器Remote servers @@remserver@@remserver 用链接服务器替代远程服务器。Replace remote servers by using linked servers. None None
远程服务器Remote servers SET REMOTE_PROC_TRANSACTIONSSET REMOTE_PROC_TRANSACTIONS 用链接服务器替代远程服务器。Replace remote servers by using linked servers. SET REMOTE_PROC_TRANSACTIONSSET REMOTE_PROC_TRANSACTIONS 110110
表提示Table hints 不带括号的 HOLDLOCK 表提示。HOLDLOCK table hint without parenthesis. 使用 HOLDLOCK 以及括号。Use HOLDLOCK with parenthesis. 不带括号的 HOLDLOCK 表提示HOLDLOCK table hint without parenthesis 167167

SQL Server 未来版本中弃用的功能Features deprecated in a future version of SQL Server

SQL ServerSQL Server 的下一版本仍支持以下 SQL Server 数据库引擎SQL Server Database Engine 功能,但以后的版本将弃用这些功能。The following SQL Server 数据库引擎SQL Server Database Engine features are supported in the next version of SQL ServerSQL Server, but will be deprecated in a later version. 具体是哪一 SQL ServerSQL Server 版本现在还未确定。The specific version of SQL ServerSQL Server has not been determined.

类别Category 不推荐使用的功能Deprecated feature 替代功能Replacement 功能名称Feature name 功能 IDFeature ID
兼容级别Compatibility levels sp_dbcmptlevelsp_dbcmptlevel ALTER DATABASE ...SET COMPATIBILITY_LEVEL。ALTER DATABASE ... SET COMPATIBILITY_LEVEL. 有关详细信息,请参阅 ALTER DATABASE 兼容级别 (Transact-SQL)For more information, see ALTER DATABASE Compatibility Level (Transact-SQL). sp_dbcmptlevelsp_dbcmptlevel 8080
兼容级别Compatibility levels 数据库兼容性级别 110 和 120。Database compatibility level 110 and 120. 计划为未来版本升级数据库和应用程序。Plan to upgrade the database and application for a future release. 但是,我们将继续支持在任何支持的数据库兼容性级别上认证的应用程序尽可能长的时间,使升级更简单。However, we will continue to support applications certified on any supported database compatibility level as long as possible, to make the upgrades easier. 有关兼容性级别的详细信息,请参阅 ALTER DATABASE 兼容级别 (Transact-SQL)For more information about compatibility levels, see ALTER DATABASE Compatibility Level (Transact-SQL). 数据库兼容性级别 110Database compatibility level 110

数据库兼容性级别 120Database compatibility level 120
XMLXML 内联 XDR 架构生成Inline XDR Schema Generation 不推荐使用 FOR XML 选项的 XMLDATA 指令。The XMLDATA directive to the FOR XML option is deprecated. 如果是 RAW 和 AUTO 模式,请使用 XSD 生成。Use XSD generation in the case of RAW and AUTO modes. 在 EXPLICT 模式下,没有可以代替 XMLDATA 指令的项。There is no replacement for the XMLDATA directive in EXPLICT mode. XMLDATAXMLDATA 181181
备份和还原Backup and restore BACKUP { DATABASE | LOG } TO TAPEBACKUP { DATABASE | LOG } TO TAPE

BACKUP { DATABASE | LOG } TO device_that_is_a_tapeBACKUP { DATABASE | LOG } TO device_that_is_a_tape
BACKUP { DATABASE | LOG } TO DISKBACKUP { DATABASE | LOG } TO DISK

BACKUP { DATABASE | LOG } TO device_that_is_a_diskBACKUP { DATABASE | LOG } TO device_that_is_a_disk
BACKUP DATABASE 或 LOG TO TAPEBACKUP DATABASE or LOG TO TAPE 235235
备份和还原Backup and restore sp_addumpdevice'tape'sp_addumpdevice'tape' sp_addumpdevice'disk'sp_addumpdevice'disk' ADDING TAPE DEVICEADDING TAPE DEVICE 236236
备份和还原Backup and restore sp_helpdevicesp_helpdevice sys.backup_devicessys.backup_devices sp_helpdevicesp_helpdevice 100100
排序规则Collations Korean_Wansung_UnicodeKorean_Wansung_Unicode

Lithuanian_ClassicLithuanian_Classic

SQL_AltDiction_CP1253_CS_ASSQL_AltDiction_CP1253_CS_AS
无。None. SQL Server 2005 (9.x)SQL Server 2005 (9.x)中存在这些排序规则,但 fn_helpcollations 并不将它们显示出来。These collations exist in SQL Server 2005 (9.x)SQL Server 2005 (9.x), but are not visible through fn_helpcollations. Korean_Wansung_UnicodeKorean_Wansung_Unicode

Lithuanian_ClassicLithuanian_Classic

SQL_AltDiction_CP1253_CS_ASSQL_AltDiction_CP1253_CS_AS
191191

192192

194194
排序规则Collations HindiHindi

马其顿语Macedonian
SQL Server 2005 (9.x)SQL Server 2005 (9.x) 及更高版本中存在这些排序规则,但 fn_helpcollations 并不将它们显示出来。These collations exist in SQL Server 2005 (9.x)SQL Server 2005 (9.x) and higher, but are not visible through fn_helpcollations. 请改用 Macedonian_FYROM_90 和 Indic_General_90。Use Macedonian_FYROM_90 and Indic_General_90 instead. HindiHindi

马其顿语Macedonian
190190

193193
排序规则Collations Azeri_Latin_90Azeri_Latin_90

Azeri_Cyrilllic_90Azeri_Cyrilllic_90
Azeri_Latin_100Azeri_Latin_100

Azeri_Cyrilllic_100Azeri_Cyrilllic_100
Azeri_Latin_90Azeri_Latin_90

Azeri_Cyrilllic_90Azeri_Cyrilllic_90
232232

233233
配置Configuration SET ANSI_NULLS OFF 和 ANSI_NULLS OFF 数据库选项SET ANSI_NULLS OFF and ANSI_NULLS OFF database option

SET ANSI_PADDING OFF 和 ANSI_PADDING OFF 数据库选项SET ANSI_PADDING OFF and ANSI_PADDING OFF database option

SET CONCAT_NULL_YIELDS_NULL OFF 和 CONCAT_NULL_YIELDS_NULL OFF 数据库选项SET CONCAT_NULL_YIELDS_NULL OFF and CONCAT_NULL_YIELDS_NULL OFF database option

SET OFFSETSSET OFFSETS
无。None.

ANSI_NULLS、ANSI_PADDING 和 CONCAT_NULLS_YIELDS_NULL 这三个选项在任何情况下始终设置为 ON。ANSI_NULLS, ANSI_PADDING and CONCAT_NULLS_YIELDS_NULL will always be set to ON. SET OFFSETS 将不可用。SET OFFSETS will be unavailable.
SET ANSI_NULLS OFFSET ANSI_NULLS OFF

SET ANSI_PADDING OFFSET ANSI_PADDING OFF

SET CONCAT_NULL_YIELDS_NULL OFFSET CONCAT_NULL_YIELDS_NULL OFF

SET OFFSETSSET OFFSETS

ALTER DATABASE SET ANSI_NULLS OFFALTER DATABASE SET ANSI_NULLS OFF

ALTER DATABASE SET ANSI_PADDING OFFALTER DATABASE SET ANSI_PADDING OFF

ALTER DATABASE SET CONCAT_NULL_YIELDS_NULL OFFALTER DATABASE SET CONCAT_NULL_YIELDS_NULL OFF
111111

113113

112112

3636

111111

113113

112112
数据类型Data types sp_addtypesp_addtype

sp_droptypesp_droptype
CREATE TYPECREATE TYPE

DROP TYPEDROP TYPE
sp_addtypesp_addtype

sp_droptypesp_droptype
6262

6363
数据类型Data types timestamp 数据类型的 rowversion 语法timestamp syntax for rowversion data type rowversion 数据类型语法rowversion data type syntax TIMESTAMPTIMESTAMP 158158
数据类型Data types timestamp 列中插入 null 值的功能。Ability to insert null values into timestamp columns. 请改用 DEFAULT。Use a DEFAULT instead. 将 NULL 插入 TIMESTAMP 列INSERT NULL into TIMESTAMP columns 179179
数据类型Data types “text in row”表选项'text in row' table option 使用 varchar(max)nvarchar(max)varbinary(max) 数据类型。Use varchar(max), nvarchar(max), and varbinary(max) data types. 有关详细信息,请参阅 sp_tableoption (Transact-SQL)For more information, see sp_tableoption (Transact-SQL). text in row 表选项Text in row table option 99
数据类型Data types 数据类型:Data types:

texttext

ntextntext

图像image
使用 varchar(max)nvarchar(max)varbinary(max) 数据类型。Use varchar(max), nvarchar(max), and varbinary(max) data types. 数据类型: textntextimageData types: text, ntext or image 44
数据库管理Database management sp_attach_dbsp_attach_db

sp_attach_single_file_dbsp_attach_single_file_db
使用 FOR ATTACH 选项的 CREATE DATABASE 语句。CREATE DATABASE statement with the FOR ATTACH option. 若要在一个或多个日志文件有新位置的情况下重新生成这些日志文件,请使用 FOR ATTACH_REBUILD_LOG 选项。To rebuild multiple log files, when one or more have a new location, use the FOR ATTACH_REBUILD_LOG option. sp_attach_dbsp_attach_db

sp_attach_single_file_dbsp_attach_single_file_db
8181

8282
数据库对象Database objects CREATE DEFAULTCREATE DEFAULT

DROP DEFAULTDROP DEFAULT

sp_bindefaultsp_bindefault

sp_unbindefaultsp_unbindefault
CREATE TABLE 和 ALTER TABLE 中的 DEFAULT 关键字DEFAULT keyword in CREATE TABLE and ALTER TABLE CREATE_DROP_DEFAULTCREATE_DROP_DEFAULT

sp_bindefaultsp_bindefault

sp_unbindefaultsp_unbindefault
162162

6464

6565
数据库对象Database objects CREATE RULECREATE RULE

DROP RULEDROP RULE

sp_bindrulesp_bindrule

sp_unbindrulesp_unbindrule
CREATE TABLE 和 ALTER TABLE 中的 CHECK 关键字CHECK keyword in CREATE TABLE and ALTER TABLE CREATE_DROP_RULECREATE_DROP_RULE

sp_bindrulesp_bindrule

sp_unbindrulesp_unbindrule
161161

6666

6767
数据库对象Database objects sp_change_users_loginsp_change_users_login 使用 ALTER USER。Use ALTER USER. sp_change_users_loginsp_change_users_login 231231
数据库对象Database objects sp_dependssp_depends sys.dm_sql_referenced_entities 和 sys.dm_sql_referenced_entitiessys.dm_sql_referencing_entities and sys.dm_sql_referenced_entities sp_dependssp_depends 1919
数据库对象Database objects sp_renamedbsp_renamedb ALTER DATABASE 中的 MODIFY NAMEMODIFY NAME in ALTER DATABASE sp_renamedbsp_renamedb 7979
数据库对象Database objects sp_getbindtokensp_getbindtoken 使用 MARS 或分布式事务。Use MARS or distributed transactions. sp_getbindtokensp_getbindtoken 9898
数据库选项Database options sp_bindsessionsp_bindsession 使用 MARS 或分布式事务。Use MARS or distributed transactions. sp_bindsessionsp_bindsession 9797
数据库选项Database options sp_resetstatussp_resetstatus ALTER DATABASE SET { ONLINE | EMERGENCY }ALTER DATABASE SET { ONLINE | EMERGENCY } sp_resetstatussp_resetstatus 8383
数据库选项Database options ALTER DATABASE 的 TORN_PAGE_DETECTION 选项TORN_PAGE_DETECTION option of ALTER DATABASE ALTER DATABASE 的 PAGE_VERIFY TORN_PAGE_DETECTION 选项PAGE_VERIFY TORN_PAGE_DETECTION option of ALTER DATABASE ALTER DATABASE WITH TORN_PAGE_DETECTIONALTER DATABASE WITH TORN_PAGE_DETECTION 102102
DBCCDBCC DBCC DBREINDEXDBCC DBREINDEX ALTER INDEX 的 REBUILD 选项。REBUILD option of ALTER INDEX. DBCC DBREINDEXDBCC DBREINDEX 1111
DBCCDBCC DBCC INDEXDEFRAGDBCC INDEXDEFRAG ALTER INDEX 的 REORGANIZE 选项REORGANIZE option of ALTER INDEX DBCC INDEXDEFRAGDBCC INDEXDEFRAG 1818
DBCCDBCC DBCC SHOWCONTIGDBCC SHOWCONTIG sys.dm_db_index_physical_statssys.dm_db_index_physical_stats DBCC SHOWCONTIGDBCC SHOWCONTIG 1010
DBCCDBCC DBCC PINTABLEDBCC PINTABLE

DBCC UNPINTABLEDBCC UNPINTABLE
无效。Has no effect. DBCC [UN]PINTABLEDBCC [UN]PINTABLE 189189
扩展属性Extended properties 用 Level0type = 'type' 和 Level0type = 'USER' 向 1 级或 2 级类型对象添加扩展属性。Level0type = 'type' and Level0type = 'USER' to add extended properties to level-1 or level-2 type objects. 用 Level0type = 'USER' 只可直接向用户或角色添加扩展属性。Use Level0type = 'USER' only to add an extended property directly to a user or role.

用 Level0type = 'SCHEMA' 向 1 级类型(如 TABLE 或 VIEW)或 2 级类型(如 COLUMN 或 TRIGGER)添加扩展属性。Use Level0type = 'SCHEMA' to add an extended property to level-1 types such as TABLE or VIEW, or level-2 types such as COLUMN or TRIGGER. 有关详细信息,请参阅 sp_addextendedproperty (Transact-SQL)For more information, see sp_addextendedproperty (Transact-SQL).
EXTPROP_LEVEL0TYPEEXTPROP_LEVEL0TYPE

EXTPROP_LEVEL0USEREXTPROP_LEVEL0USER
1313

1414
扩展存储过程编程Extended stored procedure programming srv_allocsrv_alloc

srv_convertsrv_convert

srv_describesrv_describe

srv_getbindtokensrv_getbindtoken

srv_got_attentionsrv_got_attention

srv_message_handlersrv_message_handler

srv_paramdatasrv_paramdata

srv_paraminfosrv_paraminfo

srv_paramlensrv_paramlen

srv_parammaxlensrv_parammaxlen

srv_paramnamesrv_paramname

srv_paramnumbersrv_paramnumber

srv_paramsetsrv_paramset

srv_paramsetoutputsrv_paramsetoutput

srv_paramstatussrv_paramstatus

srv_paramtypesrv_paramtype

srv_pfieldsrv_pfield

srv_pfieldexsrv_pfieldex

srv_rpcdbsrv_rpcdb

srv_rpcnamesrv_rpcname

srv_rpcnumbersrv_rpcnumber

srv_rpcoptionssrv_rpcoptions

srv_rpcownersrv_rpcowner

srv_rpcparamssrv_rpcparams

srv_senddonesrv_senddone

srv_sendmsgsrv_sendmsg

srv_sendrowsrv_sendrow

srv_setcoldatasrv_setcoldata

srv_setcollensrv_setcollen

srv_setutypesrv_setutype

srv_willconvertsrv_willconvert

srv_wsendmsgsrv_wsendmsg
请改用 CLR 集成。Use CLR Integration instead. XP_APIXP_API 2020
扩展存储过程编程Extended stored procedure programming sp_addextendedprocsp_addextendedproc

sp_dropextendedprocsp_dropextendedproc

sp_helpextendedprocsp_helpextendedproc
请改用 CLR 集成。Use CLR Integration instead. sp_addextendedprocsp_addextendedproc

sp_dropextendedprocsp_dropextendedproc

sp_helpextendedprocsp_helpextendedproc
9494

9595

9696
扩展的存储过程Extended stored procedures xp_grantloginxp_grantlogin

xp_revokeloginxp_revokelogin

xp_loginConfigxp_loginConfig
使用 CREATE LOGINUse CREATE LOGIN

使用 SERVERPROPERTY 的 DROP LOGIN IsIntegratedSecurityOnly 参数Use DROP LOGIN IsIntegratedSecurityOnly argument of SERVERPROPERTY
xp_grantloginxp_grantlogin

xp_revokeloginxp_revokelogin

xp_loginConfigxp_loginconfig
4444

4545

5959
函数Functions fn_get_sqlfn_get_sql sys.dm_exec_sql_textsys.dm_exec_sql_text fn_get_sqlfn_get_sql 151151
高可用性High availability 数据库镜像database mirroring Always On 可用性组Always On availability groups

如果您的 SQL ServerSQL Server 版本不支持 Always On 可用性组Always On availability groups,请使用日志传送。If your edition of SQL ServerSQL Server does not support Always On 可用性组Always On availability groups, use log shipping.
DATABASE_MIRRORINGDATABASE_MIRRORING 267267
索引选项Index options sp_indexoptionsp_indexoption ALTER INDEXALTER INDEX sp_indexoptionsp_indexoption 7878
索引选项Index options 选项两侧没有括号的 CREATE TABLE、ALTER TABLE 或 CREATE INDEX 语法。CREATE TABLE, ALTER TABLE, or CREATE INDEX syntax without parentheses around the options. 请重写语句以使用当前语法。Rewrite the statement to use the current syntax. INDEX_OPTIONINDEX_OPTION 3333
实例选项Instance options sp_configure option 'allow updates'sp_configure option 'allow updates' 系统表不再可更新。System tables are no longer updatable. 其设置不起作用。Setting has no effect. sp_configure 'allow updates'sp_configure 'allow updates' 173173
实例选项Instance options sp_configure 选项:sp_configure options:

'locks''locks'

'open objects''open objects'

'set working set size''set working set size'
这些选项目前为自动配置。Now automatically configured. 其设置不起作用。Setting has no effect. sp_configure 'locks'sp_configure 'locks'

sp_configure 'open objects'sp_configure 'open objects'

sp_configure 'set working set size'sp_configure 'set working set size'
174174

175175

176176
实例选项Instance options sp_configure option 'priority boost'sp_configure option 'priority boost' 系统表不再可更新。System tables are no longer updatable. 其设置不起作用。Setting has no effect. 请改用 Windows start /high … program.exe 选项。Use the Windows start /high ... program.exe option instead. sp_configure 'priority boost'sp_configure 'priority boost' 199199
实例选项Instance options sp_configure option 'remote proc trans'sp_configure option 'remote proc trans' 系统表不再可更新。System tables are no longer updatable. 其设置不起作用。Setting has no effect. sp_configure 'remote proc trans'sp_configure 'remote proc trans' 3737
链接服务器Linked servers 对于链接服务器,指定 SQLOLEDB 访问接口。Specifying the SQLOLEDB provider for linked servers. SQL Server Native Client (SQLNCLI)SQL Server Native Client (SQLNCLI) 对于链接服务器使用 SQLOLEDDBSQLOLEDDB for linked servers 1919
锁定Locking sp_locksp_lock sys.dm_tran_lockssys.dm_tran_locks sp_locksp_lock 9999
元数据Metadata FILE_IDFILE_ID

INDEXKEY_PROPERTYINDEXKEY_PROPERTY
FILE_IDEXFILE_IDEX

sys.index_columnssys.index_columns
FILE_IDFILE_ID

INDEXKEY_PROPERTYINDEXKEY_PROPERTY
1515

1717
本机 XML Web 服务Native XML Web Services 带有 FOR SOAP 选项的 CREATE ENDPOINT 或 ALTER ENDPOINT 语句。The CREATE ENDPOINT or ALTER ENDPOINT statement with the FOR SOAP option.

sys.endpoint_webmethodssys.endpoint_webmethods

sys.soap_endpointssys.soap_endpoints
请改用 Windows Communications Foundation (WCF) 或 ASP.NET。Use Windows Communications Foundation (WCF) or ASP.NET instead. CREATE/ALTER ENDPOINTCREATE/ALTER ENDPOINT

sys.endpoint_webmethodssys.endpoint_webmethods

EXT_soap_endpointsEXT_soap_endpoints

sys.soap_endpointssys.soap_endpoints
2121

2222

2323
可删除的数据库Removable databases sp_certify_removablesp_certify_removable

sp_create_removablesp_create_removable
sp_detach_dbsp_detach_db sp_certify_removablesp_certify_removable

sp_create_removablesp_create_removable
7474

7575
可删除的数据库Removable databases sp_dbremovesp_dbremove DROP DATABASEDROP DATABASE sp_dbremovesp_dbremove 7676
安全性Security ALTER LOGIN WITH SET CREDENTIAL 语法The ALTER LOGIN WITH SET CREDENTIAL syntax 由新的 ALTER LOGIN ADD 和 DROP CREDENTIAL 语法取代Replaced by the new ALTER LOGIN ADD and DROP CREDENTIAL syntax ALTER LOGIN WITH SET CREDENTIALALTER LOGIN WITH SET CREDENTIAL 230230
安全性Security sp_addapprolesp_addapprole

sp_dropapprolesp_dropapprole
CREATE APPLICATION ROLECREATE APPLICATION ROLE

DROP APPLICATION ROLEDROP APPLICATION ROLE
sp_addapprolesp_addapprole

sp_dropapprolesp_dropapprole
5353

5454
安全性Security sp_addloginsp_addlogin

sp_droploginsp_droplogin
CREATE LOGINCREATE LOGIN

DROP LOGINDROP LOGIN
sp_addloginsp_addlogin

sp_droploginsp_droplogin
3939

4040
安全性Security sp_addusersp_adduser

sp_dropusersp_dropuser
CREATE USERCREATE USER

DROP USERDROP USER
sp_addusersp_adduser

sp_dropusersp_dropuser
4949

5050
安全性Security sp_grantdbaccesssp_grantdbaccess

sp_revokedbaccesssp_revokedbaccess
CREATE USERCREATE USER

DROP USERDROP USER
sp_grantdbaccesssp_grantdbaccess

sp_revokedbaccesssp_revokedbaccess
5151

5252
安全性Security sp_addrolesp_addrole

sp_droprolesp_droprole
CREATE ROLECREATE ROLE

DROP ROLEDROP ROLE
sp_addrolesp_addrole

sp_droprolesp_droprole
5656

5757
安全性Security sp_approlepasswordsp_approlepassword

sp_passwordsp_password
ALTER APPLICATION ROLEALTER APPLICATION ROLE

ALTER LOGINALTER LOGIN
sp_approlepasswordsp_approlepassword

sp_passwordsp_password
5555

4646
安全性Security sp_changeobjectownersp_changeobjectowner ALTER SCHEMA 或 ALTER AUTHORIZATIONALTER SCHEMA or ALTER AUTHORIZATION sp_changeobjectownersp_changeobjectowner 5858
安全性Security sp_control_dbmasterkey_passwordsp_control_dbmasterkey_password 主密钥必须存在,并且密码必须是正确的。A master key must exist and password must be correct. sp_control_dbmasterkey_passwordsp_control_dbmasterkey_password 274274
安全性Security sp_defaultdbsp_defaultdb

sp_defaultlanguagesp_defaultlanguage
ALTER LOGINALTER LOGIN sp_defaultdbsp_defaultdb

sp_defaultlanguagesp_defaultlanguage
4747

4848
安全性Security sp_denyloginsp_denylogin

sp_grantloginsp_grantlogin

sp_revokeloginsp_revokelogin
ALTER LOGIN DISABLEALTER LOGIN DISABLE

CREATE LOGINCREATE LOGIN

DROP LOGINDROP LOGIN
sp_denyloginsp_denylogin

sp_grantloginsp_grantlogin

sp_revokeloginsp_revokelogin
4242

4141

4343
安全性Security USER_IDUSER_ID DATABASE_PRINCIPAL_IDDATABASE_PRINCIPAL_ID USER_IDUSER_ID 1616
安全性Security sp_srvrolepermissionsp_srvrolepermission

sp_dbfixedrolepermissionsp_dbfixedrolepermission
这些存储过程返回在 SQL Server 2000 (8.x)SQL Server 2000 (8.x)中是正确的信息。These stored procedures return information that was correct in SQL Server 2000 (8.x)SQL Server 2000 (8.x). 该输出不反映在 SQL Server 2008SQL Server 2008中实现的权限层次结构的更改。The output does not reflect changes to the permissions hierarchy implemented in SQL Server 2008SQL Server 2008. 有关详细信息,请参阅 固定服务器角色的权限For more information, see Permissions of Fixed Server Roles. sp_srvrolepermissionsp_srvrolepermission

sp_dbfixedrolepermissionsp_dbfixedrolepermission
6161

6060
安全性Security GRANT ALLGRANT ALL

DENY ALLDENY ALL

REVOKE ALLREVOKE ALL
GRANT、DENY 和 REVOKE 特定权限。GRANT, DENY, and REVOKE specific permissions. ALL 权限ALL Permission 3535
安全性Security PERMISSIONS 内部函数PERMISSIONS intrinsic function 请改为查询 sys.fn_my_permissions。Query sys.fn_my_permissions instead. PERMISSIONSPERMISSIONS 170170
安全性Security SETUSERSETUSER EXECUTE ASEXECUTE AS SETUSERSETUSER 165165
安全性Security RC4 和 DESX 加密算法RC4 and DESX encryption algorithms 请使用其他算法,如 AES。Use another algorithm such as AES. DESX 算法DESX algorithm 238238
SET 选项SET options SET FMTONLYSET FMTONLY sys.dm_exec_describe_first_result_set (Transact-SQL)sys.dm_exec_describe_first_result_set_for_object (Transact-SQL)sp_describe_first_result_set (Transact-SQL)sp_describe_undeclared_parameters (Transact-SQL)sys.dm_exec_describe_first_result_set (Transact-SQL), sys.dm_exec_describe_first_result_set_for_object (Transact-SQL), sp_describe_first_result_set (Transact-SQL), and sp_describe_undeclared_parameters (Transact-SQL). SET FMTONLYSET FMTONLY 250250
服务器配置选项Server Configuration Options c2 审核选项c2 audit option

default trace enabled 选项default trace enabled option
启用了通用准则合规性的服务器配置选项common criteria compliance enabled Server Configuration Option

扩展事件Extended Events
sp_configure 'c2 audit mode'sp_configure 'c2 audit mode'

sp_configure 'default trace enabled'sp_configure 'default trace enabled'
252252

253253
SMO 类SMO classes Microsoft.SQLServer.Management.Smo.InformationMicrosoft.SQLServer. Management.Smo.Information class

Microsoft.SQLServer.Management.Smo.SettingsMicrosoft.SQLServer. Management.Smo.Settings class

Microsoft.SQLServer.Management.Smo.DatabaseOptionsMicrosoft.SQLServer.Management. Smo.DatabaseOptions class

Microsoft.SqlServer.Management.Smo.DatabaseDdlTrigger.NotForReplication 属性Microsoft.SqlServer.Management.Smo. DatabaseDdlTrigger.NotForReplication property
Microsoft.SqlServer.Management.Smo.ServerMicrosoft.SqlServer. Management.Smo.Server class

Microsoft.SqlServer.Management.Smo.ServerMicrosoft.SqlServer. Management.Smo.Server class

Microsoft.SqlServer.Management.Smo.DatabaseMicrosoft.SqlServer. Management.Smo.Database class

None
None None
SQL Server 代理SQL Server Agent net send 通知net send notification

寻呼通知Pager notification
电子邮件通知E-mail notification

电子邮件通知E-mail notification
None None
SQL Server Management StudioSQL Server Management Studio 解决方案资源管理器集成到 SQL Server Management StudioSQL Server Management StudioSolution Explorer integration in SQL Server Management StudioSQL Server Management Studio None None
系统存储过程System Stored Procedures sp_db_increased_partitionssp_db_increased_partitions 无。None. 默认情况下, SQL Server 2019 (15.x)SQL Server 2019 (15.x)提供了对增加的分区的支持。Support for increased partitions is available by default in SQL Server 2019 (15.x)SQL Server 2019 (15.x). sp_db_increased_partitionssp_db_increased_partitions 253253
系统表System tables sysaltfilessysaltfiles

syscacheobjectssyscacheobjects

syscolumnssyscolumns

syscommentssyscomments

sysconfiguressysconfigures

sysconstraintssysconstraints

syscurconfigssyscurconfigs

sysdatabasessysdatabases

sysdependssysdepends

sysdevicessysdevices

sysfilegroupssysfilegroups

sysfilessysfiles

sysforeignkeyssysforeignkeys

sysfulltextcatalogssysfulltextcatalogs

sysindexessysindexes

sysindexkeyssysindexkeys

syslockinfosyslockinfo

sysloginssyslogins

sysmemberssysmembers

sysmessagessysmessages

sysobjectssysobjects

sysoledbuserssysoledbusers

sysopentapessysopentapes

sysperfinfosysperfinfo

syspermissionssyspermissions

sysprocessessysprocesses

sysprotectssysprotects

sysreferencessysreferences

sysremoteloginssysremotelogins

sysserverssysservers

systypessystypes

sysuserssysusers
兼容性视图。Compatibility views. 有关详细信息,请参阅兼容性视图 (Transact-SQL)For more information, see Compatibility Views (Transact-SQL).

重要提示: 兼容性视图不公开 SQL Server 2005 (9.x)SQL Server 2005 (9.x) 中引入功能的元数据。Important: The compatibility views do not expose metadata for features that were introduced in SQL Server 2005 (9.x)SQL Server 2005 (9.x). 建议将应用程序升级为使用目录视图。We recommend that you upgrade your applications to use catalog views. 有关详细信息,请参阅目录视图 (Transact-SQL)For more information, see Catalog Views (Transact-SQL).
sysaltfilessysaltfiles

syscacheobjectssyscacheobjects

syscolumnssyscolumns

syscommentssyscomments

sysconfiguressysconfigures

sysconstraintssysconstraints

syscurconfigssyscurconfigs

sysdatabasessysdatabases

sysdependssysdepends

sysdevicessysdevices

sysfilegroupssysfilegroups

sysfilessysfiles

sysforeignkeyssysforeignkeys

sysfulltextcatalogssysfulltextcatalogs

sysindexessysindexes

sysindexkeyssysindexkeys

syslockinfosyslockinfo

sysloginssyslogins

sysmemberssysmembers

sysmessagessysmessages

sysobjectssysobjects

sysoledbuserssysoledbusers

sysopentapessysopentapes

sysperfinfosysperfinfo

syspermissionssyspermissions

sysprocessessysprocesses

sysprotectssysprotects

sysreferencessysreferences

sysremoteloginssysremotelogins

sysserverssysservers

systypessystypes

sysuserssysusers
141141

None

133133

126126

146146

131131

147147

142142

123123

144144

128128

127127

130130

122122

132132

134134

143143

140140

119119

137137

125125

139139

145145

157157

121121

153153

120120

129129

138138

136136

135135

124124
系统表System tables sys.numbered_proceduressys.numbered_procedures

sys.numbered_procedure_parameterssys.numbered_procedure_parameters
None numbered_proceduresnumbered_procedures

numbered_procedure_parametersnumbered_procedure_parameters
148148

149149
系统函数System functions fn_virtualservernodesfn_virtualservernodes

fn_servershareddrivesfn_servershareddrives
sys.dm_os_cluster_nodessys.dm_os_cluster_nodes

sys.dm_io_cluster_shared_drivessys.dm_io_cluster_shared_drives
fn_virtualservernodesfn_virtualservernodes

fn_servershareddrivesfn_servershareddrives
155155

156156
系统视图System views sys.sql_dependenciessys.sql_dependencies sys.sql_expression_dependenciessys.sql_expression_dependencies sys.sql_dependenciessys.sql_dependencies 198198
表压缩Table compression vardecimal 存储格式的使用。The use of the vardecimal storage format. 不推荐使用 Vardecimal 存储格式。Vardecimal storage format is deprecated. SQL Server 2019 (15.x)SQL Server 2019 (15.x) 提供的数据压缩功能可以压缩十进制值和其他数据类型的值。data compression, compresses decimal values as well as other data types. 建议您使用数据压缩,而不使用 vardecimal 存储格式。We recommend that you use data compression instead of the vardecimal storage format. vardecimal 存储格式Vardecimal storage format 200200
表压缩Table compression sp_db_vardecimal_storage_format 过程的使用。Use of the sp_db_vardecimal_storage_format procedure. 不推荐使用 Vardecimal 存储格式。Vardecimal storage format is deprecated. SQL Server 2019 (15.x)SQL Server 2019 (15.x) 提供的数据压缩功能可以压缩十进制值和其他数据类型的值。data compression, compresses decimal values as well as other data types. 建议您使用数据压缩,而不使用 vardecimal 存储格式。We recommend that you use data compression instead of the vardecimal storage format. sp_db_vardecimal_storage_formatsp_db_vardecimal_storage_format 201201
表压缩Table compression sp_estimated_rowsize_reduction_for_vardecimal 过程的使用。Use of the sp_estimated_rowsize_reduction_for_vardecimal procedure. 请改用数据压缩和 sp_estimate_data_compression_savings 过程。Use data compression and the sp_estimate_data_compression_savings procedure instead. sp_estimated_rowsize_reduction_for_vardecimalsp_estimated_rowsize_reduction_for_vardecimal 202202
表提示Table hints 在 UPDATE 或 DELETE 语句的 FROM 子句中指定 NOLOCK 或 READUNCOMMITTED。Specifying NOLOCK or READUNCOMMITTED in the FROM clause of an UPDATE or DELETE statement. 请从 FROM 子句中删除 NOLOCK 或 READUNCOMMITTED 表提示。Remove the NOLOCK or READUNCOMMITTED table hints from the FROM clause. UPDATE 或 DELETE 中的 NOLOCK 或 READUNCOMMITTEDNOLOCK or READUNCOMMITTED in UPDATE or DELETE 11
表提示Table hints 不借助 WITH 关键字指定表提示。Specifying table hints without using the WITH keyword. 使用 WITH。Use WITH. 不带 WITH 的表提示Table hint without WITH 88
表提示Table hints INSERT_HINTSINSERT_HINTS INSERT_HINTSINSERT_HINTS 3434
TextpointersTextpointers WRITETEXTWRITETEXT

UPDATETEXTUPDATETEXT

READTEXTREADTEXT
None UPDATETEXT 或 WRITETEXTUPDATETEXT or WRITETEXT

READTEXTREADTEXT
115115

114114
TextpointersTextpointers TEXTPTR()TEXTPTR()

TEXTVALID()TEXTVALID()
None TEXTPTRTEXTPTR

TEXTVALIDTEXTVALID
55

66
Transact-SQLTransact-SQL :: 函数调用序列:: function-calling sequence 替换为 SELECT column_list FROM sys.<function_name>()。Replaced by SELECT column_list FROM sys.<function_name>().

例如,将 SELECT * FROM ::fn_virtualfilestats(2,1)替换为 SELECT * FROM sys.fn_virtualfilestats(2,1)For example, replace SELECT * FROM ::fn_virtualfilestats(2,1)with SELECT * FROM sys.fn_virtualfilestats(2,1).
“::”函数调用语法'::' function calling syntax 166166
Transact-SQLTransact-SQL 由三部分和四部分组成的列引用。Three-part and four-part column references. 由两部分组成的名称是符合标准的行为。Two-part names is the standard-compliant behavior. 两个以上的部分构成的列名称More than two-part column name 33
Transact-SQLTransact-SQL 用引号引起来的字符串用作 SELECT 列表中表达式的列别名:A string enclosed in quotation marks used as a column alias for an expression in a SELECT list:

'string_alias' = expression'string_alias' = expression
expression [AS] column_aliasexpression [AS] column_alias

expression [AS] [column_alias]expression [AS] [column_alias]

expression [AS] "column_alias"expression [AS] "column_alias"

expression [AS] 'column_alias'expression [AS] 'column_alias'

column_alias = expressioncolumn_alias = expression
字符串文字作为列别名String literals as column aliases 184184
Transact-SQLTransact-SQL 编号过程Numbered procedures 无。None. 请勿使用。Do not use. ProcNumsProcNums 160160
Transact-SQLTransact-SQL 在 DROP INDEX 中使用table_name.index_name 语法table_name.index_name syntax in DROP INDEX 在 DROP INDEX 中使用index_name ON table_name 语法。index_name ON table_name syntax in DROP INDEX. DROP INDEX 具有两部分构成的名称DROP INDEX with two-part name 163163
Transact-SQLTransact-SQL 不使用分号结束 Transact-SQLTransact-SQL 语句。Not ending Transact-SQLTransact-SQL statements with a semicolon. 使用分号 ( ; ) 结束 Transact-SQLTransact-SQL 语句。End Transact-SQLTransact-SQL statements with a semicolon ( ; ). None None
Transact-SQLTransact-SQL GROUP BY ALLGROUP BY ALL 将自定义逐案例解决方案与 UNION 或派生表配合使用。Use custom case-by-case solution with UNION or derived table. GROUP BY ALLGROUP BY ALL 169169
Transact-SQLTransact-SQL ROWGUIDCOL 在 DML 语句中用作列名。ROWGUIDCOL as a column name in DML statements. 请使用 $rowguid。Use $rowguid. ROWGUIDCOLROWGUIDCOL 182182
Transact-SQLTransact-SQL IDENTITYCOL 在 DML 语句中用作列名。IDENTITYCOL as a column name in DML statements. 请使用 $identity。Use $identity. IDENTITYCOLIDENTITYCOL 183183
Transact-SQLTransact-SQL 将 #、## 用作临时表和临时存储过程名称。Use of #, ## as temporary table and temporary stored procedure names. 请至少使用一个其他字符。Use at least one additional character. “#”和“##”作为临时表和存储过程的名称'#' and '##' as the name of temporary tables and stored procedures 185185
Transact-SQLTransact-SQL 将 @、@@ 或 @@ 用作 Transact-SQLTransact-SQL 标识符。Use of @, @@, or @@ as Transact-SQLTransact-SQL identifiers. 请勿使用 @ 或 @@ 或以 @@ 开头的名称作为标识符。Do not use @ or @@ or names that begin with @@ as identifiers. “@”和以“@@”开头的名称作为 Transact-SQLTransact-SQL 标识符'@' and names that start with '@@' as Transact-SQLTransact-SQL identifiers 186.186.
Transact-SQLTransact-SQL 将 DEFAULT 关键字用作默认值。Use of DEFAULT keyword as default value. 不要将单词 DEFAULT 用作默认值。Do not use the word DEFAULT as a default value. DEFAULT 关键字作为默认值DEFAULT keyword as a default value 187187
Transact-SQLTransact-SQL 将空格用作表提示之间的分隔符。Use of a space as a separator between table hints. 使用逗号分隔各个表提示。Use a comma to separate table hints. 没有逗号的多个表提示Multiple table hints without comma 168168
Transact-SQLTransact-SQL 聚合索引视图的选择列表在 90 兼容模式下必须包含 COUNT_BIG (*)The select list of an aggregate indexed view must contain COUNT_BIG (*) in 90 compatibility mode 请使用 COUNT_BIG (*)。Use COUNT_BIG (*). 不包含 COUNT_BIG(*) 的索引视图选择列表Index view select list without COUNT_BIG(*) 22
Transact-SQLTransact-SQL 表提示通过视图间接应用于多语句表值函数 (TVF) 的调用。The indirect application of table hints to an invocation of a multi-statement table-valued function (TVF) through a view. 无。None. 间接 TVF 提示Indirect TVF hints 77
Transact-SQLTransact-SQL ALTER DATABASE 语法:ALTER DATABASE syntax:

MODIFY FILEGROUP READONLYMODIFY FILEGROUP READONLY

MODIFY FILEGROUP READWRITEMODIFY FILEGROUP READWRITE
MODIFY FILEGROUP READ_ONLYMODIFY FILEGROUP READ_ONLY

MODIFY FILEGROUP READ_WRITEMODIFY FILEGROUP READ_WRITE
MODIFY FILEGROUP READONLYMODIFY FILEGROUP READONLY

MODIFY FILEGROUP READWRITEMODIFY FILEGROUP READWRITE
195195

196196
其他Other DB-LibraryDB-Library

用于 C 语言的嵌入式 SQLEmbedded SQL for C
尽管 数据库引擎Database Engine 仍然支持来自使用 DB-Library 和嵌入式 SQL API 的现有应用程序的连接,但它不包括在使用这些 API 的应用程序上进行编程工作所需的文件或文档。Although the 数据库引擎Database Engine still supports connections from existing applications that use the DB-Library and Embedded SQL APIs, it does not include the files or documentation required to do programming work on applications that use these APIs. SQL Server 数据库引擎SQL Server Database Engine 的未来版本将不再支持来自 DB-Library 或嵌入式 SQL 应用程序的连接。A future version of the SQL Server 数据库引擎SQL Server Database Engine will drop support for connections from DB-Library or Embedded SQL applications. 请不要使用 DB-Library 或嵌入式 SQL 来开发新的应用程序。Do not use DB-Library or Embedded SQL to develop new applications. 修改现有应用程序时,请删除 DB-Library 或嵌入式 SQL 的任何依赖项。Remove any dependencies on either DB-Library or Embedded SQL when you are modifying existing applications. 请使用 SQLClient 命名空间或诸如 ODBC 的 API,而不使用这些 API。Instead of these APIs, use the SQLClient namespace or an API such as ODBC. SQL Server 2019 (15.x)SQL Server 2019 (15.x) 不包含运行这些应用程序所需的 DB-Library DLL。does not include the DB-Library DLL required to run these applications. 若要运行 DB-Library 或嵌入式 SQL 应用程序,必须有 SQL ServerSQL Server 6.5 版、 SQL ServerSQL Server 7.0 版或 SQL Server 2000 (8.x)SQL Server 2000 (8.x)提供的 DB-Library DLL。To run DB-Library or Embedded SQL applications, you must have available the DB-Library DLL from SQL ServerSQL Server version 6.5, SQL ServerSQL Server 7.0, or SQL Server 2000 (8.x)SQL Server 2000 (8.x). None None
工具Tools SQL Server Profiler for Trace CaptureSQL Server Profiler for Trace Capture 使用 SQL Server Management Studio 中嵌入的扩展事件探查器。Use Extended Events Profiler embedded in SQL Server Management Studio. SQL Server ProfilerSQL Server Profiler None
工具Tools SQL Server Profiler for Trace ReplaySQL Server Profiler for Trace Replay SQL Server 分布式重播SQL Server Distributed Replay SQL Server ProfilerSQL Server Profiler None
跟踪管理对象Trace Management Objects Microsoft.SqlServer.Management.Trace 命名空间(包含用于 SQL Server 跟踪和重播对象的 API)Microsoft.SqlServer.Management.Trace namespace (contains the APIs for SQL Server Trace and Replay objects) 跟踪配置: Microsoft.SqlServer.Management.XEventTrace Configuration: Microsoft.SqlServer.Management.XEvent

跟踪读取: Microsoft.SqlServer.XEvent.LinqTrace Reading: Microsoft.SqlServer.XEvent.Linq

跟踪重播:无Trace Replay: None
SQL 跟踪存储过程、函数和目录视图SQL Trace stored procedures, functions, and catalog views sp_trace_createsp_trace_create

sp_trace_seteventsp_trace_setevent

sp_trace_setfiltersp_trace_setfilter

sp_trace_setstatussp_trace_setstatus

fn_trace_geteventinfofn_trace_geteventinfo

fn_trace_getfilterinfofn_trace_getfilterinfo

fn_trace_getinfofn_trace_getinfo

fn_trace_gettablefn_trace_gettable

sys.tracessys.traces

sys.trace_eventssys.trace_events

sys.trace_event_bindingssys.trace_event_bindings

sys.trace_categoriessys.trace_categories

sys.trace_columnssys.trace_columns

sys.trace_subclass_valuessys.trace_subclass_values
扩展事件Extended Events sp_trace_createsp_trace_create

sp_trace_seteventsp_trace_setevent

sp_trace_setfiltersp_trace_setfilter

sp_trace_setstatussp_trace_setstatus

fn_trace_geteventinfofn_trace_geteventinfo

fn_trace_getfilterinfofn_trace_getfilterinfo

fn_trace_getinfofn_trace_getinfo

fn_trace_gettablefn_trace_gettable

sys.tracessys.traces

sys.trace_eventssys.trace_events

sys.trace_event_bindingssys.trace_event_bindings

sys.trace_categoriessys.trace_categories

sys.trace_columnssys.trace_columns

sys.trace_subclass_valuessys.trace_subclass_values
258258

260260

261261

259259

256256

257257
SET 选项Set options 适用于SET ROWCOUNTINSERT, UPDATE语句的 DELETESET ROWCOUNT for INSERT, UPDATE, and DELETE statements TOP 关键字TOP keyword SET ROWCOUNTSET ROWCOUNT 109109

备注

sp_setapprole 的 cookie OUTPUT 参数现记载为 varbinary(8000) ,这是正确的最大长度。The cookie OUTPUT parameter for sp_setapprole is currently documented as varbinary(8000) which is the correct maximum length. 但是,目前执行返回 varbinary(50)However the current implementation returns varbinary(50). 如果开发人员已分配 varbinary(50) ,当 cookie 在将来的版本中返回大小增量时,应用程序可能需要更改。If developers have allocated varbinary(50) the application might require changes if the cookie return size increases in a future release. 尽管这不是不推荐使用的问题,但本主题中提到了,因为应用程序调整都是类似的。Though not a deprecation issue this is mentioned in this topic because the application adjustments are similar. 有关详细信息,请参阅 sp_setapprole (Transact-SQL)For more information, see sp_setapprole (Transact-SQL).

另请参阅See Also

SQL Server 2016 中废止的数据库引擎功能 Discontinued Database Engine Functionality in SQL Server 2016
SQL Server 2017 中弃用的数据库引擎功能Deprecated Database Engine Features in SQL Server 2017