1. Enable archivelog
SQL> shutdown immediate;SQL> startup mount;SQL> alter system set log_archive_dest_1 = 'location = d:/arc' scope = both;SQL> alter database archivelog;SQL> alter database open;
2. Backup Control File
2.1 genera
=1140850688Scpdb.__oracle_base= '/u01/app/oracle ' #ORACLE_BASE set from environmentscpdb.__pga_aggregate_target=6777995264scpdb.__sga_target=20333985792scpdb.__shared_io_pool_size=536870912scpdb.__shared_pool_size=2214592512Scpdb.__streams_pool_size=0---restore control filesExport oracle_sid=scpdbRman Target/Rman> Startup Nomountrman> restore Controlfile from '/U01/BACKUP/CTL_AUTO_C-2612507248-20160809-00.
The target database for Rman backup and recovery. It sets the storage location of the Backup files and automatically backs up the control files during Backup.
The target database for Rman backup and recovery. It sets the storage l
/FIif[-E $ORACLE _home/dbs/spfile$oracle_sid.ora]then# cp $ORACLE _home/dbs/spfile$oracle_sid.ora $backup _dir/Fiif[-E $ORACLE _home/dbs/orapw$oracle_sid]then# cp $ORACLE _home/dbs/prapw$oracle_sid $backup _dir/Fiecho"Cold backup finished.">> $log _filedate >> $log _fileFull-Library hot-standby shellPhysical hot standby, only one table space can be backed up at a
database. The Hot Backup command file consists of three parts:1. Backup of one tablespace and one tablespace in a data file.(1) set the tablespace to the backup state.(2) back up the data files in the tablespace(3) restore the tablespace to the normal state.2. Back up archive log files(1) temporarily stop the archivin
Recovery Library
The code is as follows
Copy Code
rmangt; restore Controlfile from '/u01/oracle/oradata/tmp/ora11g_0_08n8p93h_1_1 ';Starting restore at 19-apr-12Using channel Ora_disk_1Channel ora_disk_1:restoring Control FileChannel Ora_disk_1:restore complete, elapsed time:00:00:01Output File Name=/u01/oracle/oradata/ora11g/control01.ctlOutput File Name=/u01/oracle/oradata/ora11g/control02.ctlFinished restore at 19-apr-
backup file list. For example, if V $ LOG indicates that sequence #2334 is the last archived LOG file, you can back up all files whose serial numbers are less than 2334 in the target directory of the archived redo LOG. If you try to back up 2335, you can back up the backup at the operating system level. However, since the file is not fully archived, this backup
Modify the validity period of the backup file (the database must be started with spfile)
SQL> alter system set control_file_record_keep_time = 30 scope = both;
System altered.
Start Archiving first
SQL> startup mount
Oracle instance started.
Total System Global Area 314572800 bytes
Fixed Size 1219136 bytes
Variable Size 96470464 bytes
log files
----3. Backing up copy files with the ALTER DATABASE backup Controlfile command
The advantages of----hot backup are:
----1. Can be backed up at the table space or data file level for short backup time.
----2. The
command file consists of three parts:
1. Backup of one tablespace and one tablespace in a data file.
(1) set the tablespace to the backup state.
(2) back up the data files in the tablespace
(3) restore the tablespace to normal state
2. Back up archive log files
(1) temporarily stop the archiving process
(2) files in the archive Rede log target directory under Log
(3) restart the archive Process
---- Sqldba> connect internal;
---- Sqldba> startup;
---- III. Hot Backup
---- Hot Backup uses archivelog mode to back up data when the database is running. Therefore, if you have a cold backup file last night and a hot backup file today, you can use this data to restore mo
backup method to trace the file:
1) record the command information of the control file to the trace file:
SQL> alter database backup controlfile to trace;
2) determine the location and name of the tracking file:
SQL> select a. spid from v $ process a, v $ session B where a.
files
(1) temporarily stop the archiving process
(2) files in the archive rede log target directory under log
(3) restart the archive Process
(4) back up the archived redo log file
3. Use the alter database bachup controlfile command to back up control files
Advantages of Hot Backup:
1. Data can be backed up at the ta
Label:Never give up, everything is possible!!! Only to find a way to succeed, not to find excuses for failure!Oracle database Backup 1. File ViewThe data files, control files, and log files are viewed as follows: From V$datafile; -- View data file from
v$controlfile; -FromV$logfile; -- log file 2. Three methods of backup1) Import/export (Import/export) 1.
mode when the database is running. Therefore, if you have a cold backup file last night and a hot backup file today, you can use this data to restore more information when a problem occurs. Hot Backup requires that the database be operated in Archivelog mode and requires a
[Translated from mos] How To restore database and mosrestore when backup of control files is lost
How can I restore the database when the backup of the control file is lost?
Source:How to restore database when controlfile
target directory under log(3) restart the archive Process(4) back up the archived redo log file3. Use the alter database bachup controlfile command to back up control filesAdvantages of Hot Backup:1. Data can be backed up at the tablespace or database file level. The
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.