How to Get SQL Logs (UPDATE, INSERT and DELETE)of Specific Table from SQL Server if Query run from Website.

Faizan Ahmed 1 Reputation point
2022-03-17T05:24:08.337+00:00

Hi,

How to Get SQL Logs (UPDATE, INSERT and DELETE)of Specific Table from SQL Server if Query run from Website.
Please Help

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,707 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,799 questions
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,244 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,552 questions
{count} votes

2 answers

Sort by: Most helpful
  1. CathyJi-MSFT 21,091 Reputation points Microsoft Vendor
    2022-03-17T06:14:24.477+00:00

    Hi @Faizan Ahmed ,

    Run SQL server query on website to query data from SQL server table? If so, the operations (UPDATE, INSERT and DELETE) of SQL table are still writed to SQL server transaction log.

    You can use ApexSQL Log is a well-known, 3rd party SQL Server transaction log reader. You can chose the table and operations for table as below screenshot.

    183966-screenshot-2022-03-17-141253.jpg

    Please also check if below blog could help you.

    Reading the transaction log in SQL Server – from hacks to solutions


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

  2. Olaf Helper 40,741 Reputation points
    2022-03-17T06:52:43.893+00:00

    How to Get SQL Logs (UPDATE, INSERT and DELETE)

    What for DML logs, by default there are non, as long as you haven't implemented a logging, e.g. using DML trigger:

    https://learn.microsoft.com/en-us/sql/relational-databases/triggers/dml-triggers?view=sql-server-ver15

    0 comments No comments