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

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

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;