2012年3月21日星期三

Vibram Five Fingers Shoes1check the database mode :sqlplus / nolog conn / as SYSDBA archive

1check the database mode :sqlplus / nolog conn / as SYSDBA archive log list ( database view is archiving mode) for not filing ,modify the database archiving mode .Startup mount alter database archivelog alter database open 2 to connect to the target database command :connect target / ( connect target ,if the database is not up ,can also be directly in the RMAN command under startup promoter database) can be connected to the target database.
( RMAN while connecting to the target database ,the other side is connected to the control file ( nocatalog mode ) ,control file RMAN backup information ) stored in the 3 list backupset command to see if there is something 4 commonly used backup backup command :backup all library :RMAN> ;backup database plus archivelog delete input ;( full backup control file ,database and server parameter file and all the archived redo logs ,and delete the old log archive ) backup table space :RMAN> ;backup tablespace system plus archivelog delete input ( backup ;tablespace specified and archiving of the redo log ,and delete the old log archive ) _ backup archive log :RMAN> ;backup archivelog all delete input ;= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = for a whole database backup = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 1 for a whole database backup ( full backup ) .
Just enter the command: backup database ;2.list backupset view backup information specific to List of Backup Sets = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = BS Key Type LV Size Device Type Elapsed Time Completion Time - - - - - - - - - - - - - - - - - - - - - - - this 1 Full 6.
80M DISK 00 : 00: 02 06-DEC-08 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20081206T201041 Piece Name: / home / Oracle / flash_recovery_area / ORA10G / backupset / 2008_12_06 / o1_mf_ncsnf_TAG20081206T201041_4mntz78s_.
bkp Control File Included: Ckp SCN: 782019 Ckp time : 06-DEC-08 SPFILE Included: Modification time: 06-DEC-08 BS ( backupset ) ,piece is a file ,a BS contains more than one piece .
3.rman default parameters ,through show all ;to view ( RMAN configuration parameters ) ,we use the backup database command ,can use these default value with a fixed value for replacement .
4 we can put the backup files to the backup directory copy to the tape ,then delete the backup directory backup files, if you need to recover it, only To file to copy back to a backup directory will be 5 control file files in the backup information ( because we do the backup is in nocatalog mode ) ,control file in / u01 / Oracle / oradata / ora10g directory ,because control file is a binary file ,to view the control in the file file the content of control03.
ctl ,strings ,control03.ctl in RMAN backup information = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backup incremental level 0 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = concept :full backup and backup incremental level 0 database .
Full backup and backup incremental level 0 database is almost the same .The only difference ,backup incremental level 0 database as incremental backup based ,and full backup cannot serve as the basis of the incremental backup .
Other identical to 1.backup incremental level = 0 ( leve 0 ) database ( 0 ;incremental backup ) 2.backup incremental level 1 ( level = 1 ) database ( 1 ;incremental backup ) on backup ,we backup datafile ,controlfile and parameter file.
No backup files are archived log ,redo log and password file password file does not need no backup .The backup ,we use orapw to create a new password file . RMAN in nocatalog mode, not able to redo log file backup = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backup archivelog in nocatalog mode = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backup database plus archivelog command :delete input ( delete input mean in the backup finishes, delete the archivelog file ,this option can have ,this command can also use the backup incremental level = 0 ( 1, 2.
.. ) .Backup ) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backup table space = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backup tablespace tablespacename if we do not know the name tablespace ,in RMAN, can be through the report schema command ,to view the tablespace name MAN> ;report schema ;Report of dat Abase schema List of Permanent Datafiles = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = File Size ( MB ) Tablespace RB SEGS Datafile Name - - - - - - - - - - - - - - - - - - ------------------------ -------------------- 1480 SYSTEM * * * / home / Oracle / oradata / ora10g / system01.
dbf 225 UNDOTBS1 * * * / home / Oracle / oradata / ora10g / undotbs01.dbf 3250 SYSAUX * * * / home / Oracle / oradata / ora10g / sysaux01.dbf 45 USERS * * * / home / Oracle / oradata / ora10g / users01.
dbf 5200 PERFSTAT * * * / home / Oracle / oradata / ora10g / perfstat.dbf List of Temporary Files = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = File Size ( MB ) Tablespace Maxsize ( MB ) Tempfile Name - - - - - - - - - - - - -------------------- -------------------- 120 TEMP 32767 / home / Oracle / oradata / ora10g / temp01.
dbf = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backup control file = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backup current controlfile backup database include current controlfile = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = the backup image = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = the RMAN backup in one of two ways : the backup set ( backupset ) and backup image ( image copies ) .
Mirror backup main file Copy :copy datafile... To... We in the rman> ;report schema ;Report of database schema List of Permanent Datafiles = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = File Size ( MB ) Tablespace RB SEGS Datafile Name - - - - - - - - - - - - - - - - - - -------------------- ------------------------ 1480 SYSTEM * * * / home / Oracle / oradata / ora10g / system01.
dbf 225 UNDOTBS1 * * * / home / Oracle / oradata / ora10g / undotbs01.dbf 3250 SYSAUX * * * / home / Oracle / oradata / ora10g / sysaux01.dbf 45 USERS * * * / home / Oracle / oradata / ora10g / users01.
dbf 5200 PERFSTAT * * * / home / Oracle / oradata / ora10g / perfstat.dbf List of Temporary Files = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = File Size ( MB ) Tablespace Maxsize ( MB ) Tempfile Name - - - - - - - - - - - - -------------------- -------------------- 120 TEMP 32767 / home / Oracle / oradata / ora10g / temp01.
dbf rman> ;copy datafile 5 to / u01 / rmanbak / tbso1bak.dbf ;( copy 5 corresponding to the schme: perfstat.dbf ) it will take TBS as a copy .We use the list backupset ,can we just backup tbs01bak.
dbf view ,because it is not backupset. We use list copy to view we were just a backup file = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = single command and batch commands = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = single command :backup database ;rman> ;run batch command :{2> ;allocate channel CHA1 type disk ;3> ;backup 4> ;format / u01 / rmanbak / full_%t 5> ;tag full-backup / / label can be dropped ,never mind 6> ;database ;7> ;release channel CHA1 ;8> run ;} This has 3 commands ,respectively, with a semicolon to separate the .
Format: %c :Backup piece of copy number ( a number starting at 1 ) ;%d :%D :database name ;in the days of the month ( DD ) ;%M :located in the years in the month ( MM ) ;%F :DBID based on a unique name ,the format for c-xxx-YYYYMMDD-QQ ,in which XXX the DBID YYYYMMDD database ,to date ,QQ is a sequence of 1-256 ;%n :database name ,and on the right side with X characters are filled ,so as to keep the length of 8 ;%u :is a backup set number and setting time Compression upon the composition of the 8 character name .
The use of%u for each backup set to generate a unique name ;%p :Backup centralized backup piece number ,starting from 1 numbers ;%U :%u_%p_%c is abbreviated form ,it can be used for each backup fragments ( both disk file ) to generate a unique name ,this is the most commonly used naming ;%t : the backup set time stamp ;%T: date format ( YYYYMMDD ) ;channel concept :a channel RMAN in the target database between a connection ,allocate channel command in the target database to start a server process server process ,Beats By Dr Dre,at the same time must be defined to perform backup and restore operations that use I / O type channel control commands can be used :control of RMAN using OS resources affected the parallelism of the specified I / O bandwidth limit value ( limit read rate parameter set ) to specify the backup sheet size constraints ( set limit Kbytes ) specifies the current open file limit value ( limit set maxopenfiles ) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = RMAN week of typical backup plan = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 1 - Sunday night level 0 backup performed ( backup ) 2 Monday night - level 2 backup p Erformed 3 Tuesday night - level 2 backup performed 4 level 1 backup performed Wednesday night - 5 Thursday night - level 2 backup performed 6 level 2 backup performed Friday night - 7 Saturday night - level 2 backup performed Tuesday if needed to restore it, only need 1+2 ,if Thursday is needed to restore it, only need 1+4 ,Dr Dre Headphones,if Friday is needed to restore it, only need 1+4+5 ,if Saturday is needed to restore it, only need 1+4+5+6.
Automatic backup :backup script + crontab bakl0 bakl1 bakl2 :RMAN target script / msglog = bakl0.log cmdfile = bakl0 ( / connect to the target database, said msglog log file ,Moncler Sale UK,cmdfile said the script file ) RMAN target / msglog = bakl1.
log cmdfile = bakl1 RMAN target / msglog = bakl2.log cmdfile = bakl2 example :RMAN target ) msglog = / u01 / rmanbak / bakl1.log cmdfile / u01 / rmanbak / bakl0 complete command :/ u01 / Oracle / product / 10.
2.0 / bin / RMAN target ) = msglog / u01 / rmanbak / bakl1.log = cmdfile / u01 / rmanbak / bakl0 backup script into / u01 / rmanbak / script directory ,Moncler Outlet,VI bakl0 ,bakl0 Content : run {allocate channel CHA1 type disk ;backup incremental level 0 format / u01 / rmanbak / inc0_%u_%T ( u only ID ,T date ,Vibram Five Fingers Shoes,small t is time ) tag monday_inc0 / / label can be dropped ,never mind database ;release channel CHA1 ;} ,similar to write bakl1 ,bakl2 corresponding script .
Automatic backup crontab crontab - E - U Oracle ( modified command means is to edit the Oracle user timing execution ( - E ,edit - U Oracle ,Oracle user ) ) time month week day ( 0 Sunday ) 4523 * * 0 RMAN target / msglog = bakl0.
log cmdfile = bakl0 ( Sunday the 23 : 45 to Oracle of the identity of the user to execute commands ) 4523 * * 1 RMAN target / msglog = bakl2.log cmdfile = bakl2 4523 * * 2 RMAN target / msglog = bakl2.
log cmdfile = bakl2 4523 * * 3 RMAN target / msglog = bakl1.log cmdfile = bakl1 4523 * * 4 RMAN target / msglog = bakl2.log cmdfile = bakl2 4523 * * 5 RMAN target / msglog = bakl2.log cmdfile = bakl2 4523 * * 6 RMAN target / msglog = bakl2.
log cmdfile = bakl2 then start crontab ,start the crontab command :root> ;service Crond restart = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = RMAN restoration = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = in a catalog mode, backup information stored in the controlfile file ,if the controlfile file has destroyed ,it will be unable to recover using backup when needed ,in the controlfile also automatically backup RMAN> ;show all ;using target database control file instead of recovery catalog RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY default CONFIGURE BACKUP OPTIMIZATION # 1 ;OFF ;default CONFIGURE DEFAULT DEVICE TYPE TO # # default CONFIGURE DISK ;CONTROLFILE AUTOBACKUP OFF ;default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT # FOR DEVICE TYPE DISK TO default CONFIGURE DEVICE TYPE # ;DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET default CONFIGURE DATAFILE BACKUP COPIES # ;FOR DEVICE TYPE DISK TO 1 ;default CONFIGURE ARCHIVELOG BACKUP COPIES # FOR DEVICE TYPE DISK TO 1 ;default CONFIGURE MAXSETSIZE TO UNLIMITED # # default CONFIGURE ENCRYPTION FOR DATABASE ;OFF ;default CONFIGURE ENCRYPTIO # N ALGORITHM default CONFIGURE ARCHIVELOG DELETION # ;POLICY TO NONE ;default CONFIGURE SNAPSHOT CONTROLFILE NAME TO # home / Oracle / product / 10.
20 / DBS / snapcf_ora10g.f ;default CONFIGURE CONTROLFILE AUTOBACKUP OFF which # ;not to use controlfile AutoBackup ,we need to run the following commands to controlfile for automatic backup RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ;ON ;RMAN> ;show all ;manual backup control file :Backup current controlfile Dbid database a ID for SPFILE and controlfile ,future recovery when to use.
RMAN> ;connect target / connected to target database: ORA10G ( DBID = 3988862108 ) the Dbid = 3988862108 RMAN> ;list backup ;see the previous backup information RMAN> ;delete backupset 24 ;/ / 24 backupset number RMAN> ;backup format / u01 / rmanbak / full_%T_%U.
bak database plus archivelog ;( perform a full backup backup ) :RMAN> validate backupset verification ;3 ;/ / 3 backupset represented the number password file missing ( does not belong to the RMAN backup category ) ,we only need to use one A command to rebuild the files can be :orapw file = orapwsid password = pass entries = 5 ;/ / password file path :/ u01 / Oracle / product / 10.
20 / db_1 / DBS directory oracle> ;CD / u01 / Oracle / product / 10.20 / db_1 / DBS oracle> ;RM orapwora10g ;( file delete ,simulation oracle> ;orapwd file lost ) = orapwora10g
password = Oracle entries = 5 ;( to create a file ) ,the meaning of entries ( DBA user has at most 5 ) SPFILE :startup nomount set lost ;dbid 3988862108 ;restore SPFILE from from
Related articles:

没有评论:

发表评论