SlideShare a Scribd company logo
1 of 5
AnarGodjaev

BACKUP and RECOVERY
Lsnrctl services [listener01]
Mean_time_between_failures
Mean_time_to_recover

//*should be bigger in value*//
//*should be smaller in value*//

Problem
Statement failure
logic error
insufficient privileges
Process failure
‐user session abnormally terminated
User errors
‐drop table
‐truncate table
‐delete...commit
Instance failure
v$sgastat
- pool
- name
- bytes
v$log
- group_number
- log_sequence_number
- size_of_the_group
- number_of_members
v$logfile
- name
- status
- group
large pool
- backup restore operations
- I/O server processes
- Session memory fro shared users
- Large_pool_size (approximately 2gb)
Rman
- dbwr_io_slaves (integer)
- backup_tape_io_slaves (true|false)

Solution
Statement failure
Add filespace to the tablespace
Pmon
Recover from a backup

Restart the instance
AnarGodjaev
SQL> alter system switch logfile;
Alter database db_name rename file ‘...’ to ‘...’;
Fast_start_mttr_target:
expectedmttr specified in seconds amount of the time that has passed since the incremental
checkpoint at the position where the last write to redo log file occured.
Log_checkpoint_interval:
number of redo log file blocks that can exist between an incremental checkpoint and the last
block written to the redo log.
v$instance recovery
recovery_estimated_ios: ‐ recovery_estimated_ios: number of dirty buffers in the buffer cache
actual_redo_blks: - current actual number of redo blocks required for recovery
taret_redo_blks: - current number of redo blocks that must be processed for recovery
log_file_size_redo_blks: - current number of redo blocks required to guarantee that
a log switch doesnt occur before checkpoint.
log_chkpt_timeout_redo_blks:
estimated_mttr: current estimated mean time to recover (mttr). Based on the number of dirty
buffers and redo log blocks.
ckpt_block_writes: number of blocks written by checkpoint writes
v$fast_start_servers
v$fast_start_transactions
rolling forward phase
- set recovery_parallelism<integer>
- use parallel clause in the recover database statement
rolling back phase
‐ set fast_start_parallel_rollback [false | low | high] //low is default

user managed backup and recovery
offline backup – consistant whole database setup
AnarGodjaev
SQL> shutdown immediate
!cp<files> /backup/... //control file, datafile, redo log file, password file, parameter file
startup open
online backup – the database should be in archive log mode
SQL> alter tablespace users begin backup
!copy the datafiles
altertablespace users end backup
alter system archivelog current
//archive the unarchivedredologs so that the redo
required to recover the tablespace backup is achieved query the following views.
v$backup
//file,status,change,time
v$datafile_header
SQL> alter database end backup;
Alter database datafile ‘...’ end backup;
Alter tablespace<tablespace name> read only;
!backup the datafiles
Alter tablespace<tablespace name> read write;
Logging and nologging
Set database to nologging for faster data loading After this you should backup the datafiles
SQL> Alter database backup controlfile to ‘control01.bck’;
Alter database backup controlfile to trace;
Obtain database information by quering the following views
v$datafile
v$controlfile
v$logfile
dba_datafiles
user managed recovery
- time based
- cancel based
- change based
recovery steps
1‐ damaged files are restored from backup
2‐ changes from archived redo logs or online redo logs are applied if necessary
AnarGodjaev
3‐ the database may now contain commited and uncommited changes
4‐ the undo block are used to rollback any uncommited changes
5‐ the database is now in recoverd state
recovery in noarchivelog mode
1‐ restore all datafiles even one of them needs recovery
2‐ shutdown the instance
3‐ perform cancel based recovery
4‐ open database with resetlogs
SQL> shutdown immediate
!cp ‘...’ ‘...’
recover database until cancel using backup control file
cancel
alter database open resetlogs
recovery in archivelog mode
1‐ query the v$recover_file, v$archived_log, v$recovery_log
2‐ recover database
//mounted database
3‐ recover datafile ‘...’
//mounted database
4‐ recover tablespaceusers
//open database
5‐ recover datafile ‘...’
//open database
SQL> shutdown abort
Startup mount
Recover database
//recover datafile ‘...’
Alter database open
!cp ‘...’ ‘...’
alter database rename file ‘...’ to ‘...’
startup mount
alter database datafile ‘...’ offline
alter database open
restoredatafile
alter database rename file ‘...’ to ‘...’
alter database recover
recoverdatafile ‘...’
//recover tablespace<tablespace name>
alter database datafile ‘...’ online;
altertablespaceuser_data offline immediate;
alter database create datafile ‘...’ [as] ‘...’;
alter database recover;
altertablespacetable_data online;
AnarGodjaev
createcontrolfile;
recover database using backup controlfile;
1‐ shutdown and backup the database
2‐ restore all datafiles, dont restore controlfile, redo logs, password file and parameter file
3‐ mount database
4‐ recover datafiles
5‐ open database with resetlogs
6‐ perform a closed database backup
SQL> Recover database until cancel
Recover [automatic] database until time ‘2013‐10‐26:14:22:03’
Time based database recovery
1‐ shutdown and backup the database
2‐ restore all datafiles
//may need to recover archivelogs
3‐ mount database
4‐ recover database until time
5‐ open with resetlogs
6‐ backup the database
cancel based database recovery
1‐ redo logs are not multiplexed
one of the redo logs is missing
the missing redo log is not archived
2‐ shutdown database
3‐ restore all datafiles from backup
4‐ mount the database
5‐ recover database until cancel
6‐ open database with resetlogs
7‐ backup database
loss of current redo log files
- attempt to open database
- find the current log sequence number
- recover database until cancel
- drop and recreate log files if necessary
- open database with resetlogs
- perform whole database backup

