{"id":1305,"date":"2007-08-06T12:00:00","date_gmt":"2007-08-06T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=1305"},"modified":"2007-08-06T12:00:00","modified_gmt":"2007-08-06T12:00:00","slug":"full-volume-database-refresh-part-2","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2007\/08\/06\/full-volume-database-refresh-part-2\/","title":{"rendered":"Full Volume Database Refresh &#8211; Part 2"},"content":{"rendered":"<p>First the good news. &#8220;<em>The Refresh from Hell<\/em>&#8221; (because it was) has become &#8220;<em>The Slightly Tricky Refresh<\/em>&#8220;. <\/p>\n<p>It only took 6.5 hours on Sunday (in time to watch Celtic&#8217;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&#8217;s almost painless one &#8230;<\/p>\n<p>Based on where I left <a href=\"http:\/\/18.133.199.212\/?p=1304\">Part 1<\/a>, let&#8217;s assume that the Production database has been copied, recovered and started as a new test instance and database.<\/p>\n<p>Actually, let&#8217;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 <a href=\"http:\/\/www.oraclemusings.com\/\">Dominic Delmolino&#8217;s<\/a> <a href=\"http:\/\/18.133.199.212\/?p=1304#c5005\">comment<\/a> to the last post.<\/p>\n<blockquote><p>Try to make the filesystems the same &#8212; makes things a lot easier. And really, why would they need to be different?<\/p><\/blockquote>\n<p>That comment made me chuckle to myself, because I can hear the voice of painful experience echoing through the internet &#128521; As Dominic says, there&#8217;s no reason not to have the source and target databases on identical filesystems if they&#8217;re on different servers. At the very least, give me the same <em>number<\/em> of filesystems that are <em>sized<\/em> identically. That way, any edits you need to file locations in a control file trace output or RMAN &#8220;SET NEWNAME&#8221; commands are easier. But look at the start of his comment. Why say &#8220;try&#8221; if the filesystems are always the same? It&#8217;s such a no-brainer!<\/p>\n<p>Because they are often completely different! Don&#8217;t get me wrong, you can shuffle files around to new locations so that they all fit, but it&#8217;s a monumental pain in the backside. It&#8217;s almost a rite of passage for a DBA to have tried to solve the database file equivalent of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Fifteen_puzzle\">one of these<\/a>.<\/p>\n<p>There are two main strategies if you have a mish-mash of incompatible filesystems.<\/p>\n<ol>\n<li>Plan meticulously until you are sure that you know where every file from the source database fits on the target filesystems.<\/li>\n<li>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.<\/li>\n<\/ol>\n<p>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.<\/p>\n<p>One of the main reasons why the most recent practice went so smoothly was that I&#8217;d put together all of the SET NEWNAME commands during the last run and there hadn&#8217;t been any files added to Production since then. So I already have my source-to-target file mapping in place.<\/p>\n<p>Going forward, I need to bear the following in mind.<\/p>\n<p>1) The Production database files will grow.<br \/>2) Production files might appear or disappear.<\/p>\n<p>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&#8217;t often worked in such a well-managed environment.<\/p>\n<p>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 &#8211; &#8216;we need it yesterday&#8217; &#8211; so compromises are made. Not good, but part of the world I operate in.<\/p>\n<p>Let&#8217;s just say that, if you&#8217;re going to perform a regular refresh, it&#8217;s worth spending time setting up a new set of filesystems on the target server that match the source server. As Dominic said, it &#8216;makes things a lot easier&#8217;.<\/p>\n<p>Oh, wow, another part of this blog gone and I haven&#8217;t even got to the tricky stuff yet! Next time &#128521;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First the good news. &#8220;The Refresh from Hell&#8221; (because it was) has become &#8220;The Slightly Tricky Refresh&#8220;. It only took 6.5 hours on Sunday (in time to watch Celtic&#8217;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&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2007\/08\/06\/full-volume-database-refresh-part-2\/\">Continue reading <span class=\"screen-reader-text\">Full Volume Database Refresh &#8211; Part 2<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1305","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1304,"url":"http:\/\/orcldoug.com\/blog\/2007\/08\/04\/full-volume-database-refresh-part-1\/","url_meta":{"origin":1305,"position":0},"title":"Full Volume Database Refresh &#8211; Part 1","date":"August 4, 2007","format":false,"excerpt":"(... or the Refresh from Hell) This weekend will be the final practice run (there's been one already) for a database refresh procedure I'll be working on for a further four weekends. It's a full copy of one of our production databases that forms part of a user acceptance test\u2026","rel":"","context":"With 17 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1306,"url":"http:\/\/orcldoug.com\/blog\/2007\/08\/07\/full-volume-database-refresh-part-3\/","url_meta":{"origin":1305,"position":1},"title":"Full Volume Database Refresh &#8211; Part 3","date":"August 7, 2007","format":false,"excerpt":"After solving the jigsaw puzzle and waiting for tape drives to do their thing, we'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\u2026","rel":"","context":"With 10 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1312,"url":"http:\/\/orcldoug.com\/blog\/2007\/09\/02\/full-volume-database-refresh-part-4\/","url_meta":{"origin":1305,"position":2},"title":"Full Volume Database Refresh &#8211; Part 4","date":"September 2, 2007","format":false,"excerpt":"As a post-script to the earlier blogs, Alex Gorbachev suggested a link to his UKOUG 2006 presentation in this area might prove useful and I agree. So here it is.","rel":"","context":"With 2 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1392,"url":"http:\/\/orcldoug.com\/blog\/2008\/03\/18\/paste\/","url_meta":{"origin":1305,"position":3},"title":"Paste","date":"March 18, 2008","format":false,"excerpt":"[As part of the occasional series on small but useful Unix commands ...]I've always loved Unix and vi and despair at those who prefer to faff around on Windows trying to edit files with an operating system and editors that, yes, are much more friendly but are hopelessly limited. The\u2026","rel":"","context":"With 8 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1425,"url":"http:\/\/orcldoug.com\/blog\/2008\/08\/05\/hanging-audit-vault-warehouse-refresh-job\/","url_meta":{"origin":1305,"position":4},"title":"Hanging Audit Vault Warehouse Refresh Job","date":"August 5, 2008","format":false,"excerpt":"I've been working with Audit Vault 10.2.3 on AIX recently and ran into a problem that someone else might one day. I decided to capture the output as best I can and blog about it later. (As I don't have the same system available any more, the formatting might leave\u2026","rel":"","context":"With 6 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1055,"url":"http:\/\/orcldoug.com\/blog\/2006\/08\/18\/historical-perspective-part-3\/","url_meta":{"origin":1305,"position":5},"title":"Historical Perspective (Part 3)","date":"August 18, 2006","format":false,"excerpt":"Previously I talked about the importance of historical perspective to server performance tuning, but it applies to many areas of working with databases. For the last part of this mini-series, I thought I'd pull together a few more examples.Execution Plans and Optimiser StatisticsI've written several blogs recently about the value\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/comments?post=1305"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1305\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=1305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=1305"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=1305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}