4. Definition:
• Database backup is the process of backing up the operational
state, architecture and stored data of database software. It
enables the creation of a duplicate instance or copy of a
database in case the primary database crashes, is corrupted or
is lost.
Examples:
• User error
• Hardware failure
• Catastrophic event
5. How we can backup of data in database:
• The different methods of backup in a database are:
• Transaction log
• Full Backup
• Diffrential backup
Why we need database backup?
Backups help to restore computer devices during the process of
disaster recovery and restore data after files have undergone
damage or deletion. Database backups are essential for protection
against data loss that can completely disrupt business operations.
7. Full backup
As the name implies, a full backup is when every single file and folder in the system is
backed up. A full backup takes longer and requires more space than other types of backups
but the process of restoring lost data from backup is much faster.
Incremental backup
With incremental backup, only the initial backup is a full one. Subsequent backups only
stores changes that were made since the previous backup. The process of restoring lost
data from backup is longer but the backup process is much quicker.
Differential backup
Differential backup is similar to incremental backup. With both, the initial backup is full and
subsequent backups only store changes made to files since the last backup. This type of
backup requires more storage space than incremental backup does, however, but it also
allows for a faster restore time.
8. Error inBackup
Whatiserrorinbackup?
❖ There is a failure in preparing the backup image of one of the volume in the backup
set.
❖ If specified file or data is not found while restoring a data in full backup is called
Error in backup.
❖ ailure in preparing the backup image of one of the volume in the backup set.
❖ If specified file or data is not found while restoring a data in full backup is called
Error in backup.
10. Media Failure
● Failure of disk drive
● Failure of disk controller
● Deletion or curruption of database file
Infrastructure Failure
● Tape disk ,libraries
● disk arrays and backup server and network can
faier
● Deletion or curruption of database file
11. Software updates
● Incompatibilities between backup software and new version of applications Human
Error
● Invalid path
● Deciding inconsistent device to store data in spite of recommented device
Cyberattacks
● Hackers can delete data
14. Explanation:
1. Database recovery comes in the limelight when data loss takes place due to
certain factors which includes accidental , deleting data , partition loss , window
reinstalltion accidental formatting of the hard drive.
2. Data recovery software will recover the hard to access data even if the storage
device has stopped working.
15. Causes of recovery:
1. Electro mechanical failure
2. Natural disaster
3. Computer virus
4. Data corruption
5. Computer crime
6. Human error
16. TYPES OF DATABASE FAILURE
System
failure
Hardware
failure
Tansaction
failure
Add your words here
Software
failure
17. 1 Hardware failure
Hardware failure may include:
. Memory errors
. Disk sectors
. Disk fuul errors
. Disk craches
2 Software failure
Software failure may include failure related to software's such as
. Operating system
. DBMS software( MY SQL, IBM ,FOX PRO, DB2, ORACLE)etc.
. Application software
18. 3 System failure
System craches due to:
.Hardware
.Software error, resulting in the loss of main memory
4 Recovery from transaction failure
means that the database is restored to the most recent consistent state just before the
time of failure to do this, the system must keep information obout the change that were
applied to data items by the various transaction, this information is kept in system log.
backup transaction
recovery
19. Solution Of Database Failure
Stable Storage:
stable storege is a storage where we can store same data more
then one computer if one computer is damage because of some reasons than we can
restore data with the help of remaining computers.
pc 1
pc 2 pc 3
21. Log based recovery:-
• Log is a sequence of log records, recording all the update activities
in DB.
• Fields:-
• #Transaction Identifier: T start
• Data item identifier: T X,10,15
• Old value: T abort (X=10)
• New value: T commit (X=15)
22. Transaction. Log
• (a=b=1000)
• To:read(a)
• a=a-50
• Write(a)
• Read(b)
• b=b+50
• Write(b)
• To start
• To a,1000,950
• To b,1000,1050
• To commit
23. Shadow paging:-
• It is a technique used to achieve the atomic and durable transactions and
provides the ability to manipulate pages in a database.
• In shadow paging,need to maintain 2 pages table:
• Current page table.
• Shadow page table.
• When transactions begin,the current page is copied to shadow
page.(Both page table are identical.)
• The current page table copy data to shadow page and then it copy it to
disk.
24. Why Backup and Recovery is important
Backup copies allow data to be restored from an earlier point in time to
help the business recover from an unplanned event. Storing the copy of
the data on separate medium is critical to protect against primary data
loss or corruption.
25. Backup and Recovery with RMAN
The most noteworthy are:
Incremental backups, which provide more compact backups (storing only changed blocks) and
faster datafile media recovery (reducing the need to apply redo during datafile media recovery)
• Block media recovery, in which a datafile with only a small number of corrupt data blocks can be
repaired without being taken offline or restored from backup
• Unused block compression, where RMAN can in some cases skip unused datafile blocks during
backups
• Binary compression, which uses a compression mechanism integrated into the Oracle database
server to reduce the size of backups
• Encrypted backups, which uses encryption capabilities integrated into the Oracle database to
store backups in an encrypted format
27. Definition:
“Data definition language is a type of SQL language.It is used to create and
modify the structure of dba object in database.These database object includes
views,schema,table,indexes etc.
Purposes and uses of ddl:
• It is used to describe the fields and record in db table.
• Ddl are the sets of commands which are used to
create,update,delete,structure of db.
• These commands are not for end users but used by db designer and DBA.
29. FUNCTIONS OF DDL
DDL(Data Definition Language) : DDL or Data Definition Language actually consists of
the SQL commands that can be used to define the database schema. It simply deals with
descriptions of the database schema and is used to create and modify the structure of
database objects in the database.
Examples of DDL commands:
CREATE – is used to create the database or its objects (like table, index, function, views,
store procedure and triggers).
DROP – is used to delete objects from the database.
ALTER-is used to alter the structure of the database.
TRUNCATE–is used to remove all records from a table, including all spaces allocated for
the records are removed.