//select * from v$log

SQL> alter database clear unarchivedlogfile group 2;

More Related Content

What's hot

Step by Step Restore rman to different host
Step by Step Restore rman to different hostStep by Step Restore rman to different host
Step by Step Restore rman to different hostOsama Mustafa
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklistpraveen_01236
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsRoo Wall
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Recvivaankumar
 
Les 11 Fb Queries
Les 11 Fb QueriesLes 11 Fb Queries
Les 11 Fb Queriesvivaankumar
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespaceSoumya Das
 
Postgresql Database Administration Basic - Day2
Postgresql  Database Administration Basic  - Day2Postgresql  Database Administration Basic  - Day2
Postgresql Database Administration Basic - Day2PoguttuezhiniVP
 
Postgresql Database Administration Basic - Day1
Postgresql  Database Administration Basic  - Day1Postgresql  Database Administration Basic  - Day1
Postgresql Database Administration Basic - Day1PoguttuezhiniVP
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Buvivaankumar
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby databaseJorge Batista
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installationvivaankumar
 
Postgresql Database Administration- Day3
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3PoguttuezhiniVP
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from Anar Godjaev
 
Les 10 Tune Rman
Les 10 Tune RmanLes 10 Tune Rman
Les 10 Tune Rmanvivaankumar
 

What's hot (20)

Les 01 Arch
Les 01 ArchLes 01 Arch
Les 01 Arch
 
Step by Step Restore rman to different host
Step by Step Restore rman to different hostStep by Step Restore rman to different host
Step by Step Restore rman to different host
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windows
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
 
Les 11 Fb Queries
Les 11 Fb QueriesLes 11 Fb Queries
Les 11 Fb Queries
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespace
 
Postgresql Database Administration Basic - Day2
Postgresql  Database Administration Basic  - Day2Postgresql  Database Administration Basic  - Day2
Postgresql Database Administration Basic - Day2
 
Les 03 Catalog
Les 03 CatalogLes 03 Catalog
Les 03 Catalog
 
Postgresql Database Administration Basic - Day1
Postgresql  Database Administration Basic  - Day1Postgresql  Database Administration Basic  - Day1
Postgresql Database Administration Basic - Day1
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
 
Less17 Util
Less17  UtilLess17  Util
Less17 Util
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installation
 
Postgresql Database Administration- Day3
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3
 
Les 09 Tspitr
Les 09 TspitrLes 09 Tspitr
Les 09 Tspitr
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
Les 10 Tune Rman
Les 10 Tune RmanLes 10 Tune Rman
Les 10 Tune Rman
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
Les 08 Dupe Db
Les 08 Dupe DbLes 08 Dupe Db
Les 08 Dupe Db
 

Viewers also liked

How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...Anar Godjaev
 
Conditional Control
Conditional ControlConditional Control
Conditional ControlAnar Godjaev
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden GateAnar Godjaev
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin GüvenliğiAnar Godjaev
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasiAnar Godjaev
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery ProcedureAnar Godjaev
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaultAnar Godjaev
 

Viewers also liked (11)

Wait Interface
Wait InterfaceWait Interface
Wait Interface
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...
 
Conditional Control
Conditional ControlConditional Control
Conditional Control
 
Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Table Partitions
Table PartitionsTable Partitions
Table Partitions
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Tuning SGA
Tuning SGATuning SGA
Tuning SGA
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin Güvenliği
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasi
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vault
 

