1.Back up database Concept: it refers to backing up all data files and control files of the database, and also backing up parameter files and password files.
Note: When backing up a database, do not back up redo logs.
1.1Consistent backup Concept: Database Consistency backup refers to the method for backing up all data files and control files after the database is disabled. When the SHUTDOWN command is used to shut down the database normally, the current SCN values of all database files are identical. Therefore, the closed database backup is called Database Consistency backup or cold backup.
Applicable: ARCHIVELOG and NOARCHIVELOG
Select name from v $ datafile union select name from v $ controlfile;
Shutdown immediate;
Copy files
Startup;
1.2Non-consistent backup Concept: it refers to the method of backing up all data files and control files of the database in the OPEN state. Because the database content changes at any time in the OPEN state, the current SCN values of different database files are completely different, so the database backup at the time of opening is called the database non-consistent backup.
Applicable to: ARCHIVELOG mode.
Select name from v $ datafile;
Alter database begin backup;
Copy files
Alter database backup controlfile '';
Alter database end backup;
Alter system archive log current;
2.Backup tablespace Concept: refers to the method for backing up data files when the database is OPEN.
Applicable to: ARCHIVELOG mode.
Note: You can back up all data files in the tablespace or a data file in the tablespace.
2.1Offline backup Concept: it refers to the process of backing up all data files or individual data files in the tablespace when the tablespace is OFFLINE.
Applicable to: ARCHIVELOG mode.
Advantage: fewer redo logs are generated.
Disadvantage: it will affect the business operations of the tablespace. (Because system and the used UNDO tablespace cannot be taken offline)
Select file_name from dba_data_files where tablespace_name = 'users ';
Alter tablespace users offline;
Copy files
Alter tablespace users online;
2.2Online backup Concept: it refers to the process of backing up all data files or individual data files in the tablespace when the tablespace is ONLINE.
Applicable to: ARCHIVELOG mode.
Advantage: business operations on tablespaces are not affected.
Disadvantage: More REDO information and archive information are generated.
Select file_name from dba_data_files where tablespace_name = 'users ';
Alter tablespace users begin backup;
Copy files
Alter tablespace users end backup;
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.