SlideShare a Scribd company logo
1 of 2
Download to read offline
Recovering a Oracle data
fi
le without backup
If a data
fi
le is damaged and no backup of that
fi
le is available, then you can still recover the
data
fi
le given the following condition:
1. All archived log
fi
les written after the creation of the original data
fi
le are available
2.The control
fi
le contains the name of the damaged
fi
le (that is, the control
fi
le is current, or is
a backup taken after the damaged data
fi
le was added to the database).
Steps to recover a data
fi
le without backup
1. Very
fi
rst step we have to do is to re-create a data
fi
le for recovery:
Create a new, empty data
fi
le to replace a damaged data
fi
le that has no corresponding backup.
For example, assume that the data
fi
le /u01/oradata/users01.dbf has been damaged, and no
backup is available. The following statement re-creates the original data
fi
le (same size) on
u02(another location):
ALTER DATABASE CREATE DATAFILE '/u01/oradata/users01.dbf' AS '/u02/users01.dbf';
This statement creates an empty
fi
le that is the same size as the lost
fi
le. The database looks at
information in the control
fi
le and the data dictionary to obtain size information. The old data
fi
le is
renamed as the new data
fi
le.
2. Perform media recovery on the empty data
fi
le.
For example, enter:
RECOVER DATAFILE '/u02/users01.dbf'
--Or use data
fi
le number
RECOVER DATAFILE 8;
All archived logs written after the original data
fi
le was created must be applied to the new, empty
version of the lost data
fi
le during recovery.
Here is a overall summary:
1.shutdown your database
2.take the database in mount state
3.alter database create data
fi
le 'old_data
fi
le_path' as 'new_data
fi
le_path';
4.once new
fi
le created do the incomplete recovery.
5. open the database with resetlogs.
Note:
If after creating new data
fi
le got error:
ERROR at line 1:
ORA-01182: cannot create database
fi
le 8 -
fi
le is in use or recovery
ORA-01110: data
fi
le 8: '/u01/oradata/users01.dbf'
To avoid error - before creating new data
fi
le, you must take the existing data
fi
le (or the
tablespace) o
ffl
ine.
SQL> alter database data
fi
le 8 o
ffl
ine drop;
After o
ffl
ine data
fi
le then do recover and
fi
nally online it.
********************
Restore/Recover data
fi
le from Standby without
database catalog (19c)
SQL> startup
ORACLE instance started.
Total System Global Area #### bytes
Database mounted.
ORA-01157: cannot identify/lock data
fi
le 2 - see DBWR trace
fi
le
ORA-01110: data
fi
le 3: '/u01/oradata/sysaux01.dbf'
RMAN> list backup of data
fi
le 2;
speci
fi
cation does not match any backup in the repository
As you can see on primary database we can not start db and have problem on sysaux.
And supposed that we have no backup.
Solution:
Connect to the Standby as primary connection and to the primary as auxiliary connection, and
make a backup of the data
fi
le 2.
$ rman target sys/pass@pop_stby auxiliary sys/pass@orcl_prim
RMAN>
RMAN> backup as copy data
fi
le 2 auxiliary format '/backup/sysaux01.dbf';
Connect to the primary database, catalog the backup of the data
fi
le as copy, restore and recover
the data
fi
le.
$ rman target sys/pass@pop_prim
connected to target database: pop_prim (DBID=1014132133, not open)
RMAN> catalog data
fi
lecopy '/backup/sysaux01.dbf';
RMAN> restore data
fi
le 3;
RMAN> recover data
fi
le 3;
RMAN> alter database open;
Regards,
Alireza Kamrani.

More Related Content

Similar to Recovering a Oracle datafile without backup.pdf

Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)than sare
 
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdfVikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdfvikas12611618
 
Big file tablespaces
Big file tablespacesBig file tablespaces
Big file tablespacesdev3993
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
ControlfilemanagementVinay Thota
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recoveryaltistory
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database BackupHandy_Backup
 
A practical-guide-for-“essbase-backup-and-recovery-part-ii -
A practical-guide-for-“essbase-backup-and-recovery-part-ii - A practical-guide-for-“essbase-backup-and-recovery-part-ii -
A practical-guide-for-“essbase-backup-and-recovery-part-ii - Abdoulaye M Yansane
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradationinfluxbob
 
