<?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/"
		>
<channel>
	<title>Comments on: Reattach Will Reset Database Chaining</title>
	<atom:link href="http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/feed/" rel="self" type="application/rss+xml" />
	<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/</link>
	<description></description>
	<lastBuildDate>Tue, 22 May 2012 14:55:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: John Sansom</title>
		<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/comment-page-1/#comment-868</link>
		<dc:creator>John Sansom</dc:creator>
		<pubDate>Wed, 12 Aug 2009 20:28:32 +0000</pubDate>
		<guid isPermaLink="false">http://thomaslarock.com/?p=2573#comment-868</guid>
		<description>Ah yes I have seen this cheeky little issue before too when working with log shipping. This was when I was working on a project to offload reporting from a production server.

When setting up the secondary server (in standby mode) I restored the database from a backup of the primary and in doing so noticed that the CLR capabilities could not be accessed. This was because the TRUSTWORTHY database property was being reset to the default of false on the secondary database in spite of the property being set to true on the primary.

Of course the only way to change the property on the secondary was by bringing the database online which in turn breaks the log shipping configuration. In time a more robust Replication solution was devised and proved to be more suitable in this particular scenario but still, this is a sneaky little issue.</description>
		<content:encoded><![CDATA[<p>Ah yes I have seen this cheeky little issue before too when working with log shipping. This was when I was working on a project to offload reporting from a production server.</p>
<p>When setting up the secondary server (in standby mode) I restored the database from a backup of the primary and in doing so noticed that the CLR capabilities could not be accessed. This was because the TRUSTWORTHY database property was being reset to the default of false on the secondary database in spite of the property being set to true on the primary.</p>
<p>Of course the only way to change the property on the secondary was by bringing the database online which in turn breaks the log shipping configuration. In time a more robust Replication solution was devised and proved to be more suitable in this particular scenario but still, this is a sneaky little issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buck Woody</title>
		<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/comment-page-1/#comment-867</link>
		<dc:creator>Buck Woody</dc:creator>
		<pubDate>Wed, 12 Aug 2009 20:28:17 +0000</pubDate>
		<guid isPermaLink="false">http://thomaslarock.com/?p=2573#comment-867</guid>
		<description>Thomas - I&#039;m sure there would be a way to do that. The only issue, I think, would be not just the DBID, but then all of the security account GUIDS as well. And you couldn&#039;t really key off of the database name to re-establish the chains and so on, because you can re-name the database in-flight. So if you don&#039;t have the ID to match up against, and you can&#039;t rely on the database names to re-tie everything, I&#039;m not sure what other attribute to use to keep those options handy.

I think the point is that it is something to keep in mind when moving or restoring a database. My suspicion is that there are possibly other security related issues to keep in mind as well, such as orphanded users, certificates, aliases and so on.

Thanks -

Buck</description>
		<content:encoded><![CDATA[<p>Thomas &#8211; I&#8217;m sure there would be a way to do that. The only issue, I think, would be not just the DBID, but then all of the security account GUIDS as well. And you couldn&#8217;t really key off of the database name to re-establish the chains and so on, because you can re-name the database in-flight. So if you don&#8217;t have the ID to match up against, and you can&#8217;t rely on the database names to re-tie everything, I&#8217;m not sure what other attribute to use to keep those options handy.</p>
<p>I think the point is that it is something to keep in mind when moving or restoring a database. My suspicion is that there are possibly other security related issues to keep in mind as well, such as orphanded users, certificates, aliases and so on.</p>
<p>Thanks -</p>
<p>Buck</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pankaj</title>
		<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/comment-page-1/#comment-866</link>
		<dc:creator>Pankaj</dc:creator>
		<pubDate>Wed, 12 Aug 2009 19:56:08 +0000</pubDate>
		<guid isPermaLink="false">http://thomaslarock.com/?p=2573#comment-866</guid>
		<description>Thank You Tom for putting this info as a blog and giving us more insight to it.</description>
		<content:encoded><![CDATA[<p>Thank You Tom for putting this info as a blog and giving us more insight to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas LaRock</title>
		<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/comment-page-1/#comment-865</link>
		<dc:creator>Thomas LaRock</dc:creator>
		<pubDate>Wed, 12 Aug 2009 19:20:45 +0000</pubDate>
		<guid isPermaLink="false">http://thomaslarock.com/?p=2573#comment-865</guid>
		<description>to be fair, i did a backup, dropped the database, then did a restore and found it reset. so, as buck mentions, it could be a result of the new db id.

i just did another test. i enabled the options, did a dump, disabled the options, did a restore, and found the options disabled.

i then enabled the options and did a restore to the dump i had just taken, and the options were still enabled.

i did not drop the database, so it would appear that whatever the options are set to for that db id, the options will persist for a same-server restore. i would expect that if you were recovering in the event of a disaster the options would persist for you as well. but if you are restoring to a different server then you would probably need to remember to have these enabled.

all the more reason to be capturing the info in the sysdatabases tables every night, i guess.</description>
		<content:encoded><![CDATA[<p>to be fair, i did a backup, dropped the database, then did a restore and found it reset. so, as buck mentions, it could be a result of the new db id.</p>
<p>i just did another test. i enabled the options, did a dump, disabled the options, did a restore, and found the options disabled.</p>
<p>i then enabled the options and did a restore to the dump i had just taken, and the options were still enabled.</p>
<p>i did not drop the database, so it would appear that whatever the options are set to for that db id, the options will persist for a same-server restore. i would expect that if you were recovering in the event of a disaster the options would persist for you as well. but if you are restoring to a different server then you would probably need to remember to have these enabled.</p>
<p>all the more reason to be capturing the info in the sysdatabases tables every night, i guess.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack Corbett</title>
		<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/comment-page-1/#comment-864</link>
		<dc:creator>Jack Corbett</dc:creator>
		<pubDate>Wed, 12 Aug 2009 18:37:15 +0000</pubDate>
		<guid isPermaLink="false">http://thomaslarock.com/?p=2573#comment-864</guid>
		<description>I&#039;m not sure that the detach/reattach issue surprises me, but the fact that it gets reset on a restore.  For me the whole point of a restore is so my application(s) will work the same after a disaster.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure that the detach/reattach issue surprises me, but the fact that it gets reset on a restore.  For me the whole point of a restore is so my application(s) will work the same after a disaster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas LaRock</title>
		<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/comment-page-1/#comment-863</link>
		<dc:creator>Thomas LaRock</dc:creator>
		<pubDate>Wed, 12 Aug 2009 18:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://thomaslarock.com/?p=2573#comment-863</guid>
		<description>oh sure...that&#039;s what &lt;em&gt;you&lt;/em&gt; expect. but i expect that if i restore my database that had chaining on originally, that it would remain on after a reattach or restore.

would it not be possible for the attach/restore operation to (1) recognize the option is set and then (2) update the system tables for the new db id?</description>
		<content:encoded><![CDATA[<p>oh sure&#8230;that&#8217;s what <em>you</em> expect. but i expect that if i restore my database that had chaining on originally, that it would remain on after a reattach or restore.</p>
<p>would it not be possible for the attach/restore operation to (1) recognize the option is set and then (2) update the system tables for the new db id?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buck Woody</title>
		<link>http://thomaslarock.com/2009/08/reattach-will-reset-database-chaining/comment-page-1/#comment-862</link>
		<dc:creator>Buck Woody</dc:creator>
		<pubDate>Wed, 12 Aug 2009 16:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://thomaslarock.com/?p=2573#comment-862</guid>
		<description>I would think this has to do with the database ID. I&#039;m sure you don&#039;t get the same ID when you restore/attach/adopt/add in/create a &quot;new&quot; database. Seems to me that ID would be used in system tables for chaining and so on. so to me this makes sense, and is the behavior I would expect.</description>
		<content:encoded><![CDATA[<p>I would think this has to do with the database ID. I&#8217;m sure you don&#8217;t get the same ID when you restore/attach/adopt/add in/create a &#8220;new&#8221; database. Seems to me that ID would be used in system tables for chaining and so on. so to me this makes sense, and is the behavior I would expect.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic
Database Caching 8/18 queries in 0.484 seconds using disk: basic
Object Caching 535/540 objects using disk: basic

Served from: thomaslarock.com @ 2012-05-22 13:00:12 -->
