{"id":676,"date":"2024-12-04T20:52:44","date_gmt":"2024-12-04T20:52:44","guid":{"rendered":"https:\/\/humtechno.com\/intro\/?p=676"},"modified":"2024-12-04T20:55:29","modified_gmt":"2024-12-04T20:55:29","slug":"oracle-database-recovery","status":"publish","type":"post","link":"https:\/\/humtechno.com\/intro\/2024\/12\/04\/oracle-database-recovery\/","title":{"rendered":"Oracle Database Recovery"},"content":{"rendered":"\n\n\n\n<p><a href=\"https:\/\/humtechno.com\/intro\/wp-content\/uploads\/2024\/12\/Oracle-DB-Recovery-1.pdf\">Download Free PDF<\/a><\/p>\n\n<p><strong>Situation 1<\/strong><\/p>\n\n<ol class=\"wp-block-list\">\n<li>No Database Backup<\/li>\n\n\n\n<li>No Control file Backup<\/li>\n\n\n\n<li>No Control file<\/li>\n\n\n\n<li>Some Data files Corrupted<\/li>\n<\/ol>\n\n<p><strong>Create PFile<\/strong><\/p>\n\n<p>export ORACLE_SID=test5<\/p>\n\n<p>vi \/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/inittest5.ora<\/p>\n\n<p>*.audit_file_dest=&#8217;\/u01\/app\/oracle\/admin\/test5\/adump&#8217;<\/p>\n\n<p>*.audit_trail=&#8217;db&#8217;<\/p>\n\n<p>*.compatible=&#8217;19.0.0&#8242;<\/p>\n\n<p>*.control_files=&#8217;\/data\/test5\/control1.ctl&#8217;<\/p>\n\n<p>*.db_block_size=8192<\/p>\n\n<p>*.db_name=&#8217;test5&#8242;<\/p>\n\n<p>*.diagnostic_dest=&#8217;\/u01\/app\/oracle&#8217;<\/p>\n\n<p>*.dispatchers='(PROTOCOL=TCP) (SERVICE=test5XDB)&#8217;<\/p>\n\n<p>*.log_archive_dest_1=&#8217;location=\/data\/test5\/archive&#8217;<\/p>\n\n<p>*.memory_target=1049m<\/p>\n\n<p>*.open_cursors=300<\/p>\n\n<p>*.processes=320<\/p>\n\n<p>*.remote_login_passwordfile=&#8217;EXCLUSIVE&#8217;<\/p>\n\n<p>*.undo_tablespace=&#8217;UNDOTBS1&#8242;<\/p>\n\n<p><strong>Create Directories<\/strong><\/p>\n\n<p>mkdir \u2013p \/u01\/app\/oracle\/admin\/test5\/adump<\/p>\n\n<p>mkdir \/data\/test5<\/p>\n\n<p>mkdir \/data\/test5\/archive<\/p>\n\n<p><strong>Control File Scripts<\/strong><\/p>\n\n<p>CREATE CONTROLFILE<\/p>\n\n<p>SET DATABASE test5<\/p>\n\n<p>LOGFILE<\/p>\n\n<p>GROUP 1 &#8216;\/data\/test5\/redo01_01.log&#8217; size 5M,<\/p>\n\n<p>GROUP 2 &#8216;\/data\/test5\/redo02_01.log&#8217; size 5M<\/p>\n\n<p>RESETLOGS<\/p>\n\n<p>DATAFILE &#8216;\/data\/test5\/o1_mf_sysaux_mmw00w5g_.dbf&#8217; reuse,<\/p>\n\n<p>&#8216;\/data\/test5\/o1_mf_system_mmvzxlgr_.dbf&#8217; reuse,<\/p>\n\n<p>&#8216;\/data\/test5\/o1_mf_undotbs1_mmw029hf_.dbf&#8217; reuse,<\/p>\n\n<p>&#8216;\/data\/test5\/o1_mf_users_mmw02bq6_.dbf&#8217; reuse,<\/p>\n\n<p>&#8216;\/data\/test5\/tbs2.dbf&#8217;&nbsp; reuse<\/p>\n\n<p>MAXLOGFILES 50<\/p>\n\n<p>MAXLOGMEMBERS 3<\/p>\n\n<p>MAXLOGHISTORY 400<\/p>\n\n<p>MAXDATAFILES 200<\/p>\n\n<p>MAXINSTANCES 1<\/p>\n\n<p>ARCHIVELOG;<\/p>\n\n<p>Alter database mount;<\/p>\n\n<p>select name from v$datafile;<\/p>\n\n<p>select name from v$controlfile;<\/p>\n\n<p>Alter database open resetlogs;<\/p>\n\n<p>select table_name,tablespace_name from dba_tables where owner=&#8217;TEST&#8217;;<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":663,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[3],"tags":[107,108],"class_list":["post-676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-database-recovery","tag-oracle-dataase-recovery"],"_links":{"self":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts\/676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/comments?post=676"}],"version-history":[{"count":2,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":679,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts\/676\/revisions\/679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/media\/663"}],"wp:attachment":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/media?parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/categories?post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/tags?post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}