<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>object security &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/object-security/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Fri, 12 May 2017 13:47:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server: Who dropped a table, find out from Transaction Log</title>
		<link>https://www.dbrnd.com/2017/05/sql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 24 May 2017 16:16:56 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[drop table]]></category>
		<category><![CDATA[fn_dblog()]]></category>
		<category><![CDATA[object security]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[transaction log]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5288</guid>

					<description><![CDATA[<div><img width="600" height="600" src="https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase.png" class="attachment-post-image size-post-image wp-post-image" alt="DropTableDatabase" decoding="async" fetchpriority="high" srcset="https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase.png 600w, https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase-65x65.png 65w" sizes="(max-width: 600px) 100vw, 600px" /></div>In this post, I am sharing few steps to find out the transactions history for drop commands which executed in SQL Server. There are many features for auditing and check the logging in SQL Server, but you can also directly read the transaction log and can get the necessary details. Please check the below full [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="600" height="600" src="https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase.png" class="attachment-post-image size-post-image wp-post-image" alt="DropTableDatabase" decoding="async" srcset="https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase.png 600w, https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2017/05/DropTableDatabase-65x65.png 65w" sizes="(max-width: 600px) 100vw, 600px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F05%2Fsql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20table%2C%20find%20out%20from%20Transaction%20Log" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F05%2Fsql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20table%2C%20find%20out%20from%20Transaction%20Log" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F05%2Fsql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20table%2C%20find%20out%20from%20Transaction%20Log" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F05%2Fsql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20table%2C%20find%20out%20from%20Transaction%20Log" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F05%2Fsql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20table%2C%20find%20out%20from%20Transaction%20Log" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F05%2Fsql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20table%2C%20find%20out%20from%20Transaction%20Log" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F05%2Fsql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog%2F&#038;title=SQL%20Server%3A%20Who%20dropped%20a%20table%2C%20find%20out%20from%20Transaction%20Log" data-a2a-url="https://www.dbrnd.com/2017/05/sql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog/" data-a2a-title="SQL Server: Who dropped a table, find out from Transaction Log"></a></p><p>In this post, I am sharing few steps to find out the transactions history for drop commands which executed in SQL Server.</p>
<p>There are many features for auditing and check the logging in SQL Server, but you can also directly read the transaction log and can get the necessary details.</p>
<p><strong>Please check the below full demonstration of this:</strong></p>
<p><strong>Create a sample database and use it:</strong><br />
<pre class="crayon-plain-tag">CREATE DATABASE Drop_Test
GO
USE Drop_Test
GO</pre>
<strong>Create a sample table:</strong><br />
<pre class="crayon-plain-tag">CREATE TABLE tbl_Test (ID INT)
GO</pre>
<strong>Check the object id of table and save it:</strong><br />
<pre class="crayon-plain-tag">SELECT OBJECT_ID ('tbl_Test')
GO

--tbl_Test object id: 581577110</pre>
<strong>Now, drop the table:</strong><br />
<pre class="crayon-plain-tag">DROP TABLE tbl_Test
GO</pre>
<strong>Check the transaction id and user of that drop action:</strong><br />
Using below query, you can find only transaction id and username who dropped the objects. Later, you can use a transaction to know which object has been dropped.<br />
<pre class="crayon-plain-tag">SELECT [Transaction Id], [Begin Time], SUSER_SNAME ([Transaction SID]) AS [User]
FROM fn_dblog (NULL, NULL)
WHERE [Transaction Name] = 'DROPOBJ'
GO

-- The Result:
/*
Transaction Id Begin Time User
-------------- ------------------------ ---------
0000:00000335 2017/04/25 17:53:41:187 Anvesh
*/</pre>
<strong>Find out which object has been dropped:</strong><br />
Use above transaction id and see the details of dropped object.<br />
<pre class="crayon-plain-tag">SELECT [Transaction Id], [Begin Time], SUSER_SNAME ([Transaction SID]) AS [User]
FROM fn_dblog (NULL, NULL)
WHERE [Transaction Name] = 'DROPOBJ'
GO

-- The Result:
/*
Transaction Id Begin Time User
-------------- ------------------------ ---------
0000:00000335 2017/04/25 17:53:41:187 Anvesh
*/</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
