<?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>CDC &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/cdc/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>Tue, 13 Dec 2016 20:16:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: Who dropped a Table and Which Table has been dropped</title>
		<link>https://www.dbrnd.com/2016/12/sql-server-who-dropped-a-table-and-which-table-has-been-dropped/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 12 Dec 2016 20:14:17 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Audit]]></category>
		<category><![CDATA[CDC]]></category>
		<category><![CDATA[Change data capture]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[DDL Trii]]></category>
		<category><![CDATA[drop]]></category>
		<category><![CDATA[drop table]]></category>
		<category><![CDATA[fn_dblog()]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[transaction log]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[user]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4063</guid>

					<description><![CDATA[SQL Server provides different types of database auditing option like: CDC, Database Audit. Recently, I have shared one article about, change your database DDL changes using Encrypted DDL triggers. SQL Server: Encrypted DDL Trigger to Track all Database Changes Database Administrators are responsible for database security and Periodically, They have to track all the database [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F12%2Fsql-server-who-dropped-a-table-and-which-table-has-been-dropped%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20Table%20and%20Which%20Table%20has%20been%20dropped" 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%2F2016%2F12%2Fsql-server-who-dropped-a-table-and-which-table-has-been-dropped%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20Table%20and%20Which%20Table%20has%20been%20dropped" 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%2F2016%2F12%2Fsql-server-who-dropped-a-table-and-which-table-has-been-dropped%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20Table%20and%20Which%20Table%20has%20been%20dropped" 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%2F2016%2F12%2Fsql-server-who-dropped-a-table-and-which-table-has-been-dropped%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20Table%20and%20Which%20Table%20has%20been%20dropped" 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%2F2016%2F12%2Fsql-server-who-dropped-a-table-and-which-table-has-been-dropped%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20Table%20and%20Which%20Table%20has%20been%20dropped" 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%2F2016%2F12%2Fsql-server-who-dropped-a-table-and-which-table-has-been-dropped%2F&amp;linkname=SQL%20Server%3A%20Who%20dropped%20a%20Table%20and%20Which%20Table%20has%20been%20dropped" 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%2F2016%2F12%2Fsql-server-who-dropped-a-table-and-which-table-has-been-dropped%2F&#038;title=SQL%20Server%3A%20Who%20dropped%20a%20Table%20and%20Which%20Table%20has%20been%20dropped" data-a2a-url="https://www.dbrnd.com/2016/12/sql-server-who-dropped-a-table-and-which-table-has-been-dropped/" data-a2a-title="SQL Server: Who dropped a Table and Which Table has been dropped"></a></p><p>SQL Server provides different types of database auditing option like: CDC, Database Audit.<br />
Recently, I have shared one article about, change your database DDL changes using Encrypted DDL triggers. </p>
<blockquote class="wp-embedded-content" data-secret="0nSvSWs9bx"><p><a href="https://www.dbrnd.com/2016/10/sql-server-encrypted-ddl-trigger-to-track-all-database-changes-to-ensure-database-object-security/">SQL Server: Encrypted DDL Trigger to Track all Database Changes</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/10/sql-server-encrypted-ddl-trigger-to-track-all-database-changes-to-ensure-database-object-security/embed/#?secret=0nSvSWs9bx" data-secret="0nSvSWs9bx" width="600" height="338" title="&#8220;SQL Server: Encrypted DDL Trigger to Track all Database Changes&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote><p>Database Administrators are responsible for database security and Periodically, They have to track all the database related changes and make sure that everything is working fine. </p></blockquote>
<blockquote><p>But still sometimes, I used to track database changes from the SQL Server log files using fn_dblog().<br />
I am sharing one way to find a person who dropped a table and also can get the name of that dropped table without enabling any auditing option of SQL Server.</p></blockquote>
<p><strong>Script to find the log of dropped objects:</strong></p>
<blockquote><p>Using this script, you can find a list of dropped tables and login name information, but you cannot get table name directly.<br />
You can find the transaction id for each record and using this transaction ID, you can find the table name.</p></blockquote>
<pre class="crayon-plain-tag">SELECT 
	[Transaction Id]
	,[Begin Time]
	,SUSER_SNAME ([Transaction SID]) AS [LoginName] 
FROM fn_dblog (NULL, NULL)  
WHERE [Transaction Name] = N'DROPOBJ';</pre> </p>
<p><strong>Find Table name using TransactionID:</strong></p>
<pre class="crayon-plain-tag">SELECT TOP 1 
	[Lock Information] 
FROM fn_dblog (NULL, NULL)  
WHERE [Transaction Id] = '0000:0015d6b3'  
AND [Lock Information] LIKE '%SCH_M OBJECT%';</pre> </p>
<p><strong>The result:</strong><br />
To get the table name, you can copy the number and search into sys.objects table.</p>
<pre class="crayon-plain-tag">HoBt 0:ACQUIRE_LOCK_SCH_M OBJECT: 8:1015674666:0</pre> </p>
<p><strong>Find your dropped table:</strong><br />
Please do not start to search your dropped table in your current database because Table already dropped.<br />
You must restore the last backup of the database and you should search your dropped table in that database. </p>
<pre class="crayon-plain-tag">SELECT *FROM sys.objects 
WHERE Object_ID ='1015674666'</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