Standby db creation commands
Standby db creation commandsStandby db creation commands
Standby db creation commandsPiyush Kumar
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guideAmit87_dba
 
You Oracle Technical Interview
You Oracle Technical InterviewYou Oracle Technical Interview
You Oracle Technical InterviewHossam El-Faxe
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2nesmaddy
 
MDF and LDF in SQL Server
MDF and LDF in SQL ServerMDF and LDF in SQL Server
MDF and LDF in SQL ServerMasum Reza
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productionsOsama Mustafa
 
Startupandshutdown
StartupandshutdownStartupandshutdown
StartupandshutdownVinay Thota
 

Similar to Recovering a Oracle datafile without backup.pdf (20)

Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)
 
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdfVikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
 
Les 06 rec
Les 06 recLes 06 rec
Les 06 rec
 
Big file tablespaces
Big file tablespacesBig file tablespaces
Big file tablespaces
 
Backup&recovery
Backup&recoveryBackup&recovery
Backup&recovery
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 
Less16 Recovery
Less16 RecoveryLess16 Recovery
Less16 Recovery
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
A practical-guide-for-“essbase-backup-and-recovery-part-ii -
A practical-guide-for-“essbase-backup-and-recovery-part-ii - A practical-guide-for-“essbase-backup-and-recovery-part-ii -
A practical-guide-for-“essbase-backup-and-recovery-part-ii -
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 
Standby db creation commands
Standby db creation commandsStandby db creation commands
Standby db creation commands
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guide
 
You Oracle Technical Interview
You Oracle Technical InterviewYou Oracle Technical Interview
You Oracle Technical Interview
 
Les 12 fl_db
Les 12 fl_dbLes 12 fl_db
Les 12 fl_db
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
 
MDF and LDF in SQL Server
MDF and LDF in SQL ServerMDF and LDF in SQL Server
MDF and LDF in SQL Server
 
1 z0 052
1 z0 0521 z0 052
1 z0 052
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productions
 
Startupandshutdown
StartupandshutdownStartupandshutdown
Startupandshutdown
 

More from Alireza Kamrani

Oracle database maximum performance on Exadata
Oracle database maximum performance on ExadataOracle database maximum performance on Exadata
Oracle database maximum performance on ExadataAlireza Kamrani
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfAlireza Kamrani
 
Flashback time travel vs Flash back Data Archive.pdf
Flashback time travel  vs Flash back Data Archive.pdfFlashback time travel  vs Flash back Data Archive.pdf
Flashback time travel vs Flash back Data Archive.pdfAlireza Kamrani
 
Import option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdfImport option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdfAlireza Kamrani
 
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdfAlireza Kamrani
 
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdfAlireza Kamrani
 
♨️CPU limitation per Oracle database instance
♨️CPU limitation per Oracle database instance♨️CPU limitation per Oracle database instance
♨️CPU limitation per Oracle database instanceAlireza Kamrani
 
Out-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden ImagesOut-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden ImagesAlireza Kamrani
 
IO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performanceIO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performanceAlireza Kamrani
 
The Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAsThe Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAsAlireza Kamrani
 
What is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of databaseWhat is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of databaseAlireza Kamrani
 
🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...Alireza Kamrani
 
Oracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking featuresOracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking featuresAlireza Kamrani
 
Store non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSONStore non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSONAlireza Kamrani
 
Enhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning ClauseEnhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning ClauseAlireza Kamrani
 
PostgreSQL vs Oracle a brief comparison
PostgreSQL vs Oracle a brief  comparisonPostgreSQL vs Oracle a brief  comparison
PostgreSQL vs Oracle a brief comparisonAlireza Kamrani
 
How to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQLHow to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQLAlireza Kamrani
 

More from Alireza Kamrani (17)

Oracle database maximum performance on Exadata
Oracle database maximum performance on ExadataOracle database maximum performance on Exadata
Oracle database maximum performance on Exadata
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
 
Flashback time travel vs Flash back Data Archive.pdf
Flashback time travel  vs Flash back Data Archive.pdfFlashback time travel  vs Flash back Data Archive.pdf
Flashback time travel vs Flash back Data Archive.pdf
 
