Share via

IF bulk data got inserted recently

Chaitanya Kiran 841 Reputation points
2021-10-28T09:57:37.117+00:00

I want to know if bulk data got inserted recently in the database. How to check it?

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


2 answers

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,756 Reputation points
    2021-10-29T08:55:46.887+00:00

    Hi @Chaitanya Kiran ,

    Through sys.fn_dblog you can see which operations have been performed recently.
    If you see a large number of consecutive LOP_INSERT_ROWS in the Operation column, and the Transaction ID is the same, then it has a high probability of performing the BULK INSERT operation.
    You can execute the following similar script.

    SELECT * FROM sys.fn_dblog(NULL, NULL) WHERE operation IN ('LOP_INSERT_ROWS');  
    SELECT * FROM sys.fn_dblog(null, null) where [Transaction ID] IN ('0000:00005a8c')  
    

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  2. Erland Sommarskog 134.7K Reputation points MVP Volunteer Moderator
    2021-10-28T21:49:07.767+00:00

    SELECT *? Sorry, with the minimal context you give you in your question, the answer will be equally minimal.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.