SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Checkpointing
 Saves information about the current status of, and changes to, the
database to data files
 Management tasks after checkpointing has completed
 Change the current recovery start point to the end point of checkpointing
 Delete unneeded redo log files that have been applied to data files
 Regular checkpointing reduces the amount of time required to recover the
database in the event of a fault.
ALTIBASE HDB Checkpointing features
 Fuzzy & Ping-pong checkpointing
 Transaction performance is not reduced during checkpointing
 Two sets of data files are maintained
 Only applies to memory tablespaces
Performing Checkpointing
 Automatic execution (Default)
 Set auto-execution using the CHECKPOINT_ENABLED property
 Checkpointing interval: - CHECKPOINT_INTERVAL_IN_SEC
 Number of redo log files- CHECKPOINT_INTERVAL_IN_LOG
 Manual execution
 User command - Only the SYS user can perform checkpointing manually.
Reasons why redo log files might not be deleted after
checkpointing is completed:
 They might contain information about transactions that are still underway
 In Archivelog mode, they have not yet been archived
 If using replication, they have not yet been converted to XLogs and sent for
replication
iSQL> ALTER SYSTEM CHECKPOINT;
Database mode
 Redo log files are managed in one of two different ways after
checkpointing:
 Archivelog mode – Archived to a specified path and then deleted
 Noarchivelog mode – Deleted without being archived
 Set when the CREATE DATABASE statement is executed
 Can be subsequently changed in the CONTROL startup phase (restart
required)
Comparison
Database Mode Pros Cons
Archivelog mode
 Media recovery possible
 If archive log files are not lost,
recovery up to the present time is
possible.
 Disk space for saving archive log files
must be provided.
 DBA is burdened with additional
archive log file management tasks
Noarchivelog mode
 No disk space for saving archive
log files is needed.
 DBA need not perform archive log
file management tasks
 Media recovery is impossible.
 Recovery is only possible up to the
point at which the most recent offline
backup was conducted.
Checking the current database mode
 More detailed information can be checked by querying the v$archive
performance view
Changing the database mode after the database is created
 Start up ALTIBASE HDB in the CONTROL phase
 Change the database mode
 Can only be changed by the SYS user in SYSDBA mode
iSQL> connect sys/manager as sysdba
iSQL(sysdba)> shutdown immediate;
iSQL(sysdba)> startup control;
iSQL(sysdba)> ALTER DATABASE ARCHIVELOG;
iSQL(sysdba)> startup;
iSQL(sysdba)> SELECT archive_mode, archive_dest FROM v$archive;
ARCHIVE_MODE ARCHIVE_DEST
--------------------------------------------------------------------
0 /edu/alti1/altibase_home/arch_logs
Types of database backup and objects that are backed up
 Online backup-related commands can only be executed by the “SYS” user,
in SYSDBA mode
 Cannot be executed from multiple sessions, as there can be only one
SYSDBA mode session at any time.
Backup Type Target Object
Recovery
Point
DB Mode
Online Database Backup
The entire database (data files, log
anchor files) except redo log files
 Present
time point
 Must be
Archivelog mode
Online Tablespace Backup
The data files for a particular
tablespaceOnline Tablespace backup
by “file system copy”
Online log anchor backup log anchor files
Offline backup
The entire database (data files, log
anchor files, redo log files)  Time of
last backup
 Noarchivelog or
Archivelog mode
Backup using aexport and
iloader
Schema creation script, data in a
particular table
Online Database Backup
 Back up the entire database at particular time points while ALTIBASE HDB
is running
 When the command is executed, all data files and redo loganchor files are