Import option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdfImport option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdf
 
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
 
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
 
♨️CPU limitation per Oracle database instance
♨️CPU limitation per Oracle database instance♨️CPU limitation per Oracle database instance
♨️CPU limitation per Oracle database instance
 
Out-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden ImagesOut-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden Images
 
IO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performanceIO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performance
 
The Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAsThe Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAs
 
What is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of databaseWhat is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of database
 
🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...
 
Oracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking featuresOracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking features
 
Store non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSONStore non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSON
 
Enhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning ClauseEnhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning Clause
 
PostgreSQL vs Oracle a brief comparison
PostgreSQL vs Oracle a brief  comparisonPostgreSQL vs Oracle a brief  comparison
PostgreSQL vs Oracle a brief comparison
 
How to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQLHow to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQL
 

Recently uploaded

FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 

Recently uploaded (20)

FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 

Recovering a Oracle datafile without backup.pdf

  • 1. Recovering a Oracle data fi le without backup If a data fi le is damaged and no backup of that fi le is available, then you can still recover the data fi le given the following condition: 1. All archived log fi les written after the creation of the original data fi le are available 2.The control fi le contains the name of the damaged fi le (that is, the control fi le is current, or is a backup taken after the damaged data fi le was added to the database). Steps to recover a data fi le without backup 1. Very fi rst step we have to do is to re-create a data fi le for recovery: Create a new, empty data fi le to replace a damaged data fi le that has no corresponding backup. For example, assume that the data fi le /u01/oradata/users01.dbf has been damaged, and no backup is available. The following statement re-creates the original data fi le (same size) on u02(another location): ALTER DATABASE CREATE DATAFILE '/u01/oradata/users01.dbf' AS '/u02/users01.dbf'; This statement creates an empty fi le that is the same size as the lost fi le. The database looks at information in the control fi le and the data dictionary to obtain size information. The old data fi le is renamed as the new data fi le. 2. Perform media recovery on the empty data fi le. For example, enter: RECOVER DATAFILE '/u02/users01.dbf' --Or use data fi le number RECOVER DATAFILE 8; All archived logs written after the original data fi le was created must be applied to the new, empty version of the lost data fi le during recovery. Here is a overall summary: 1.shutdown your database 2.take the database in mount state 3.alter database create data fi le 'old_data fi le_path' as 'new_data fi le_path'; 4.once new fi le created do the incomplete recovery. 5. open the database with resetlogs. Note: If after creating new data fi le got error: ERROR at line 1: ORA-01182: cannot create database fi le 8 - fi le is in use or recovery ORA-01110: data fi le 8: '/u01/oradata/users01.dbf' To avoid error - before creating new data fi le, you must take the existing data fi le (or the tablespace) o ffl ine.
  • 2. SQL> alter database data fi le 8 o ffl ine drop; After o ffl ine data fi le then do recover and fi nally online it. ******************** Restore/Recover data fi le from Standby without database catalog (19c) SQL> startup ORACLE instance started. Total System Global Area #### bytes Database mounted. ORA-01157: cannot identify/lock data fi le 2 - see DBWR trace fi le ORA-01110: data fi le 3: '/u01/oradata/sysaux01.dbf' RMAN> list backup of data fi le 2; speci fi cation does not match any backup in the repository As you can see on primary database we can not start db and have problem on sysaux. And supposed that we have no backup. Solution: Connect to the Standby as primary connection and to the primary as auxiliary connection, and make a backup of the data fi le 2. $ rman target sys/pass@pop_stby auxiliary sys/pass@orcl_prim RMAN> RMAN> backup as copy data fi le 2 auxiliary format '/backup/sysaux01.dbf'; Connect to the primary database, catalog the backup of the data fi le as copy, restore and recover the data fi le. $ rman target sys/pass@pop_prim connected to target database: pop_prim (DBID=1014132133, not open) RMAN> catalog data fi lecopy '/backup/sysaux01.dbf'; RMAN> restore data fi le 3; RMAN> recover data fi le 3; RMAN> alter database open; Regards, Alireza Kamrani.