<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Doug's Oracle Blog (Entries tagged as Database Refresh)</title>
    <link>http://oracledoug.com/serendipity/</link>
    <description></description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:doug@oracledoug.com" />
    <generator>Serendipity 1.5.2 - http://www.s9y.org/</generator>
    <managingEditor>Doug Burns</managingEditor>
<webMaster>Doug Burns</webMaster>
<pubDate>Thu, 11 Jun 2009 03:04:01 GMT</pubDate>

    <image>
        <url>http://oracledoug.com/serendipity/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Doug's Oracle Blog - </title>
        <link>http://oracledoug.com/serendipity/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Full Volume Database Refresh - Part 4</title>
    <link>http://oracledoug.com/serendipity/index.php?/archives/1312-Full-Volume-Database-Refresh-Part-4.html</link>
    
    <comments>http://oracledoug.com/serendipity/index.php?/archives/1312-Full-Volume-Database-Refresh-Part-4.html#comments</comments>
    <wfw:comment>http://oracledoug.com/serendipity/wfwcomment.php?cid=1312</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://oracledoug.com/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=1312</wfw:commentRss>
    

    <author>dougburns@yahoo.com (Doug Burns)</author>
    <content:encoded>
    As a post-script to &lt;a href=&quot;http://oracledoug.com/serendipity/index.php?/archives/1306-Full-Volume-Database-Refresh-Part-3.html&quot;&gt;the earlier blogs&lt;/a&gt;, &lt;a href=&quot;http://www.battleagainstanyguess.com/&quot;&gt;Alex Gorbachev&lt;/a&gt; suggested a link to his UKOUG 2006 presentation in this area might prove useful and I agree. So &lt;a href=&quot;http://www.pythian.com/documents/UKOUG06-Refreshes.ppt&quot;&gt;here it is&lt;/a&gt;.&lt;br /&gt; 
    </content:encoded>

    <pubDate>Sun, 02 Sep 2007 18:52:12 +0100</pubDate>
    <guid isPermaLink="false">http://oracledoug.com/serendipity/index.php?/archives/1312-guid.html</guid>
    <category>Database Refresh</category>

</item>
<item>
    <title>Full Volume Database Refresh - Part 3</title>
    <link>http://oracledoug.com/serendipity/index.php?/archives/1306-Full-Volume-Database-Refresh-Part-3.html</link>
    
    <comments>http://oracledoug.com/serendipity/index.php?/archives/1306-Full-Volume-Database-Refresh-Part-3.html#comments</comments>
    <wfw:comment>http://oracledoug.com/serendipity/wfwcomment.php?cid=1306</wfw:comment>

    <slash:comments>10</slash:comments>
    <wfw:commentRss>http://oracledoug.com/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=1306</wfw:commentRss>
    

    <author>dougburns@yahoo.com (Doug Burns)</author>
    <content:encoded>
    After &lt;a href=&quot;http://oracledoug.com/serendipity/index.php?/archives/1305-Full-Volume-Database-Refresh-Part-2.html&quot;&gt;solving the jigsaw puzzle&lt;/a&gt; and waiting for tape drives to do their thing, we&#039;ve finally got a running test instance accessing a full copy of production. (Well, there was some recovery, faffing around with database names, control files, tempfiles, putting the database in noarchivelog mode and the rest, but there are plenty of Oracle database cloning references out there. I&#039;ve always found &lt;a href=&quot;http://dizwell.com&quot;&gt;Howard&#039;s stuff&lt;/a&gt; top-notch.)&lt;br /&gt;&lt;br /&gt;But what happens next is perhaps the trickiest bit (particularly if you&#039;re familiar with database cloning), because although the generic types of problem and appropriate solutions are the same, each database is going to be subtly different. Interestingly, the mere mention of a Production-to-Test refresh brought insightful comments on previous postings from those who&#039;ve been here before.&lt;br /&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;quot;&lt;em&gt;Challenges we encountered were related to encryption (can&#039;t have
