sql - 如何在SQL Server 2014中检查事件事务?

标签 sql sql-server-2014

我正在使用SQL Server 2014,想知道如何检查我的 Activity 交易吗?

最佳答案

  • 使用sys.sysprocesses查询
    SELECT * FROM sys.sysprocesses WHERE open_tran = 1
    
  • DBCC OPENTRAN :有助于识别可能阻止日志截断的 Activity 事务。 DBCC OPENTRAN在指定数据库的事务日志中显示有关最早的 Activity 事务以及最早的分布式和非分布式复制事务的信息。仅当日志中存在 Activity 事务或数据库包含复制信息时,才会显示结果。如果日志中没有 Activity 的事务,则会显示引用消息。
  • sys.dm_tran_active_transactions

  • 返回有关SQL Server实例的事务的信息。
    Syntax

    enter image description here

    想知道交易吗?

    A transaction is a single unit of work. If a transaction is successful, all of the data modifications made during the transaction are committed and become a permanent part of the database.



    Find more at docs

    关于sql - 如何在SQL Server 2014中检查事件事务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31958399/

    相关文章:

    c# - Entity Framework ALTER TABLE 语句与 FOREIGN KEY 约束冲突

    sql - 检索行之间特定列不同的行

    sql - 如果字符串是电子邮件格式的,如何从列中提取?

    sql - 它说我没有选择行?

    sql - 如果列已更新,则将变量用于 UPDATE() 检查器

    sql - 如何在 SSRS 中编写条件以根据值动态更改单元格的颜色

    sql - 如何在 SQL Server 中查找数字序列中的空白

    sql-server - SQL Server Management Studio 不允许我向表添加索引

    sql - 在 postgresql 中使用 nanosec 存储时间戳最优雅的方法是什么?

    mysql - 我应该使用哪个 SQL 命令来替换特定值?