automatically backed up to the specified directory
 Only one of two (#0 and #1) checkpoint image files is backed up
 Temporary tablespace data files are not backed up, as they are only used for
processing queries
iSQL(sysdba)> ALTER DATABASE BACKUP DATABASE TO 'backup_dir ';
Online Tablespace Backup
 Back up a particular tablespace while ALTIBASE HDB is running
 The data files related to the tablespace are automatically backed up to the
specified path when the command is executed.
 Only one of two (#0 and #1) memory tablespace-related data files is backed
up
iSQL(sysdba)> ALTER DATABASE BACKUP
TABLESPACE tablespace_name TO 'backup_dir ';
Online Tablespace Backup by DBA
 Backup particular tablespace while DB is operating
 Copy tablespace datafile using OS copy command after the backup using
backup command
 Log switching is essential to forcibly archive the related redo log file
 Interoperable with 3rd party backup solution as the multiple tablespaces
can be backed up simultaneously
1. iSQL(sysdba)> ALTER TABLESPACE tablespace_name BEGIN BACKUP;
2. Copy tablespace datafile using OS copy command
3. iSQL(sysdba)> ALTER TABLESPACE tablespace_name END BACKUP;
4. iSQL(sysdba)> ALTER SYSTEM SWITCH LOGFILE;
Online log anchor file backup
 Back up log anchor files while ALTIBASE HDB is running
 All three log anchor files are automatically backed up to the specified path
when the query is executed
 When altering the tablespace (ALTER DATABASE), the modified
tablespace and dictionary tablespace are also backed up, in case they are
needed for recovery
iSQL(sysdba)> ALTER DATABASE BACKUP LOGANCHOR TO 'backup_dir ';
iSQL(sysdba)> ALTER DATABASE BACKUP
2 TABLESPACE tablespace_name TO 'backup_dir ';
iSQL(sysdba)> ALTER DATABASE BACKUP
2 TABLESPACE SYS_TBS_MEM_DIC TO 'backup_dir ';
Offline database backup
 Back up the entire database after ALTIBASE HDB is shut down.
 Back up data files, redo log files and log anchor files using an OS copy
command.
1. iSQL(sysdba)> shutdown immediate;
2. Backup data files, redo log files and loganchor files by using OS copy command.
3. iSQL(sysdba)> startup;
Example of offline database backup
 altibase.properties settings
 Backup procedure
 This example assumes that the tablespace data files are located in the
default directory
MEM_DB_DIR = ?/mem_dbs
DEFAULT_DISK_DB_DIR = ?/dbs
LOG_DIR = ?/logs
LOGANCHOR_DIR = ?/logs
iSQL(sysdba)> shutdown immediate;
shell> cp –r $ALTIBASE_HOME/mem_dbs/* /backup
shell> cp –r $ALTIBASE_HOME/dbs/* /backup
shell> cp –r $AL TIBASE_HOME/logs /backup
iSQL(sysdba)> startup;
Backup Considerations
 When performing offline backup, there are more things to check other than
the default directory in the properties file
 Data files in other directories might be missed
 Check data file-related performance views for data files in other directories.
 Online backup and checkpointing cannot be performed simultaneously
 If checkpointing is underway when the online backup procedure starts, the
backup procedure waits for checkpointing to finish
 If online backup is underway when checkpointing is attempted, an error
occurs
[ERR-110A4 : Backup is in progress. Please wait until the current backup process
completes.]
 Do one of the followings to prepare for recovery when modifying a
tablespace:
 Back up the tablespace, the dictionary tablespace, and log anchor files
 Perform online or offline database backup
 If any replication objects exist, replication information is also backed up.
 If the database is restored on a system with a different IP address, the
replication error will occur.
Restart Recovery
 Automatic recovery in the event of an abnormal shutdown, such as a
power outage or a system crash.
………
TRANSITION TO PHASE : META
[SM] Recovery Phase - 1 : Preparing Database
: Dynamic Memory Version => Parallel Loading
[SM] Recovery Phase - 2 : Loading Database
[SM] Recovery Phase - 3 : Starting Recovery
Initializing Active Transaction List
Redo
Refine Disk Table..
Undo
[SM] Refine Memory Table :
........................................................................................................................................ [SUCCESS]
Media recovery
 Performed when data files are missing or corrupted.
 The database should be manually restored using:
 archive log files
 backup data files
 log anchor files
 Recovery commands must be executed in the CONTROL phase. (Online
recovery is not possible.)
 Is possible only if ALTIBASE HDB is operating in Archivelog mode.
 Both complete and partial recovery are possible
Complete recovery
 Execute the command shown below to restore the database up to the
present:
Considerations
 The archive log files AND the redo log files generated since the most
recent complete database backup must not be corrupted.
 The most recently updated log anchor files are needed.
iSQL(sysdba)> ALTER DATABASE RECOVER DATABASE;
Partial recovery
 Restore the database to a specific point in time by executing the command
shown below:
 If redo log files or archive log files are missing or corrupted:
 To restore the database to a specified point in time:
 Redo log files must be reset after performing partial recovery.
 This step is mandatory in order to avoid restart recovery when the system is
restarted.
Consideration
 In order to restore the database to a specific point in time, the log anchor
files up to that time are needed.
iSQL(sysdba)> ALTER DATABASE db_name META RESETLOGS;
iSQL(sysdba)> ALTER DATABASE RECOVER DATABASE UNTIL CANCEL;
iSQL(sysdba)> ALTER DATABASE RECOVER DATABASE UNTIL TIME ‘2010-09-10:17:55:00’;
Recovery example in case of missing data file (1) – recovery
using backup data files
 Use the redo log files whose LSN (Log Sequence Number) is between the
LSN of the backup data files and the current LSN of the database.
Log Anchor
User1.dbf information
Creation LSN(20:012284)
Checkpoint LSN(102:172168)
Archive Logs Directory
Log File 32 Log File 100…
Log File 101 Log File 102
Online Redo Logs directory
User1.dbf (backup file)
Recovery command executed
User1.dbf
LSN
102:172168
Replay
Redo logs
LSN
32:345698User1.dbf
Media Recovery Process
Log File 0 …
Recovery example in case of missing data file (2) – recovery by
creating empty data files
 Perform recovery using archive log files and active redo log files after
creating data files.
 Use the redo log files whose LSN (Log Sequence Number) is between the
LSN of the backup data files and the current LSN of the database.
Log Anchor
User1.dbf information
Creation LSN(20:012284)
Checkpoint LSN(102:172168)
Archive Logs Directory
Log File 20 Log File 100…
Log File 101 Log File 102
Online Logs Directory
Create missing User1.dbf
Recovery command executed
User1.dbf
LSN
102:172168
Replay
Redo logs
User1.dbf
Media Recovery Process
Log File 0 …
Create an empty data file for media recovery
 Create one in the CONTROL phase if no backup data files exist.
 Create an empty memory tablespace data file:
 Create an empty disk tablespace data file:
Consideration
 The location of the data file must be same as the directory recorded in the
log anchor file.
iSQL(sysdba)> ALTER DATABASE CREATE DATAFILE 'user_disk_data001.dbf';
iSQL(sysdba)> ALTER DATABASE CREATE CHECKPOINT IMAGE 'USER_MEM_DATA-1-0';
Considerations during media recovery
 Some data files must be created by the user.
 Memory tablespace data files must be copied to form a pair.
 Empty temporary tablespace data files must be created in the CONTROL
phase.
Considerations after media recovery
 Back up the database after performing partial recovery.
 If the database is not backed up at this time, and recovery is again
subsequently performed, it will be impossible to recover any changes made
to the database after the redo logs were initialized.
shell> cp USER_MEM_DATA-1-0 USER_MEM_DATA-0-0;
iSQL(sysdba)> ALTER DATABASE CREATE DATAFILE 'temp001.dbf';

Mais conteúdo relacionado

Mais procurados

Four Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and DatabricksFour Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and DatabricksLegacy Typesafe (now Lightbend)
 
Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardDelta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardParis Data Engineers !
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Nelson Calero
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupDatabricks
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMarkus Michalewicz
 
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...confluent
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New GenerationAnil Nair
 
Automating Your Clone in E-Business Suite R12.2
Automating Your Clone in E-Business Suite R12.2Automating Your Clone in E-Business Suite R12.2
Automating Your Clone in E-Business Suite R12.2Michael Brown
 
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...Simplilearn
 
a Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resourcesa Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application ResourcesDataWorks Summit
 
Oracle Database Availability & Scalability Across Versions & Editions
Oracle Database Availability & Scalability Across Versions & EditionsOracle Database Availability & Scalability Across Versions & Editions
Oracle Database Availability & Scalability Across Versions & EditionsMarkus Michalewicz
 
Anglo American local procurement
Anglo American local procurementAnglo American local procurement
Anglo American local procurementAnglo American
 
Top 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationsTop 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationshadooparchbook
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015Cloudera, Inc.
 
Productizing Structured Streaming Jobs
Productizing Structured Streaming JobsProductizing Structured Streaming Jobs
Productizing Structured Streaming JobsDatabricks
 
Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)
Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)
Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)Elasticsearch
 
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3Databricks
 

Mais procurados (20)

Four Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and DatabricksFour Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and Databricks
 
Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardDelta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark Meetup
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
 
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
From Postgres to Event-Driven: using docker-compose to build CDC pipelines in...
 
Real time data quality on Flink
Real time data quality on FlinkReal time data quality on Flink
Real time data quality on Flink
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
 
Automating Your Clone in E-Business Suite R12.2
Automating Your Clone in E-Business Suite R12.2Automating Your Clone in E-Business Suite R12.2
Automating Your Clone in E-Business Suite R12.2
 
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
 
a Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resourcesa Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resources
 
Oracle Database Availability & Scalability Across Versions & Editions
Oracle Database Availability & Scalability Across Versions & EditionsOracle Database Availability & Scalability Across Versions & Editions
Oracle Database Availability & Scalability Across Versions & Editions
 
Anglo American local procurement
Anglo American local procurementAnglo American local procurement
Anglo American local procurement
 
Top 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationsTop 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applications
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015
 
Productizing Structured Streaming Jobs
Productizing Structured Streaming JobsProductizing Structured Streaming Jobs
Productizing Structured Streaming Jobs
 
Spark
SparkSpark
Spark
 
Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)
Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)
Replicate Elasticsearch Data with Cross-Cluster Replication (CCR)
 
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
 

Semelhante a [Altibase] 13 backup and recovery

Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Recvivaankumar
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recoveryArun Sharma
 
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
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recoveryYogiji Creations
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and RecoveryAnar Godjaev
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productionsOsama Mustafa
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Conceptsvivaankumar
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlMoeen_uddin
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery ProcedureAnar Godjaev
 
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
Percona Live London 2014 - MySQL Backup Strategy @ IEDRPercona Live London 2014 - MySQL Backup Strategy @ IEDR
Percona Live London 2014 - MySQL Backup Strategy @ IEDRMarcelo Altmann
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklistpraveen_01236
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Featuresxiangrong
 
Oracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesOracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesSaiful
 

Semelhante a [Altibase] 13 backup and recovery (20)

Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
 
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)
 
MySQL Backup & Recovery
MySQL Backup & RecoveryMySQL Backup & Recovery
MySQL Backup & Recovery
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
 
Xpp c user_rec
Xpp c user_recXpp c user_rec
Xpp c user_rec
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productions
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
Les 12 fl_db
Les 12 fl_dbLes 12 fl_db
Les 12 fl_db
 
Les 06 rec
Les 06 recLes 06 rec
Les 06 rec
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
Percona Live London 2014 - MySQL Backup Strategy @ IEDRPercona Live London 2014 - MySQL Backup Strategy @ IEDR
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
 
Les 02 config
Les 02 configLes 02 config
Les 02 config
 
Missing redo logs in oracle
Missing redo logs in oracleMissing redo logs in oracle
Missing redo logs in oracle
 
Oracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesOracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slides
 

Mais de altistory

[Altibase] 4-5 summary of tablespace management
[Altibase] 4-5 summary of tablespace management[Altibase] 4-5 summary of tablespace management
[Altibase] 4-5 summary of tablespace managementaltistory
 
[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)altistory
 
[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)altistory
 
[Altibase] 10 replication part3 (system design)
[Altibase] 10 replication part3 (system design)[Altibase] 10 replication part3 (system design)
[Altibase] 10 replication part3 (system design)altistory
 
[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)altistory
 
[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)altistory
 
[Altibase] 7 how the buffer is managed in altibase
[Altibase] 7 how the buffer is managed in altibase[Altibase] 7 how the buffer is managed in altibase
[Altibase] 7 how the buffer is managed in altibasealtistory
 
[Altibase] 6 what is the mvcc
[Altibase] 6 what is the mvcc[Altibase] 6 what is the mvcc
[Altibase] 6 what is the mvccaltistory
 
[Altibase] 5 durability
[Altibase] 5 durability[Altibase] 5 durability
[Altibase] 5 durabilityaltistory
 
[Altibase] 4-4 disk tablespace
[Altibase] 4-4 disk tablespace[Altibase] 4-4 disk tablespace
[Altibase] 4-4 disk tablespacealtistory
 
[Altibase] 4-3 volatile tablespace
[Altibase] 4-3 volatile tablespace[Altibase] 4-3 volatile tablespace
[Altibase] 4-3 volatile tablespacealtistory
 
[Altibase] 4-2 memory tablespace
[Altibase] 4-2 memory tablespace[Altibase] 4-2 memory tablespace
[Altibase] 4-2 memory tablespacealtistory
 
[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace conceptaltistory
 
[Altibase] 3-3 directory contents
[Altibase] 3-3 directory contents[Altibase] 3-3 directory contents
[Altibase] 3-3 directory contentsaltistory
 
[Altibase] 3-1 architecture
[Altibase] 3-1 architecture[Altibase] 3-1 architecture
[Altibase] 3-1 architecturealtistory
 
[Altibase] 2-4 sql functions
[Altibase] 2-4 sql functions[Altibase] 2-4 sql functions
[Altibase] 2-4 sql functionsaltistory
 
[Altibase] 2-3 general functions
[Altibase] 2-3 general functions[Altibase] 2-3 general functions
[Altibase] 2-3 general functionsaltistory
 
[Altibase] 2-2 Altibase storage
[Altibase] 2-2 Altibase storage[Altibase] 2-2 Altibase storage
[Altibase] 2-2 Altibase storagealtistory
 
[Altibase] 2-1 features
[Altibase] 2-1 features[Altibase] 2-1 features
[Altibase] 2-1 featuresaltistory
 
[Altibase] 1-5 hybrid dbms
[Altibase] 1-5 hybrid dbms[Altibase] 1-5 hybrid dbms
[Altibase] 1-5 hybrid dbmsaltistory
 

Mais de altistory (20)

[Altibase] 4-5 summary of tablespace management
[Altibase] 4-5 summary of tablespace management[Altibase] 4-5 summary of tablespace management
[Altibase] 4-5 summary of tablespace management
 
[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)
 
[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)[Altibase] 11 replication part4 (conflict resolution)
[Altibase] 11 replication part4 (conflict resolution)
 
[Altibase] 10 replication part3 (system design)
[Altibase] 10 replication part3 (system design)[Altibase] 10 replication part3 (system design)
[Altibase] 10 replication part3 (system design)
 
[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)[Altibase] 9 replication part2 (methods and controls)
[Altibase] 9 replication part2 (methods and controls)
 
[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)[Altibase] 8 replication part1 (overview)
[Altibase] 8 replication part1 (overview)
 
[Altibase] 7 how the buffer is managed in altibase
[Altibase] 7 how the buffer is managed in altibase[Altibase] 7 how the buffer is managed in altibase
[Altibase] 7 how the buffer is managed in altibase
 
[Altibase] 6 what is the mvcc
[Altibase] 6 what is the mvcc[Altibase] 6 what is the mvcc
[Altibase] 6 what is the mvcc
 
[Altibase] 5 durability
[Altibase] 5 durability[Altibase] 5 durability
[Altibase] 5 durability
 
[Altibase] 4-4 disk tablespace
[Altibase] 4-4 disk tablespace[Altibase] 4-4 disk tablespace
[Altibase] 4-4 disk tablespace
 
[Altibase] 4-3 volatile tablespace
[Altibase] 4-3 volatile tablespace[Altibase] 4-3 volatile tablespace
[Altibase] 4-3 volatile tablespace
 
[Altibase] 4-2 memory tablespace
[Altibase] 4-2 memory tablespace[Altibase] 4-2 memory tablespace
[Altibase] 4-2 memory tablespace
 
[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept
 
[Altibase] 3-3 directory contents
[Altibase] 3-3 directory contents[Altibase] 3-3 directory contents
[Altibase] 3-3 directory contents
 
[Altibase] 3-1 architecture
[Altibase] 3-1 architecture[Altibase] 3-1 architecture
[Altibase] 3-1 architecture
 
[Altibase] 2-4 sql functions
[Altibase] 2-4 sql functions[Altibase] 2-4 sql functions
[Altibase] 2-4 sql functions
 
[Altibase] 2-3 general functions
[Altibase] 2-3 general functions[Altibase] 2-3 general functions
[Altibase] 2-3 general functions
 
[Altibase] 2-2 Altibase storage
[Altibase] 2-2 Altibase storage[Altibase] 2-2 Altibase storage
[Altibase] 2-2 Altibase storage
 
[Altibase] 2-1 features
[Altibase] 2-1 features[Altibase] 2-1 features
[Altibase] 2-1 features
 
[Altibase] 1-5 hybrid dbms
[Altibase] 1-5 hybrid dbms[Altibase] 1-5 hybrid dbms
[Altibase] 1-5 hybrid dbms
 

Último

8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 

Último (20)

8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 

[Altibase] 13 backup and recovery

  • 1.
  • 2. Checkpointing  Saves information about the current status of, and changes to, the database to data files  Management tasks after checkpointing has completed  Change the current recovery start point to the end point of checkpointing  Delete unneeded redo log files that have been applied to data files  Regular checkpointing reduces the amount of time required to recover the database in the event of a fault. ALTIBASE HDB Checkpointing features  Fuzzy & Ping-pong checkpointing  Transaction performance is not reduced during checkpointing  Two sets of data files are maintained  Only applies to memory tablespaces
  • 3. Performing Checkpointing  Automatic execution (Default)  Set auto-execution using the CHECKPOINT_ENABLED property  Checkpointing interval: - CHECKPOINT_INTERVAL_IN_SEC  Number of redo log files- CHECKPOINT_INTERVAL_IN_LOG  Manual execution  User command - Only the SYS user can perform checkpointing manually. Reasons why redo log files might not be deleted after checkpointing is completed:  They might contain information about transactions that are still underway  In Archivelog mode, they have not yet been archived  If using replication, they have not yet been converted to XLogs and sent for replication iSQL> ALTER SYSTEM CHECKPOINT;
  • 4. Database mode  Redo log files are managed in one of two different ways after checkpointing:  Archivelog mode – Archived to a specified path and then deleted  Noarchivelog mode – Deleted without being archived  Set when the CREATE DATABASE statement is executed  Can be subsequently changed in the CONTROL startup phase (restart required) Comparison Database Mode Pros Cons Archivelog mode  Media recovery possible  If archive log files are not lost, recovery up to the present time is possible.  Disk space for saving archive log files must be provided.  DBA is burdened with additional archive log file management tasks Noarchivelog mode  No disk space for saving archive log files is needed.  DBA need not perform archive log file management tasks  Media recovery is impossible.  Recovery is only possible up to the point at which the most recent offline backup was conducted.
  • 5. Checking the current database mode  More detailed information can be checked by querying the v$archive performance view Changing the database mode after the database is created  Start up ALTIBASE HDB in the CONTROL phase  Change the database mode  Can only be changed by the SYS user in SYSDBA mode iSQL> connect sys/manager as sysdba iSQL(sysdba)> shutdown immediate; iSQL(sysdba)> startup control; iSQL(sysdba)> ALTER DATABASE ARCHIVELOG; iSQL(sysdba)> startup; iSQL(sysdba)> SELECT archive_mode, archive_dest FROM v$archive; ARCHIVE_MODE ARCHIVE_DEST -------------------------------------------------------------------- 0 /edu/alti1/altibase_home/arch_logs
  • 6. Types of database backup and objects that are backed up  Online backup-related commands can only be executed by the “SYS” user, in SYSDBA mode  Cannot be executed from multiple sessions, as there can be only one SYSDBA mode session at any time. Backup Type Target Object Recovery Point DB Mode Online Database Backup The entire database (data files, log anchor files) except redo log files  Present time point  Must be Archivelog mode Online Tablespace Backup The data files for a particular tablespaceOnline Tablespace backup by “file system copy” Online log anchor backup log anchor files Offline backup The entire database (data files, log anchor files, redo log files)  Time of last backup  Noarchivelog or Archivelog mode Backup using aexport and iloader Schema creation script, data in a particular table
  • 7. Online Database Backup  Back up the entire database at particular time points while ALTIBASE HDB is running  When the command is executed, all data files and redo loganchor files are automatically backed up to the specified directory  Only one of two (#0 and #1) checkpoint image files is backed up  Temporary tablespace data files are not backed up, as they are only used for processing queries iSQL(sysdba)> ALTER DATABASE BACKUP DATABASE TO 'backup_dir ';
  • 8. Online Tablespace Backup  Back up a particular tablespace while ALTIBASE HDB is running  The data files related to the tablespace are automatically backed up to the specified path when the command is executed.  Only one of two (#0 and #1) memory tablespace-related data files is backed up iSQL(sysdba)> ALTER DATABASE BACKUP TABLESPACE tablespace_name TO 'backup_dir ';
  • 9. Online Tablespace Backup by DBA  Backup particular tablespace while DB is operating  Copy tablespace datafile using OS copy command after the backup using backup command  Log switching is essential to forcibly archive the related redo log file  Interoperable with 3rd party backup solution as the multiple tablespaces can be backed up simultaneously 1. iSQL(sysdba)> ALTER TABLESPACE tablespace_name BEGIN BACKUP; 2. Copy tablespace datafile using OS copy command 3. iSQL(sysdba)> ALTER TABLESPACE tablespace_name END BACKUP; 4. iSQL(sysdba)> ALTER SYSTEM SWITCH LOGFILE;
  • 10. Online log anchor file backup  Back up log anchor files while ALTIBASE HDB is running  All three log anchor files are automatically backed up to the specified path when the query is executed  When altering the tablespace (ALTER DATABASE), the modified tablespace and dictionary tablespace are also backed up, in case they are needed for recovery iSQL(sysdba)> ALTER DATABASE BACKUP LOGANCHOR TO 'backup_dir '; iSQL(sysdba)> ALTER DATABASE BACKUP 2 TABLESPACE tablespace_name TO 'backup_dir '; iSQL(sysdba)> ALTER DATABASE BACKUP 2 TABLESPACE SYS_TBS_MEM_DIC TO 'backup_dir ';
  • 11. Offline database backup  Back up the entire database after ALTIBASE HDB is shut down.  Back up data files, redo log files and log anchor files using an OS copy command. 1. iSQL(sysdba)> shutdown immediate; 2. Backup data files, redo log files and loganchor files by using OS copy command. 3. iSQL(sysdba)> startup;
  • 12. Example of offline database backup  altibase.properties settings  Backup procedure  This example assumes that the tablespace data files are located in the default directory MEM_DB_DIR = ?/mem_dbs DEFAULT_DISK_DB_DIR = ?/dbs LOG_DIR = ?/logs LOGANCHOR_DIR = ?/logs iSQL(sysdba)> shutdown immediate; shell> cp –r $ALTIBASE_HOME/mem_dbs/* /backup shell> cp –r $ALTIBASE_HOME/dbs/* /backup shell> cp –r $AL TIBASE_HOME/logs /backup iSQL(sysdba)> startup;
  • 13. Backup Considerations  When performing offline backup, there are more things to check other than the default directory in the properties file  Data files in other directories might be missed  Check data file-related performance views for data files in other directories.  Online backup and checkpointing cannot be performed simultaneously  If checkpointing is underway when the online backup procedure starts, the backup procedure waits for checkpointing to finish  If online backup is underway when checkpointing is attempted, an error occurs [ERR-110A4 : Backup is in progress. Please wait until the current backup process completes.]  Do one of the followings to prepare for recovery when modifying a tablespace:  Back up the tablespace, the dictionary tablespace, and log anchor files  Perform online or offline database backup  If any replication objects exist, replication information is also backed up.  If the database is restored on a system with a different IP address, the replication error will occur.
  • 14. Restart Recovery  Automatic recovery in the event of an abnormal shutdown, such as a power outage or a system crash. ……… TRANSITION TO PHASE : META [SM] Recovery Phase - 1 : Preparing Database : Dynamic Memory Version => Parallel Loading [SM] Recovery Phase - 2 : Loading Database [SM] Recovery Phase - 3 : Starting Recovery Initializing Active Transaction List Redo Refine Disk Table.. Undo [SM] Refine Memory Table : ........................................................................................................................................ [SUCCESS]
  • 15. Media recovery  Performed when data files are missing or corrupted.  The database should be manually restored using:  archive log files  backup data files  log anchor files  Recovery commands must be executed in the CONTROL phase. (Online recovery is not possible.)  Is possible only if ALTIBASE HDB is operating in Archivelog mode.  Both complete and partial recovery are possible
  • 16. Complete recovery  Execute the command shown below to restore the database up to the present: Considerations  The archive log files AND the redo log files generated since the most recent complete database backup must not be corrupted.  The most recently updated log anchor files are needed. iSQL(sysdba)> ALTER DATABASE RECOVER DATABASE;
  • 17. Partial recovery  Restore the database to a specific point in time by executing the command shown below:  If redo log files or archive log files are missing or corrupted:  To restore the database to a specified point in time:  Redo log files must be reset after performing partial recovery.  This step is mandatory in order to avoid restart recovery when the system is restarted. Consideration  In order to restore the database to a specific point in time, the log anchor files up to that time are needed. iSQL(sysdba)> ALTER DATABASE db_name META RESETLOGS; iSQL(sysdba)> ALTER DATABASE RECOVER DATABASE UNTIL CANCEL; iSQL(sysdba)> ALTER DATABASE RECOVER DATABASE UNTIL TIME ‘2010-09-10:17:55:00’;
  • 18. Recovery example in case of missing data file (1) – recovery using backup data files  Use the redo log files whose LSN (Log Sequence Number) is between the LSN of the backup data files and the current LSN of the database. Log Anchor User1.dbf information Creation LSN(20:012284) Checkpoint LSN(102:172168) Archive Logs Directory Log File 32 Log File 100… Log File 101 Log File 102 Online Redo Logs directory User1.dbf (backup file) Recovery command executed User1.dbf LSN 102:172168 Replay Redo logs LSN 32:345698User1.dbf Media Recovery Process Log File 0 …
  • 19. Recovery example in case of missing data file (2) – recovery by creating empty data files  Perform recovery using archive log files and active redo log files after creating data files.  Use the redo log files whose LSN (Log Sequence Number) is between the LSN of the backup data files and the current LSN of the database. Log Anchor User1.dbf information Creation LSN(20:012284) Checkpoint LSN(102:172168) Archive Logs Directory Log File 20 Log File 100… Log File 101 Log File 102 Online Logs Directory Create missing User1.dbf Recovery command executed User1.dbf LSN 102:172168 Replay Redo logs User1.dbf Media Recovery Process Log File 0 …
  • 20. Create an empty data file for media recovery  Create one in the CONTROL phase if no backup data files exist.  Create an empty memory tablespace data file:  Create an empty disk tablespace data file: Consideration  The location of the data file must be same as the directory recorded in the log anchor file. iSQL(sysdba)> ALTER DATABASE CREATE DATAFILE 'user_disk_data001.dbf'; iSQL(sysdba)> ALTER DATABASE CREATE CHECKPOINT IMAGE 'USER_MEM_DATA-1-0';
  • 21. Considerations during media recovery  Some data files must be created by the user.  Memory tablespace data files must be copied to form a pair.  Empty temporary tablespace data files must be created in the CONTROL phase. Considerations after media recovery  Back up the database after performing partial recovery.  If the database is not backed up at this time, and recovery is again subsequently performed, it will be impossible to recover any changes made to the database after the redo logs were initialized. shell> cp USER_MEM_DATA-1-0 USER_MEM_DATA-0-0; iSQL(sysdba)> ALTER DATABASE CREATE DATAFILE 'temp001.dbf';