SQL Server: How to retrieve last 12 hours of logs using fn_dblog?
<p>Having accidentally nullified a column in MS SQL 2012, I'm looking at how to use fn_dblog for the first time. I had previously backed up the table, and deleted it this morning. I am using full recovery mode (code below for anyone in the future who would like to find out):</p>

<pre><code>SELECT name, recovery_model_desc  
   FROM sys.databases  
      WHERE name = 'model' ;  
GO
</code></pre>

<p>Is it possible to rollback a DROP TABLE transaction that was committed within the past 12 hours?</p>

<p>I found this transaction which seems to be exactly what I want. But only the last 3431 rows are found:</p>

<pre><code>SELECT [Current LSN],
       [Operation],
       [Transaction ID],
       [Parent Transaction ID],
       [Begin Time],
       [Transaction Name],
       [Transaction SID]
FROM fn_dblog(NULL, NULL)
WHERE [Operation] = 'LOP_BEGIN_XACT'
</code></pre>

<p>How can I return earlier transactions using this query?</p>

<p>I am in unfamiliar territory here. What else should I be thinking of?</p>

<ul>
<li>How do I know if logs exist and haven't been truncated?</li>
<li>Is it easier to reinstate a table vs a column deletion?</li>
<li><p>What are the dangers of using fn_fblog? On a blog post I found this (<a href="https://raresql.com/2013/04/15/sql-server-undocumented-function-fn_dblog/" rel="nofollow">https://raresql.com/2013/04/15/sql-server-undocumented-function-fn_dblog/</a>):</p>

<p>"No doubt fn_dblog is one of the helpful undocumented functions but do not use this function in the production server unless otherwise required." What is the reason for this?</p></li>
</ul>

<p>=== EDIT ===</p>

<p>On a side note, a very helpful article is here:
A very helpful introduction to MS SQL logging:
<a href="http://www.sqlshack.com/reading-sql-server-transaction-log/" rel="nofollow">http://www.sqlshack.com/reading-sql-server-transaction-log/</a></p>