Check for changes to an SQL Server table?

前端 未结 8 1145
有刺的猬
有刺的猬 2020-12-04 08:02

How can I monitor an SQL Server database for changes to a table without using triggers or modifying the structure of the database in any way? My preferred programming enviro

8条回答
  •  我在风中等你
    2020-12-04 08:53

    Unfortunately, I do not think that there is a clean way to do this in SQL2000. If you narrow your requirements to SQL Server 2005 (and later), then you are in business. You can use the SQLDependency class in System.Data.SqlClient. See Query Notifications in SQL Server (ADO.NET).

提交回复
热议问题