{"id":1304,"date":"2007-08-04T12:00:00","date_gmt":"2007-08-04T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=1304"},"modified":"2007-08-04T12:00:00","modified_gmt":"2007-08-04T12:00:00","slug":"full-volume-database-refresh-part-1","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2007\/08\/04\/full-volume-database-refresh-part-1\/","title":{"rendered":"Full Volume Database Refresh &#8211; Part 1"},"content":{"rendered":"<p>(&#8230; or <em>the Refresh from Hell<\/em>)<\/p>\n<p>This weekend will be the final practice run (there&#8217;s been one already)<br \/>\nfor a database refresh procedure I&#8217;ll be working on for a further four<br \/>\nweekends. It&#8217;s a full copy of one of our production databases that<br \/>\nforms part of a user acceptance test environment for a significant<br \/>\napplication upgrade due in the next couple of months. <\/p>\n<p>Companies <em>should<\/em> run more development and test databases than<br \/>\nproduction ones, to support multiple development streams and different<br \/>\nphases of testing, such as system or user acceptance testing. Many of<br \/>\nthose databases will contain the same schema objects as production, but<br \/>\na tiny subset of the data. They pose an interesting challenge that I<br \/>\nmight write about one day. <\/p>\n<p>But nothing is as reassuring as testing on the same database that&#8217;s<br \/>\nrunning in production already. It&#8217;s an expensive business, of course,<br \/>\nbecause you need sufficient disk space to support it and most<br \/>\nbusinesses don&#8217;t have 300Gb USB drives as an option. What I mean to say<br \/>\nis that disk space isn&#8217;t quite as cheap as I keep hearing because of<br \/>\nthe surrounding infrastructure and support costs. You might also want<br \/>\nto use an identical server to run it on if you&#8217;re interested in testing<br \/>\nabsolute performance. It depends on what your testing is supposed to<br \/>\nachieve.<\/p>\n<p>In this case, the main concerns relate to the data. It&#8217;s a complex<br \/>\nsystem and the testers need to be able to see the same data as<br \/>\nproduction, which will then go through a week long flow of changes and<br \/>\nchecks and the same overnight batch runs as production. Essentially,<br \/>\nthe testers will simulate &#8216;a week in the life&#8217; of this system.<\/p>\n<p>I said earlier that this test database will form &#8216;part of&#8217; a UAT<br \/>\nenvironment, and that&#8217;s adds a little to the complexity. Is it just me<br \/>\nor does everyone want to design applications these days to use as many<br \/>\ndifferent databases, all talking to each other as possible? I strongly<br \/>\nsuspect the hands of architects here &#128521; Might it be for performance<br \/>\nreasons? Probably not when all of the databases sit on the same server!<br \/>\nI don&#8217;t know why, but I&#8217;m seeing this approach used more often. In this<br \/>\ncase, the test database is going to be co-operating with at least three<br \/>\nother databases. However, we don&#8217;t want most of those other databases<br \/>\nto be refreshed, just the main one and another SQL Server database that<br \/>\nthe new application uses!<\/p>\n<p>OK, down to business and the point of this blog. I&#8217;m not going to give<br \/>\nyou all of the details of a client&#8217;s process, but let me higlight some<br \/>\nof the main stages, challenges and possible solutions. I think this is<br \/>\nfairly typical of other refresh procedures I&#8217;ve seen at other sites.<\/p>\n<p> <strong>Copying the Data<br \/> <\/strong>We need the production data to appear in our full-volume test database.<br \/>\nThis can be the most time-consuming process (4 hours in our case), but<br \/>\nit depends on what approach you take.<\/p>\n<p>&#8211; Export the production data and import it into test. This is the most<br \/>\nprone to failure and probably the slowest solution, even with Data Pump<br \/>\n(which we can&#8217;t use &#8211; this is a 9i database). It does have certain<br \/>\nbenefits, that will appear later in this discussion, but isn&#8217;t a<br \/>\nsensible option for large databases in my view. The database we&#8217;re<br \/>\nworking on is around 140GB. Not too large by today&#8217;s standards, but a<br \/>\nlittle 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!<\/p>\n<p>&#8211; Copy the database files from one set of filesystems to another, possibly on a<br \/>\ndifferent server. This is essentially the approach we&#8217;re taking because<br \/>\nwe&#8217;re going to restore one of the hot backups of production to the test<br \/>\nserver and then perform recovery on it.<\/p>\n<p>&#8211; Have an extra set of disk mirrors that can be temporarily broken away<br \/>\nfrom the main production disks and mounted elsewhere. This can be a<br \/>\nsuper-fast option but it&#8217;s not available to us in this particular<br \/>\nsituation.<\/p>\n<p>We&#8217;re going to restore files to a new location, in other words &#8216;<a href=\"http:\/\/www.dizwell.com\/prod\/node\/9\">Cloning a Database<\/a>&#8216;.<\/p>\n<p>Actually, I&#8217;ll leave it there for now and post more later.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(&#8230; or the Refresh from Hell) This weekend will be the final practice run (there&#8217;s been one already) for a database refresh procedure I&#8217;ll be working on for a further four weekends. It&#8217;s a full copy of one of our production databases that forms part of a user acceptance test environment for a significant application&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2007\/08\/04\/full-volume-database-refresh-part-1\/\">Continue reading <span class=\"screen-reader-text\">Full Volume Database Refresh &#8211; Part 1<\/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-1304","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1306,"url":"http:\/\/orcldoug.com\/blog\/2007\/08\/07\/full-volume-database-refresh-part-3\/","url_meta":{"origin":1304,"position":0},"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":1305,"url":"http:\/\/orcldoug.com\/blog\/2007\/08\/06\/full-volume-database-refresh-part-2\/","url_meta":{"origin":1304,"position":1},"title":"Full Volume Database Refresh &#8211; Part 2","date":"August 6, 2007","format":false,"excerpt":"First the good news. \"The Refresh from Hell\" (because it was) has become \"The Slightly Tricky Refresh\". It only took 6.5 hours on Sunday (in time to watch Celtic's first match of the season) and apart from a couple of minor panics along the way, it went well. Anyway, back\u2026","rel":"","context":"With 10 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1191,"url":"http:\/\/orcldoug.com\/blog\/2007\/01\/27\/dba-documentation-catalogue\/","url_meta":{"origin":1304,"position":2},"title":"DBA Documentation &#8211; Catalogue","date":"January 27, 2007","format":false,"excerpt":"Prompted by Linda's comment on a previous blog, I thought it might be worth writing a couple of postings on DBA documentation.The first thing you need is a Database Catalogue of some kind.Benefits1) Even an experienced DBA arriving on site won't know what servers exist, how to login to them,\u2026","rel":"","context":"With 11 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":868,"url":"http:\/\/orcldoug.com\/blog\/2006\/02\/05\/we-never-learn-do-we\/","url_meta":{"origin":1304,"position":3},"title":"We Never Learn, Do We?","date":"February 5, 2006","format":false,"excerpt":"I had an interesting day at work yesterday. We've run into major performance problems when upgrading a number of Production databases from 8i to 9i. How could that happen, when we've performed regression tests to ensure that the applications perform as well as or better than they did on 8i?Probably\u2026","rel":"","context":"With 5 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":1304,"position":4},"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":1304,"position":5},"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":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1304","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=1304"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1304\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=1304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=1304"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=1304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}