In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Control files are very important for Oracle database. Here are several backup methods for control files in RMAN.
1. Enter the RMAN command line interface
Secooler@secDB / oracle/oradata$ rman target /
Recovery Manager: Release 10.2.0.3.0-Production on Wed Dec 16 16:39:15 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to target database: SECOOLER (DBID=21803462)
RMAN >
two。 Modify the backup mode of control files to automatic backup
RMAN > configure controlfile autobackup on
New RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON
New RMAN configuration parameters are successfully stored
3. Confirm whether the parameter has been modified successfully.
RMAN > show CONTROLFILE AUTOBACKUP
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP ON
4. Modify the location of the backup files that control the files. Note here that the "% F" is indispensable.
RMAN > configure controlfile autobackup format for device type disk to'/ orabackup/%F'
New RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO'/ orabackup/%F'
New RMAN configuration parameters are successfully stored
5. Confirm that the backup location parameters of the backup files have been modified successfully. Success.
RMAN > show controlfile autobackup format
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO'/ orabackup/%F'
6. At this point, use the "backup database" command to control the backup of files.
RMAN > backup database
Starting backup at 2009-12-16 16:54:21
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid=146 devtype=DISK
Channel ORA_DISK_1: starting full datafile backupset
Channel ORA_DISK_1: specifying datafile (s) in backupset
Input datafile fno=00001 name=/oracle/oradata/secooler/system01.dbf
Input datafile fno=00002 name=/oracle/oradata/secooler/undotbs01.dbf
Input datafile fno=00003 name=/oracle/oradata/secooler/sysaux01.dbf
Input datafile fno=00004 name=/oracle/oradata/secooler/users01.dbf
Channel ORA_DISK_1: starting piece 1 at 2009-12-16 16:54:22
Channel ORA_DISK_1: finished piece 1 at 2009-12-16 16:54:25
Piece handle=/oracle/app/oracle/flash_recovery_area/SECOOLER/backupset/2009_12_16/o1_mf_nnndf_TAG20091216T165421_5lk81y4j_.bkp tag=TAG20091216T165421 comment=NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 2009-12-16 16:54:25
Starting Control File and SPFILE Autobackup at 2009-12-16 16:54:25
Piece handle=/orabackup/c-21803462-20091216-00 comment=NONE
Finished Control File and SPFILE Autobackup at 2009-12-16 16:54:26
7. Backup of control files can also be completed by using "backup current controlfile" in RMAN.
RMAN > backup current controlfile
Starting backup at 2009-12-16 22:34:31
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid=141 devtype=DISK
Channel ORA_DISK_1: starting full datafile backupset
Channel ORA_DISK_1: specifying datafile (s) in backupset
Including current control file in backupset
Channel ORA_DISK_1: starting piece 1 at 2009-12-16 22:34:31
Channel ORA_DISK_1: finished piece 1 at 2009-12-16 22:34:32
Piece handle=/oracle/app/oracle/flash_recovery_area/SECOOLER/backupset/2009_12_16/o1_mf_ncnnf_TAG20091216T223431_5lkvzqp6_.bkp tag=TAG20091216T223431 comment=NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2009-12-16 22:34:32
Starting Control File and SPFILE Autobackup at 2009-12-16 22:34:32
Piece handle=/orabackup/c-21803462-20091216-01 comment=NONE
Finished Control File and SPFILE Autobackup at 2009-12-16 22:34:33
8. Get the control file information that has been backed up in RMAN
RMAN > list backup of controlfile
List of Backup Sets
=
BS Key Type LV Size Device Type Elapsed Time Completion Time
2 Full 6.80m DISK 00:00:00 2009-12-16 16:54:25
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20091216T165425
Piece Name: / orabackup/c-21803462-20091216-00
Control File Included: Ckp SCN: 742397 Ckp time: 2009-12-16 16:54:25
BS Key Type LV Size Device Type Elapsed Time Completion Time
3 Full 6.77m DISK 00:00:00 2009-12-16 22:34:31
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20091216T223431
Piece Name: / oracle/app/oracle/flash_recovery_area/SECOOLER/backupset/2009_12_16/o1_mf_ncnnf_TAG20091216T223431_5lkvzqp6_.bkp
Control File Included: Ckp SCN: 763491 Ckp time: 2009-12-16 22:34:31
BS Key Type LV Size Device Type Elapsed Time Completion Time
4 Full 6.80m DISK 00:00:00 2009-12-16 22:34:32
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20091216T223432
Piece Name: / orabackup/c-21803462-20091216-01
Control File Included: Ckp SCN: 763495 Ckp time: 2009-12-16 22:34:32
9. Use the copy command of RMAN to also complete the backup of control files
RMAN > copy current controlfile to'/ orabackup/rman_copy_controlfile.ctl'
Starting backup at 2009-12-16 22:42:47
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting datafile copy
Copying current control file
Output filename=/orabackup/rman_copy_controlfile.ctl tag=TAG20091216T224247 recid=1 stamp=705796967
Channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2009-12-16 22:42:48
Starting Control File and SPFILE Autobackup at 2009-12-16 22:42:48
Piece handle=/orabackup/c-21803462-20091216-02 comment=NONE
Finished Control File and SPFILE Autobackup at 2009-12-16 22:42:50
10. Summary
The above is only a list of several methods to back up control files in RMAN, there are many ways, just apply, you can use a convenient backup method in the specific environment. Admittedly, the fundamental purpose of backup is recovery, and any backup method is king as long as it is available at a critical juncture.
Good luck.
Secooler
10.01.26
-- The End--
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.