Oracle Hot Backup

Source: Internet
Author: User
Hot Backup is used to back up the database in archivelogmode when the database is running. Although cold backup is easy to operate, it is necessary to close the database because of backup, if the system is a 7x24 database, cold backup is unrealistic. Advantages and Disadvantages of Hot Backup are as follows:. it can be backed up at the tablespace or database file level, and the backup time is short.

Hot Backup is used to back up the database in archivelog mode when the database is running. Although cold backup is easy to operate, it is necessary to close the database because of backup, if the system is a 7x24 database, cold backup is unrealistic. Advantages and Disadvantages of Hot Backup are as follows:. it can be backed up at the tablespace or database file level, and the backup time is short.

Hot Backup is used to back up the database in archivelog mode when the database is running. Although cold backup is easy to operate, it is necessary to close the database because of backup, if the system is a 7x24 database, cold backup is unrealistic. The advantages and disadvantages of Hot Backup are as follows:

Advantage: a. It can be backed up at the tablespace or database file level, and the backup time is short.

B. recovery within seconds (recovery to a certain point in time)

C. Restore almost all database entities

D. Recovery is fast, and recovery is usually performed when the database is still working.

F. The backup database is still available

Disadvantage: a. It is difficult to maintain, so be careful and do not allow failure.

B. If the backup fails, the result cannot be used for restoration at a time point.

C. No error is allowed; otherwise, the consequences are serious.

1. Shut down the database

SQL> shutdown immediate;
The database has been closed.
The database has been detached.
The ORACLE routine has been disabled.

2

SQL> startup mount;
The ORACLE routine has been started.

Total System Global Area 293601280 bytes
Fixed Size 1290208 bytes
Variable Size 130023456 bytes
Database Buffers 155189248 bytes
Redo Buffers 7098368 bytes
The database has been loaded.

3

SQL> alter database archivelog;
The database has been changed.

4

SQL> select open_mode from v $ database;
OPEN_MODE
------------------
READ WRITE

SQL> archive log list;
Database Log mode archiving Mode
Enable automatic archiving
Archive endpoint D: \ oracle \ arch
Oldest online log sequence 3
Next archive log sequence 5
Current Log sequence 5

5. If it is set to automatic archiving

Alter system set log_archive_start = true scope = spfile;

6. Online backup

Start the database first

Alter database open;

Set tablespace to backup mode

Alter tablespace users begin backup;

When the tablespace is set to the backup mode, you can copy the data files in the tablespace. The command is as follows:

Host copy D: \ ora11g \ *. dbf e: \ backup \

Do not set backup mode after replication, so you can return to normal mode.

Alter tablespace users end backup;

7. offline backup: the advantage of offline backup is that a small number of redo log files are generated, but the disadvantage is that the tablespace backed up when the user is backing up offline will not be accessible, because the system tablespace is used and

The undo tablespace cannot be taken offline. Therefore, offline backup is not applicable to the system tablespace and the undo tablespace in use.


SQL> alter tablespace users offline;

The tablespace has been changed.

SQL> host copy F: \ app \ Administrator \ oradata \ orcl \ * dbf: \ backup \
F: \ app \ Administrator \ oradata \ orcl \ EXAMPLE01.DBF
F: \ app \ Administrator \ oradata \ orcl \ SYSAUX01.DBF


SQL> alter tablespace users online;

The tablespace has been changed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.