开发者

@@OpenCount And DBCC OpenTran

Can you Explain what is difference between this two statement:

1)select @@trancount

2)DBCC opentran

when I Use TransactionScope in C# Statement No.1 return 0 bu开发者_开发问答t No.2 return Result.

when I Use begin Tran in sql server No.1 return 1 but No.2 return nothing.

what is difference between them?


FRom @@TRANCOUNT (Transact-SQL)

Returns the number of BEGIN TRANSACTION statements that have occurred on the current connection.

and from DBCC OPENTRAN (Transact-SQL)

Displays information about the oldest active transaction and the oldest distributed and nondistributed replicated transactions, if any, within the specified database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