Oracle Hot Backup

Source: Internet
Author: User

If the system is a 7x24-hour running database, cold backup is unrealistic, and a hot backup is a way to back up a database in the case of a database run, using the Archivelog mode mode.

The advantages and disadvantages of hot backup are as follows:

Pros: A. Can be backed up at table space or database file level, backup time is short

B. Can achieve recovery of seconds (restore to a point in time)

C. Recovery of almost all database entities can be done

D. Recovery is fast and in most cases restores when the database is still working

F. Backed up databases are still available

Cons: A. Difficult to maintain, so be particularly careful not to allow failure to end.

B. If the backup is unsuccessful, the resulting results are not available for point-in-time recovery

C. Can not be wrong, otherwise serious consequences.

1 Closing the database

sql> shutdown immediate;
The database is closed.
The database has been uninstalled.
The ORACLE routine has been closed.

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 is loaded.

3

sql> ALTER DATABASE Archivelog;
The database has changed.

4

Sql> select Open_mode from V$database;
Open_mode
------------------
READ WRITE

sql> archive log list;
Database log Mode archive mode
Auto-Archive Enabled
Archive End D:\oracle\arch
Oldest online log sequence 3
Next Archive log sequence 5
Current log Sequence 5

5 If set to Auto archive

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 backup mode, the data files in it can be copied, using the following command

Host copy d:\ora11g\*. DBF E:\backup\

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

Alter TABLESPACE users end backup;

7 offline backup, the advantage of an offline backup is that it produces fewer redo log files, but the disadvantage is that the tablespace that is backed up when the user is making an offline backup cannot be accessed due to system tablespace and in use

Undo Tablespace cannot be taken offline, so an offline backup does not apply to the system table space and the undo tablespace being used


Sql> alter tablespace users offline;

Table space has changed.

Sql> Host copy f:\app\administrator\oradata\orcl\*dbf F:\backup\
F:\app\Administrator\oradata\orcl\EXAMPLE01. Dbf
F:\app\Administrator\oradata\orcl\SYSAUX01. Dbf


sql> alter tablespace users online;

Oracle Hot Backup

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.