production keys outside of production) and localization of data values
(stuff like production URLs being stored in table columns which needed
to be updated to point at test URLs).&lt;/em&gt;&amp;quot; (Dominic D.)&lt;/li&gt;
&lt;li&gt;&amp;quot;&lt;em&gt;and there is the need to obscure production data yet maintain integrity
- some of my customers are quite secretive. Mangling names and
addresses can be a headache&lt;/em&gt;&amp;quot; (Pete S.)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;One of the biggest benefits of the resulting Test environment is that we *know* this is exactly as Production is, or was at the time of the backup. &lt;br /&gt;&lt;br /&gt;One of the biggest dangers of the resulting Test environment is that this is exactly as Production is, or was at the time of the backup! &lt;br /&gt;&lt;br /&gt;Why the contradiction? Well, we now have a Test database that carries the operational footprint of Production. What do I mean by operational footprint? Well, consider the following :-&lt;br /&gt;&lt;br /&gt;1) Database links or URLs stored in database tables. Remember how I talked about a complex environment, consisting of multiple databases that communicate with each other (through database links) or perhaps with other applications (through URLs or message queue locations)? Well, your new Test environment is pointing to Production databases! I&#039;m not going to elaborate, but let the thought rattle around your mind for a bit. (It&#039;s more fun and scary that way!) &lt;img src=&quot;http://oracledoug.com/serendipity/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;&lt;br /&gt;2) User Accounts and Passwords. Every Oracle account in the Test environment now has the Production password, privileges and profile. It&#039;s amazing how confusing most developers and testers find this, even when you point out this is an *exact* copy of Production &lt;img src=&quot;http://oracledoug.com/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; More to the point, people will probably resist the security constraints that exist in the Production environment being applied to the Test environment, so they&#039;ll ask you to loosen them. But then, that opens up a whole new can of worms ....&lt;br /&gt;&lt;br /&gt;3) Sensitive Customer Data. Many Production databases contain sensitive customer data. That&#039;s why we have strict controls in Production (not just because DBAs get their kicks out of being obstructive, although that might be true, too &lt;img src=&quot;http://oracledoug.com/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;). So, if the database contains all of the Production data then we should apply the same controls, or &lt;em&gt;modify the data&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;4) Instance Parameters. In some cases, you want a perfect replica of Production, perhaps for performance tests. But sometimes you&#039;ll want to reduce the memory used for the Test copy.&lt;br /&gt;&lt;br /&gt;5) DBMS_JOBs. Do you really want all of your regular Production jobs to start running in the Test environment? If you combine this with point 1) above, that&#039;s a recipe for disaster!&lt;br /&gt;&lt;br /&gt;I probably have at least two more blogs worth of these considerations, but I just wanted to give you a flavour of the problems you might run into. All can be solved with a little thought but there are times when I hear people request a copy of Production and I just chuckle. Invariably they haven&#039;t thought it through completely and we spend the next few weeks solving these &#039;little problems&#039; one by one. &lt;br /&gt;&lt;br /&gt;A common term for the steps required to make a copy of Production look &lt;em&gt;almost&lt;/em&gt; exactly the same, but not quite, is &lt;em&gt;localisation&lt;/em&gt;. (Well, it&#039;s the most common term I&#039;ve heard on my travels.)&lt;br /&gt;&lt;br /&gt;It&#039;s worth mentioning that, of the 6.5 hour process (not including a couple of hours preparation time), about 2.5 hours is spent on these surrounding issues and there have been many days spent working our way through them, discussing them and documenting the required steps. Ultimately, these should be scripted and will become quicker, but you should be aware of the dangers. Even then, I&#039;d always want to check that the scripts worked as we expected.&lt;br /&gt;&lt;br /&gt;Whatever the refresh method selected and the technical process that results (sometimes complex and sometimes not), there are functional considerations. To address those, there&#039;s no substitute for human beings getting together, &lt;em&gt;talking&lt;/em&gt;, &lt;em&gt;thinking&lt;/em&gt; and reducing the final decisions to a series of simple, repeatable steps.&lt;br /&gt;&lt;br /&gt;We&#039;re just about there &lt;img src=&quot;http://oracledoug.com/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Tue, 07 Aug 2007 19:18:48 +0100</pubDate>
    <guid isPermaLink="false">http://oracledoug.com/serendipity/index.php?/archives/1306-guid.html</guid>
    <category>Database Refresh</category>