Similar to Backup and Recovery

[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recoveryaltistory
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_pptmaclean liu
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklistمسلم islam
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Conceptsvivaankumar
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
ControlfilemanagementVinay Thota
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.subhani shaik
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.subhani shaik
 
B35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarezB35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarezInsight Technology, Inc.
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guideAmit87_dba
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in DataguardJason Arneil
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsMark Leith
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlMoeen_uddin
 
Cloning database using srdf copy
Cloning database using srdf copyCloning database using srdf copy
Cloning database using srdf copyAmit Vashishth
 

Similar to Backup and Recovery (20)

[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
5895640.ppt
5895640.ppt5895640.ppt
5895640.ppt
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
 
MySQL Backup & Recovery
MySQL Backup & RecoveryMySQL Backup & Recovery
MySQL Backup & Recovery
 
Xpp c user_rec
Xpp c user_recXpp c user_rec
Xpp c user_rec
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
Backup&recovery
Backup&recoveryBackup&recovery
Backup&recovery
 
B35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarezB35 all you wanna know about rman by francisco alvarez
B35 all you wanna know about rman by francisco alvarez
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guide
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in Dataguard
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
Les 12 fl_db
Les 12 fl_dbLes 12 fl_db
Les 12 fl_db
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
Cloning database using srdf copy
Cloning database using srdf copyCloning database using srdf copy
Cloning database using srdf copy
 

More from Anar Godjaev

Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumAnar Godjaev
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon ExportAnar Godjaev
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Anar Godjaev
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Anar Godjaev
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeAnar Godjaev
 
Recovery Manager (RMAN)
Recovery Manager (RMAN)Recovery Manager (RMAN)
Recovery Manager (RMAN)Anar Godjaev
 
Oracle Enterprise Linux 5
Oracle Enterprise Linux 5Oracle Enterprise Linux 5
Oracle Enterprise Linux 5Anar Godjaev
 
Oracle Database 11g R2 Installation
Oracle Database 11g R2 InstallationOracle Database 11g R2 Installation
Oracle Database 11g R2 InstallationAnar Godjaev
 
Oracle Tablespace Yonetimi
Oracle Tablespace YonetimiOracle Tablespace Yonetimi
Oracle Tablespace YonetimiAnar Godjaev
 

More from Anar Godjaev (17)

Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
 
Contraints
ContraintsContraints
Contraints
 
Oracle SQL
Oracle SQLOracle SQL
Oracle SQL
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
 
PL/SQL Blocks
PL/SQL BlocksPL/SQL Blocks
PL/SQL Blocks
 
Parallel Server
Parallel ServerParallel Server
Parallel Server
 
LogMiner
LogMinerLogMiner
LogMiner
 
Undo Management
Undo ManagementUndo Management
Undo Management
 
ASM
ASMASM
ASM
 
Recovery Manager (RMAN)
Recovery Manager (RMAN)Recovery Manager (RMAN)
Recovery Manager (RMAN)
 
Oracle Enterprise Linux 5
Oracle Enterprise Linux 5Oracle Enterprise Linux 5
Oracle Enterprise Linux 5
 
Oracle Database 11g R2 Installation
Oracle Database 11g R2 InstallationOracle Database 11g R2 Installation
Oracle Database 11g R2 Installation
 
Change DB Name
Change DB NameChange DB Name
Change DB Name
 
Oracle Tablespace Yonetimi
Oracle Tablespace YonetimiOracle Tablespace Yonetimi
Oracle Tablespace Yonetimi
 

Recently uploaded

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Backup and Recovery

  • 1. AnarGodjaev BACKUP and RECOVERY Lsnrctl services [listener01] Mean_time_between_failures Mean_time_to_recover //*should be bigger in value*// //*should be smaller in value*// Problem Statement failure logic error insufficient privileges Process failure ‐user session abnormally terminated User errors ‐drop table ‐truncate table ‐delete...commit Instance failure v$sgastat - pool - name - bytes v$log - group_number - log_sequence_number - size_of_the_group - number_of_members v$logfile - name - status - group large pool - backup restore operations - I/O server processes - Session memory fro shared users - Large_pool_size (approximately 2gb) Rman - dbwr_io_slaves (integer) - backup_tape_io_slaves (true|false) Solution Statement failure Add filespace to the tablespace Pmon Recover from a backup Restart the instance
  • 2. AnarGodjaev SQL> alter system switch logfile; Alter database db_name rename file ‘...’ to ‘...’; Fast_start_mttr_target: expectedmttr specified in seconds amount of the time that has passed since the incremental checkpoint at the position where the last write to redo log file occured. Log_checkpoint_interval: number of redo log file blocks that can exist between an incremental checkpoint and the last block written to the redo log. v$instance recovery recovery_estimated_ios: ‐ recovery_estimated_ios: number of dirty buffers in the buffer cache actual_redo_blks: - current actual number of redo blocks required for recovery taret_redo_blks: - current number of redo blocks that must be processed for recovery log_file_size_redo_blks: - current number of redo blocks required to guarantee that a log switch doesnt occur before checkpoint. log_chkpt_timeout_redo_blks: estimated_mttr: current estimated mean time to recover (mttr). Based on the number of dirty buffers and redo log blocks. ckpt_block_writes: number of blocks written by checkpoint writes v$fast_start_servers v$fast_start_transactions rolling forward phase - set recovery_parallelism<integer> - use parallel clause in the recover database statement rolling back phase ‐ set fast_start_parallel_rollback [false | low | high] //low is default user managed backup and recovery offline backup – consistant whole database setup
  • 3. AnarGodjaev SQL> shutdown immediate !cp<files> /backup/... //control file, datafile, redo log file, password file, parameter file startup open online backup – the database should be in archive log mode SQL> alter tablespace users begin backup !copy the datafiles altertablespace users end backup alter system archivelog current //archive the unarchivedredologs so that the redo required to recover the tablespace backup is achieved query the following views. v$backup //file,status,change,time v$datafile_header SQL> alter database end backup; Alter database datafile ‘...’ end backup; Alter tablespace<tablespace name> read only; !backup the datafiles Alter tablespace<tablespace name> read write; Logging and nologging Set database to nologging for faster data loading After this you should backup the datafiles SQL> Alter database backup controlfile to ‘control01.bck’; Alter database backup controlfile to trace; Obtain database information by quering the following views v$datafile v$controlfile v$logfile dba_datafiles user managed recovery - time based - cancel based - change based recovery steps 1‐ damaged files are restored from backup 2‐ changes from archived redo logs or online redo logs are applied if necessary
  • 4. AnarGodjaev 3‐ the database may now contain commited and uncommited changes 4‐ the undo block are used to rollback any uncommited changes 5‐ the database is now in recoverd state recovery in noarchivelog mode 1‐ restore all datafiles even one of them needs recovery 2‐ shutdown the instance 3‐ perform cancel based recovery 4‐ open database with resetlogs SQL> shutdown immediate !cp ‘...’ ‘...’ recover database until cancel using backup control file cancel alter database open resetlogs recovery in archivelog mode 1‐ query the v$recover_file, v$archived_log, v$recovery_log 2‐ recover database //mounted database 3‐ recover datafile ‘...’ //mounted database 4‐ recover tablespaceusers //open database 5‐ recover datafile ‘...’ //open database SQL> shutdown abort Startup mount Recover database //recover datafile ‘...’ Alter database open !cp ‘...’ ‘...’ alter database rename file ‘...’ to ‘...’ startup mount alter database datafile ‘...’ offline alter database open restoredatafile alter database rename file ‘...’ to ‘...’ alter database recover recoverdatafile ‘...’ //recover tablespace<tablespace name> alter database datafile ‘...’ online; altertablespaceuser_data offline immediate; alter database create datafile ‘...’ [as] ‘...’; alter database recover; altertablespacetable_data online;
  • 5. AnarGodjaev createcontrolfile; recover database using backup controlfile; 1‐ shutdown and backup the database 2‐ restore all datafiles, dont restore controlfile, redo logs, password file and parameter file 3‐ mount database 4‐ recover datafiles 5‐ open database with resetlogs 6‐ perform a closed database backup SQL> Recover database until cancel Recover [automatic] database until time ‘2013‐10‐26:14:22:03’ Time based database recovery 1‐ shutdown and backup the database 2‐ restore all datafiles //may need to recover archivelogs 3‐ mount database 4‐ recover database until time 5‐ open with resetlogs 6‐ backup the database cancel based database recovery 1‐ redo logs are not multiplexed one of the redo logs is missing the missing redo log is not archived 2‐ shutdown database 3‐ restore all datafiles from backup 4‐ mount the database 5‐ recover database until cancel 6‐ open database with resetlogs 7‐ backup database loss of current redo log files - attempt to open database - find the current log sequence number - recover database until cancel - drop and recreate log files if necessary - open database with resetlogs - perform whole database backup //select * from v$log SQL> alter database clear unarchivedlogfile group 2;