<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Recover the Accidentally Renamed Table</title>
	<atom:link href="http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 08:01:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Kevin Burgess</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-421001</link>
		<dc:creator><![CDATA[Kevin Burgess]]></dc:creator>
		<pubDate>Tue, 12 Feb 2013 14:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-421001</guid>
		<description><![CDATA[There is another method that I use on all my production instances.  A DDL trigger fires whenever a DDL action is performed, in this case the renaming of a table.  The results gathered by the trigger are stored in a table that logs the statement including the table name before and after.

This technique works whether a SQL statement is physically typed in or performed in the SSMS with a right mouse click.

The only other solution is to wait until a user tries to do something and fails.  Look at the query and figure out which part is broken, your number 3 I believe.]]></description>
		<content:encoded><![CDATA[<p>There is another method that I use on all my production instances.  A DDL trigger fires whenever a DDL action is performed, in this case the renaming of a table.  The results gathered by the trigger are stored in a table that logs the statement including the table name before and after.</p>
<p>This technique works whether a SQL statement is physically typed in or performed in the SSMS with a right mouse click.</p>
<p>The only other solution is to wait until a user tries to do something and fails.  Look at the query and figure out which part is broken, your number 3 I believe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sarat</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-360715</link>
		<dc:creator><![CDATA[sarat]]></dc:creator>
		<pubDate>Tue, 16 Oct 2012 11:07:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-360715</guid>
		<description><![CDATA[We can view this changes in SQL Server Logs under Management in SSMS.

Regards,
Sarat]]></description>
		<content:encoded><![CDATA[<p>We can view this changes in SQL Server Logs under Management in SSMS.</p>
<p>Regards,<br />
Sarat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mbourgon</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-358189</link>
		<dc:creator><![CDATA[Mbourgon]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 06:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-358189</guid>
		<description><![CDATA[+1 to Imran&#039;s method. You might also be able to recover it from the system_health session. Finally, run something like Event Notifications.]]></description>
		<content:encoded><![CDATA[<p>+1 to Imran&#8217;s method. You might also be able to recover it from the system_health session. Finally, run something like Event Notifications.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Girijesh</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357971</link>
		<dc:creator><![CDATA[Girijesh]]></dc:creator>
		<pubDate>Tue, 09 Oct 2012 16:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357971</guid>
		<description><![CDATA[This can easily identified if we have followed standard in our coding.
For example, if we have created INDEX with naming convention like &#039;IX_TableName_Colms &#039; from here we can easily get the name of the Table before change.

Regards,
Girijesh]]></description>
		<content:encoded><![CDATA[<p>This can easily identified if we have followed standard in our coding.<br />
For example, if we have created INDEX with naming convention like &#8216;IX_TableName_Colms &#8216; from here we can easily get the name of the Table before change.</p>
<p>Regards,<br />
Girijesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varun</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357802</link>
		<dc:creator><![CDATA[Varun]]></dc:creator>
		<pubDate>Tue, 09 Oct 2012 08:55:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357802</guid>
		<description><![CDATA[If we have a change data capture enabled on the DB, then i think we can check  what the Table name was before being renamed]]></description>
		<content:encoded><![CDATA[<p>If we have a change data capture enabled on the DB, then i think we can check  what the Table name was before being renamed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cor Westra</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357763</link>
		<dc:creator><![CDATA[Cor Westra]]></dc:creator>
		<pubDate>Tue, 09 Oct 2012 07:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357763</guid>
		<description><![CDATA[Try your application that works with the database. It might give you an error like &#039;table ... doesn&#039;t exists&#039; in the logfiles.]]></description>
		<content:encoded><![CDATA[<p>Try your application that works with the database. It might give you an error like &#8216;table &#8230; doesn&#8217;t exists&#8217; in the logfiles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nakul Vachhrajani</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357429</link>
		<dc:creator><![CDATA[Nakul Vachhrajani]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 17:23:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357429</guid>
		<description><![CDATA[It was a long time ago, but, I came so close to doing this myself once. With this article handy, there is a chance of recovery if I ever happen to mess things up again.]]></description>
		<content:encoded><![CDATA[<p>It was a long time ago, but, I came so close to doing this myself once. With this article handy, there is a chance of recovery if I ever happen to mess things up again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Willis</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357407</link>
		<dc:creator><![CDATA[Steven Willis]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 16:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357407</guid>
		<description><![CDATA[Use a script like this to list all the tables in the schema then look for the &#039;missing&#039; table:

SELECT
    SUBSTRING(o.name,1,50) AS TableName
FROM
    sysobjects o
ORDER BY
    1 ASC]]></description>
		<content:encoded><![CDATA[<p>Use a script like this to list all the tables in the schema then look for the &#8216;missing&#8217; table:</p>
<p>SELECT<br />
    SUBSTRING(o.name,1,50) AS TableName<br />
FROM<br />
    sysobjects o<br />
ORDER BY<br />
    1 ASC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Soranno</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357390</link>
		<dc:creator><![CDATA[Bill Soranno]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 15:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357390</guid>
		<description><![CDATA[Another option similar to 5 would be to use the Red-Gate tool Sql Compare. Sql Compare can use a backup file as the source. The compare will tell you the differences with out having to actually do the restore. Depending on the size of the database, it will take a while to read thru the backup file to pull out the schema.]]></description>
		<content:encoded><![CDATA[<p>Another option similar to 5 would be to use the Red-Gate tool Sql Compare. Sql Compare can use a backup file as the source. The compare will tell you the differences with out having to actually do the restore. Depending on the size of the database, it will take a while to read thru the backup file to pull out the schema.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Imran</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357336</link>
		<dc:creator><![CDATA[Muhammad Imran]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 13:11:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357336</guid>
		<description><![CDATA[It can also be recoverd from the SQL Server log.

For Example :

SELECT [RowLog Contents 0] FROM    sys.fn_dblog(NULL, NULL) 
WHERE Context IN (&#039;LCX_MARK_AS_GHOST&#039;,&#039;LCX_INDEX_LEAF&#039;) 
AND Operation in (&#039;LOP_DELETE_ROWS&#039;,&#039;LOP_INSERT_ROWS&#039;)  
And AllocUnitId IN (562949955649536) 

And [RowLog Contents 0] need to be decoded and get the before and after renamed table name.

Here is the solution :
http://raresql.com/2012/10/08/sql-server-how-to-recover-the-renamed-table/]]></description>
		<content:encoded><![CDATA[<p>It can also be recoverd from the SQL Server log.</p>
<p>For Example :</p>
<p>SELECT [RowLog Contents 0] FROM    sys.fn_dblog(NULL, NULL)<br />
WHERE Context IN (&#8216;LCX_MARK_AS_GHOST&#8217;,'LCX_INDEX_LEAF&#8217;)<br />
AND Operation in (&#8216;LOP_DELETE_ROWS&#8217;,'LOP_INSERT_ROWS&#8217;)<br />
And AllocUnitId IN (562949955649536) </p>
<p>And [RowLog Contents 0] need to be decoded and get the before and after renamed table name.</p>
<p>Here is the solution :<br />
<a href="http://raresql.com/2012/10/08/sql-server-how-to-recover-the-renamed-table/" rel="nofollow">http://raresql.com/2012/10/08/sql-server-how-to-recover-the-renamed-table/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dba</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357316</link>
		<dc:creator><![CDATA[dba]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 12:15:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357316</guid>
		<description><![CDATA[I have a old Backup . N i am going to restore to different instance there already some data store. So ti will be give me same table or not?]]></description>
		<content:encoded><![CDATA[<p>I have a old Backup . N i am going to restore to different instance there already some data store. So ti will be give me same table or not?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357288</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 11:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357288</guid>
		<description><![CDATA[Yeah that is method 3.]]></description>
		<content:encoded><![CDATA[<p>Yeah that is method 3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357287</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 11:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357287</guid>
		<description><![CDATA[Yeah that is Method 5.]]></description>
		<content:encoded><![CDATA[<p>Yeah that is Method 5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashutosh Kanodia</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357205</link>
		<dc:creator><![CDATA[Ashutosh Kanodia]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 06:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357205</guid>
		<description><![CDATA[User can refer the queries in which he/she thinks might have used that table and find the missing entry in the database i.e., table name present in query but not in database.]]></description>
		<content:encoded><![CDATA[<p>User can refer the queries in which he/she thinks might have used that table and find the missing entry in the database i.e., table name present in query but not in database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hardy21</title>
		<link>http://blog.sqlauthority.com/2012/10/08/sql-server-recover-the-accidentally-renamed-table/#comment-357156</link>
		<dc:creator><![CDATA[Hardy21]]></dc:creator>
		<pubDate>Mon, 08 Oct 2012 03:57:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21051#comment-357156</guid>
		<description><![CDATA[If we have latest (full + differential + log) backup, restore it to some different instance (or on same instance with different database name) and do the schema comparision. This will give the difference of table name.]]></description>
		<content:encoded><![CDATA[<p>If we have latest (full + differential + log) backup, restore it to some different instance (or on same instance with different database name) and do the schema comparision. This will give the difference of table name.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
