{"id":2194,"date":"2019-06-25T02:00:05","date_gmt":"2019-06-25T07:30:05","guid":{"rendered":"https:\/\/www.filerepairtools.com\/tips\/?p=2194"},"modified":"2019-06-25T02:00:05","modified_gmt":"2019-06-25T07:30:05","slug":"how-to-restore-lost-oracle-database-files-from-backup","status":"publish","type":"post","link":"https:\/\/filerepairtools.com\/tips\/how-to-restore-lost-oracle-database-files-from-backup\/","title":{"rendered":"How to Restore Lost Oracle Database Files from Backup"},"content":{"rendered":"<p>Oracle Database is composed of several important files that are necessary to run the application. The DB comprises Control files, Tablespaces, Data Files, Server Parameter File (SPFILE), and many more. Tablespaces are the storage units that are used by Oracle to save data and media. So, if the Oracle DB gets corrupt then the first thing to do is recover Oracle tablespaces and data files. Oracle Database files can be recovered manually using RMAN or with a professional Oracle Database Recovery software.<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/filerepairtools.com\/tips\/how-to-restore-lost-oracle-database-files-from-backup\/#For_Restoring_Oracle_Database_to_New_Location\" >For Restoring Oracle Database to New Location<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/filerepairtools.com\/tips\/how-to-restore-lost-oracle-database-files-from-backup\/#Features_of_Oracle_Database_Repair_are\" >Features of Oracle Database Repair are<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>The one thing that is to remember that the data should be restored to a new location. As the original location may be damaged or under the influence of corruption, saving files to this location will corrupt it. So, it is advised to restore the files at a safe location. Here we will use RMAN commands and restore\/ recover files from backup and later know about the features of Oracle DBF file repair tool for database recovery.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"For_Restoring_Oracle_Database_to_New_Location\"><\/span><strong>For Restoring Oracle Database to New Location<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Specify the new names with RMAN SET NEWNAME command<\/li>\n<li>Now use SWITCH command to update control file and refer Datafiles with New names set<\/li>\n<li>Once the names are set run the RESTORE TABLESPACE and RESTORE DATAFILE as normal and then make use of SET NEWNAME for the new location of the file.<\/li>\n<li>Remember Once the RESTORE command is run, specify the new names in control file before recovery<\/li>\n<li>So, After RESTORE and before RECOVER, use SWITCH command to update the new file names<\/li>\n<li>Use SWITCH DATAFILE ALL and update the control file to new names<\/li>\n<\/ul>\n<p>Here is an example of the Restore and Recovery process. The example uses datafiles in tablespaces USERS and TOOLS from \/Olddisk to \/new disk.<\/p>\n<pre>RUN\n\n{\n\n\u00a0 SQL 'ALTER TABLESPACE users OFFLINE IMMEDIATE';\n\n\u00a0 SQL 'ALTER TABLESPACE tools OFFLINE IMMEDIATE';\n\n\u00a0 # specify the new location for each datafile\n\n\u00a0 SET NEWNAME FOR DATAFILE '\/olddisk\/users01.dbf' TO\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 '\/newdisk\/users01.dbf';\n\n\u00a0 SET NEWNAME FOR DATAFILE '\/olddisk\/tools01.dbf' TO\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 '\/newdisk\/tools01.dbf';\n\n\u00a0 # to restore to an ASM disk group named dgroup, use:\n\n\u00a0 # SET NEWNAME FOR DATAFILE '\/olddisk\/trgt\/tools01.dbf'\n\n\u00a0 #\u00a0\u00a0\u00a0\u00a0 TO '+dgroup';\n\n\u00a0\u00a0RESTORE TABLESPACE users, tools;\n\n\u00a0 SWITCH DATAFILE ALL;\u00a0\u00a0 # update control file with new filenames\n\n\u00a0 RECOVER TABLESPACE users, tools;\n\n}<\/pre>\n<p>Once the recovery completed successfully bring the tablespaces online by the following command<\/p>\n<pre>SQL 'ALTER TABLESPACE users ONLINE';\n\nSQL 'ALTER TABLESPACE tools ONLINE';<\/pre>\n<p>So, this is the manual method to recover Oracle files from backup. But, it could cause errors if a single step is skipped and that\u2019s why it is necessary to use a professional database recovery tool. As Oracle has a large amount of data, No DBA will want to lose it with a silly mistake, the recovery software promises error-free file recovery without any loss. So, repair the database and retrieve the DBF file with the Oracle Database Repair tool.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Features_of_Oracle_Database_Repair_are\"><\/span><strong>Features of Oracle Database Repair are<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Easy and simple user interface<\/li>\n<li>Recover XML Data and Schemas<\/li>\n<li>Retrieve Tables, columns, schemas, stored procedures, and other parameters<\/li>\n<li>Compatible with Oracle 9i, 10g, or 11g<\/li>\n<li>Recovers Deleted Records of Tables<\/li>\n<li>Generates Log Report of the file<\/li>\n<li>Display Preview After Scan<\/li>\n<li>Can be installed on Windows 10\/ 8\/ 8.1\/ 7<\/li>\n<\/ul>\n<p>Try the Oracle database recovery tool and bring back the database to a normal state. Download the software for free and recover files.<a href=\"https:\/\/secure.2checkout.com\/order\/checkout.php?PRODS=4529829&amp;QTY=1&amp;AFFILIATE=110194&amp;CART=1\" target=\"_blank\" rel=\"nofollow noopener sponsored\" data-wplink-edit=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-18\" src=\"https:\/\/www.filerepairtools.com\/tips\/wp-content\/uploads\/2017\/06\/download.png\" alt=\"ost file repair\" width=\"222\" height=\"60\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle Database is composed of several important files that are necessary to run the application. The DB comprises Control files, Tablespaces, Data Files, Server Parameter File (SPFILE), and many more. Tablespaces are the storage units that are used by Oracle to save data and media. So, if the Oracle DB gets corrupt then the first [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-repair"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/posts\/2194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/comments?post=2194"}],"version-history":[{"count":0,"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/posts\/2194\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/media?parent=2194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/categories?post=2194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/filerepairtools.com\/tips\/wp-json\/wp\/v2\/tags?post=2194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}