Fastest Database Refresh using Oracle CloneDB Sangam 2014 (7th,8th ,9th Nov) Suvendu Who am I ? • Lead Database consultant @ Fiberlink-MaaS360 (An IBM Company) • 10 years of real-time industry experience (4.5 years with Oracle corp. metalink support). • OCM , OCP ,RAC ,Oracle Linux Certified. • Technical Blog (www.dbagalaxy.com). Available Refresh options.. A refresh can be full database refresh or schema/partial refresh. There are several methods for DB refresh /cloning databases . Manually copy files and recreate the database. EXPDP/IMPDP RMAN DUPLICATE - active database. RMAN DUPLICATE - backup. 3rd Party solutions (e.g Snapshots). All require copying or restoring files to new location requiring: Additional disk space Time to perform the copy/import. Current DB Refresh Challenges…. § EXPDP/IMPDP process is time consuming. Not an efficient for big size databases. § EXPDP/IMPDP feature has lots of bugs which causes lots of data mismatch/environment mismatch issues. With every run we find new issues/fixes. That impacts environment delivery dates. § Increase in DB environment refresh requests. § Store usage: We need to further invest in enterprise storage expansion, licensing. What is a Clone? An exact copy of the original. What is Clonedb? § In 11.1 Oracle introduced Direct NFS(DNFS) Client . § 11.2.0.2 patch set introduced Clonedb functionality, built on top of DNFS. § Clonedb uses Write-On-Demand (WOD) technology for clones. § This is best suited for full database refresh/clone. Write on demand(W.O.D) Clone DB 1 Backup file Copies NFS w.o.d Files 50G Clone DB 2 Read-only 300GB NFS w.o.d Files 10g Clone DB 3 NFS w.o.d Files 1G § Clones use read-only image copies of datafiles as source(Backup). § Only modified blocks are written to NFS location. Advantages…. § No extra licensing cost. § One-time server setup, then repeated cloning is simple, super-quick (Complete refresh within less than < 10 min) § Error free method ,exact replica DB of the source DB. § Dev doesn’t need to spent time on post refresh issues.Saves two days worth of productive hour of GTS/ DEV. § Clonedb saves storage space ,with existing infrastructure we can accommodate 40% more environments. Demo Known Issues…. § The script tries to drop default TEMP tablespace .We need to add temporary tablespace. § If the source backup is an online backup (not consistent),it may need media recovery using the archived redo logs.You may get an error during database open.You can use the following commands to recover. § ORA-01511: error in renaming log/data files ORA-01141: error renaming data file x – new file ‘xxxxxxx’ not found ORA-01110: data file x:xxxxxx ORA-17515: Creation of clonedb failed using snapshot file xxxxxxxxx ORA-06512: at “SYS.X$DBMS_DNFS”, line 10 clonedb=true is missing in the clonedb pfile. This will cause the above errors .If the clonedb parameter is not updated. § ORA-01511: error in renaming log/data files ORA-17513: dNFS package call failed ORA-06512: at “SYS.X$DBMS_DNFS”, line 10 The log or datafile may be saved in a Local disk.Check if the targetclone datafile locations is not on NFS location. Limitations…. § Need NFS/DNFS setup. § Over time if more changed blocks will be written to NFS location (W-O-D), so space savings will reduce. § Best suited in One Source –Many Target clone environment. § Best suited for short-lived clones used for functional, not performance testing. § Fairly new technology with little documentation. Q&A Thank You ! Thanks to Kevin and Tim who shared this technology to the community. http://kevinclosson.wordpress.com/2010/12/23/oracle-database-11g-directnfs-clonedb-feature-part-i/ http://www.oracle-base.com/articles/11g/Clonedb_11gR2.php MOS: Clone your dNFS Production Database for Testing [ID 1210656.1] http://docs.oracle.com/cd/E16655_01/server.121/e17636/ create.htm#ADMIN14024
© Copyright 2024 ExpyDoc