前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >.Net程序连接SQL Server默认会话选项备查

.Net程序连接SQL Server默认会话选项备查

作者头像
AhDung
发布2021-01-06 17:44:49
5530
发布2021-01-06 17:44:49
举报
文章被收录于专栏:AhDung

尝试环境:.netfx2.0~4.8、.net core 3.1~5.0、SQL Server 2008 R2 SP1,发现.net版本之间及数据兼容模式如何设置没差异。

Flag

Name

Value

Description

1

DISABLE_DEF_CNST_CHK

Controls interim or deferred constraint checking.

2

IMPLICIT_TRANSACTIONS

For dblib network library connections, controls whether a transaction is started implicitly when a statement is executed. The IMPLICIT_TRANSACTIONS setting has no effect on ODBC or OLEDB connections.

4

CURSOR_CLOSE_ON_COMMIT

Controls behavior of cursors after a commit operation has been performed.

8

ANSI_WARNINGS

ON

Controls truncation and NULL in aggregate warnings.

16

ANSI_PADDING

ON

Controls padding of fixed-length variables.

32

ANSI_NULLS

ON

Controls NULL handling when using equality operators.

64

ARITHABORT

Terminates a query when an overflow or divide-by-zero error occurs during query execution.

128

ARITHIGNORE

Returns NULL when an overflow or divide-by-zero error occurs during a query.

256

QUOTED_IDENTIFIER

ON

Differentiates between single and double quotation marks when evaluating an expression.

512

NOCOUNT

Turns off the message returned at the end of each statement that states how many rows were affected.

1024

ANSI_NULL_DFLT_ON

ON

Alters the session's behavior to use ANSI compatibility for nullability. New columns defined without explicit nullability are defined to allow nulls.

2048

ANSI_NULL_DFLT_OFF

Alters the session's behavior not to use ANSI compatibility for nullability. New columns defined without explicit nullability do not allow nulls.

4096

CONCAT_NULL_YIELDS_NULL

ON

Returns NULL when concatenating a NULL value with a string.

8192

NUMERIC_ROUNDABORT

Generates an error when a loss of precision occurs in an expression.

16384

XACT_ABORT

Rolls back a transaction if a Transact-SQL statement raises a run-time error.

选项参考:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-statements-transact-sql

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021-01-04 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档