</item>
<item>
    <title>Full Volume Database Refresh - Part 2</title>
    <link>http://oracledoug.com/serendipity/index.php?/archives/1305-Full-Volume-Database-Refresh-Part-2.html</link>
    
    <comments>http://oracledoug.com/serendipity/index.php?/archives/1305-Full-Volume-Database-Refresh-Part-2.html#comments</comments>
    <wfw:comment>http://oracledoug.com/serendipity/wfwcomment.php?cid=1305</wfw:comment>

    <slash:comments>10</slash:comments>
    <wfw:commentRss>http://oracledoug.com/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=1305</wfw:commentRss>
    

    <author>dougburns@yahoo.com (Doug Burns)</author>
    <content:encoded>
    First the good news. &amp;quot;&lt;em&gt;The Refresh from Hell&lt;/em&gt;&amp;quot; (because it was) has become &amp;quot;&lt;em&gt;The Slightly Tricky Refresh&lt;/em&gt;&amp;quot;. &lt;br /&gt;&lt;br /&gt;It only took 6.5 hours on Sunday (in time to watch Celtic&#039;s first match of the season) and apart from a couple of minor panics along the way, it went well. Anyway, back to the overall process, with additional insight based on the first painful test and yesterday&#039;s almost painless one ...&lt;br /&gt;&lt;br /&gt;Based on where I left &lt;a href=&quot;http://oracledoug.com/serendipity/index.php?url=archives/1304-Full-Volume-Database-Refresh-Part-1.html&quot;&gt;Part 1&lt;/a&gt;, let&#039;s assume that the Production database has been copied, recovered and started as a new test instance and database.&lt;br /&gt;&lt;br /&gt;Actually, let&#039;s not assume too much here, because the copy process can be an absolute nightmare, depending on a few factors, including one pointed out in &lt;a href=&quot;http://www.oraclemusings.com/&quot;&gt;Dominic Delmolino&#039;s&lt;/a&gt; &lt;a href=&quot;http://oracledoug.com/serendipity/index.php?url=archives/1304-Full-Volume-Database-Refresh-Part-1.html&amp;amp;serendipity[csuccess]=true#c5005&quot;&gt;comment&lt;/a&gt; to the last post.&lt;br /&gt;&lt;br /&gt;
&lt;blockquote&gt;Try to make the filesystems the same -- makes things a lot easier. And really, why would they need to be different?&lt;/blockquote&gt;&lt;br /&gt;That comment made me chuckle to myself, because I can hear the voice of painful experience echoing through the internet &lt;img src=&quot;http://oracledoug.com/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; As Dominic says, there&#039;s no reason not to have the source and target databases on identical filesystems if they&#039;re on different servers. At the very least, give me the same &lt;em&gt;number&lt;/em&gt; of filesystems that are &lt;em&gt;sized&lt;/em&gt; identically. That way, any edits you need to file locations in a control file trace output or RMAN &amp;quot;SET NEWNAME&amp;quot; commands are easier. But look at the start of his comment. Why say &amp;quot;try&amp;quot; if the filesystems are always the same? It&#039;s such a no-brainer!&lt;br /&gt;&lt;br /&gt;Because they are often completely different! Don&#039;t get me wrong, you can shuffle files around to new locations so that they all fit, but it&#039;s a monumental pain in the backside. It&#039;s almost a rite of passage for a DBA to have tried to solve the database file equivalent of &lt;a href=&quot;http://en.wikipedia.org/wiki/Fifteen_puzzle&quot;&gt;one of these&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There are two main strategies if you have a mish-mash of incompatible filesystems.&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Plan meticulously until you are sure that you know where every file from the source database fits on the target filesystems.&lt;/li&gt;
&lt;li&gt;Have a stab at it and set the first restore (or copy) running. When it fails, make a few edits and restart the process. Repeat.&lt;/li&gt;
&lt;/ol&gt;Generally I find that option 2 works best for me, as long as the restore operation can skip over the already-restored files very quickly.&lt;br /&gt;&lt;br /&gt;One of the main reasons why the most recent practice went so smoothly was that I&#039;d put together all of the SET NEWNAME commands during the last run and there hadn&#039;t been any files added to Production since then. So I already have my source-to-target file mapping in place.&lt;br /&gt;&lt;br /&gt;Going forward, I need to bear the following in mind.&lt;br /&gt;&lt;br /&gt;1) The Production database files will grow.&lt;br /&gt;2) Production files might appear or disappear.&lt;br /&gt;&lt;br /&gt;In fact one recent client insisted that all space requests for Production and the Volume Test environment were submitted through the change management process so that we could ensure that the environments were identical, but I haven&#039;t often worked in such a well-managed environment.&lt;br /&gt;&lt;br /&gt;Why might the file systems be different? All sorts of reasons but usually because small test environments are rapidly converted into full volume. When I say rapid, I mean - &#039;we need it yesterday&#039; - so compromises are made. Not good, but part of the world I operate in.&lt;br /&gt;&lt;br /&gt;Let&#039;s just say that, if you&#039;re going to perform a regular refresh, it&#039;s worth spending time setting up a new set of filesystems on the target server that match the source server. As Dominic said, it &#039;makes things a lot easier&#039;.&lt;br /&gt;&lt;br /&gt;Oh, wow, another part of this blog gone and I haven&#039;t even got to the tricky stuff yet! Next time &lt;img src=&quot;http://oracledoug.com/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Mon, 06 Aug 2007 06:40:00 +0100</pubDate>
    <guid isPermaLink="false">http://oracledoug.com/serendipity/index.php?/archives/1305-guid.html</guid>
    <category>Database Refresh</category>

</item>
<item>
    <title>Full Volume Database Refresh - Part 1</title>
    <link>http://oracledoug.com/serendipity/index.php?/archives/1304-Full-Volume-Database-Refresh-Part-1.html</link>
    
    <comments>http://oracledoug.com/serendipity/index.php?/archives/1304-Full-Volume-Database-Refresh-Part-1.html#comments</comments>
    <wfw:comment>http://oracledoug.com/serendipity/wfwcomment.php?cid=1304</wfw:comment>

    <slash:comments>17</slash:comments>
    <wfw:commentRss>http://oracledoug.com/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=1304</wfw:commentRss>
    

    <author>dougburns@yahoo.com (Doug Burns)</author>
    <content:encoded>
    (... or &lt;em&gt;the Refresh from Hell&lt;/em&gt;)&lt;br /&gt; &lt;br /&gt;
This weekend will be the final practice run (there&#039;s been one already)
for a database refresh procedure I&#039;ll be working on for a further four
weekends. It&#039;s a full copy of one of our production databases that
forms part of a user acceptance test environment for a significant
application upgrade due in the next couple of months. &lt;br /&gt; &lt;br /&gt;
Companies &lt;em&gt;should&lt;/em&gt; run more development and test databases than
production ones, to support multiple development streams and different
phases of testing, such as system or user acceptance testing. Many of
those databases will contain the same schema objects as production, but
a tiny subset of the data. They pose an interesting challenge that I
might write about one day. &lt;br /&gt; &lt;br /&gt;
But nothing is as reassuring as testing on the same database that&#039;s
running in production already. It&#039;s an expensive business, of course,
because you need sufficient disk space to support it and most
businesses don&#039;t have 300Gb USB drives as an option. What I mean to say
is that disk space isn&#039;t quite as cheap as I keep hearing because of
the surrounding infrastructure and support costs. You might also want
to use an identical server to run it on if you&#039;re interested in testing
absolute performance. It depends on what your testing is supposed to
achieve.&lt;br /&gt; &lt;br /&gt;
In this case, the main concerns relate to the data. It&#039;s a complex
system and the testers need to be able to see the same data as
production, which will then go through a week long flow of changes and
checks and the same overnight batch runs as production. Essentially,
the testers will simulate &#039;a week in the life&#039; of this system.&lt;br /&gt; &lt;br /&gt;
I said earlier that this test database will form &#039;part of&#039; a UAT
environment, and that&#039;s adds a little to the complexity. Is it just me
or does everyone want to design applications these days to use as many
different databases, all talking to each other as possible? I strongly
suspect the hands of architects here &lt;img src=&quot;http://oracledoug.com/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; Might it be for performance
reasons? Probably not when all of the databases sit on the same server!
I don&#039;t know why, but I&#039;m seeing this approach used more often. In this
case, the test database is going to be co-operating with at least three
other databases. However, we don&#039;t want most of those other databases
to be refreshed, just the main one and another SQL Server database that
the new application uses!&lt;br /&gt; &lt;br /&gt;
OK, down to business and the point of this blog. I&#039;m not going to give
you all of the details of a client&#039;s process, but let me higlight some
of the main stages, challenges and possible solutions. I think this is
fairly typical of other refresh procedures I&#039;ve seen at other sites.&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Copying the Data&lt;br /&gt; &lt;/strong&gt;We need the production data to appear in our full-volume test database.
This can be the most time-consuming process (4 hours in our case), but
it depends on what approach you take.&lt;br /&gt; &lt;br /&gt;
- Export the production data and import it into test. This is the most
prone to failure and probably the slowest solution, even with Data Pump
(which we can&#039;t use - this is a 9i database). It does have certain
benefits, that will appear later in this discussion, but isn&#039;t a
sensible option for large databases in my view. The database we&#039;re
working on is around 140GB. Not too large by today&#039;s standards, but a
little tricky to handle with exports. However, exports have been used for this refresh in the past, and I pity the poor DBA who had to do them!&lt;br /&gt; &lt;br /&gt;
- Copy the database files from one set of filesystems to another, possibly on a
different server. This is essentially the approach we&#039;re taking because
we&#039;re going to restore one of the hot backups of production to the test
server and then perform recovery on it.&lt;br /&gt; &lt;br /&gt;
- Have an extra set of disk mirrors that can be temporarily broken away
from the main production disks and mounted elsewhere. This can be a
super-fast option but it&#039;s not available to us in this particular
situation.&lt;br /&gt; &lt;br /&gt;
We&#039;re going to restore files to a new location, in other words &#039;&lt;a href=&quot;http://www.dizwell.com/prod/node/9&quot;&gt;Cloning a Database&lt;/a&gt;&#039;.&lt;br /&gt;&lt;br /&gt;Actually, I&#039;ll leave it there for now and post more later.&lt;br /&gt; 
    </content:encoded>

    <pubDate>Sat, 04 Aug 2007 08:33:43 +0100</pubDate>
    <guid isPermaLink="false">http://oracledoug.com/serendipity/index.php?/archives/1304-guid.html</guid>
    <category>Database Refresh</category>

</item>

</channel>
</rss>