Hot Backup on Tape?

Dear all,
The following are the weekly backup scripts and backup on disk, not on tape:
rman target /
     run
     CONFIGURE CONTROLFILE AUTOBACKUP ON;
     CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
     allocate channel ch1 type disk format '/db/BACKUP/RMAN/backup_%d_%t_%s_%p_%U.bck';
     backup incremental level 0 database plus archivelog delete all input;
     backup current controlfile;
     backup spfile;
     release channel ch1;
1) Due to our normal practise and no space issue, I would like to backup on tape. How can I change the scripts in order to backup all the control file & *dbf file into tape?
2) Let say I have a full backup on sunday (tape 1) , daily backup on Monday (tape 2), daily backup on Tuesday (tape 3), is it the way to backup on tape? Or only one backup tape includes all full backup & daily backup?
Best Regards,
Amy

Yes, this is existing backup plan, which is backup on the disk and then backup from disk to tape.
I know there are some differences between on backup in tape and disk. I found some scripts in oracle documents and try to modify it so that I can use.
CONFIGURE DEFAULT DEVICE TYPE TO sbt; # backup goes to sbt
CONFIGURE DEVICE TYPE sbt PARALLELISM1; # 1 sbt channels will be allocated by default
# Assume media manager takes NSR_DATA_VOLUME_POOL to specify a pool
# Configure channel 1 to pool named first_pool
CONFIGURE CHANNEL 1 DEVICE TYPE sbt
PARMS 'SBT_LIBRARY=/mediavendor/lib/libobk.so ENV=(NSR_DATA_VOLUME_POOL=first_pool)';
I don't understand the word in bold. I read through some documents and just make me confusing. Can anyone tell me what is the meaning of "PARMS 'SET_LIBRARY=/mediavendor/lib/libobk.so....." Is it necessary to set these parameters?
Please advice,
Amy

Similar Messages

  • Perform hot backup on to a tape

    Can I get a step by step procedure to perform a hot backup of 500 gig db on to a tape. We do not have catalog database and database version is 10.2.0.1.
    Thanks

    You are asking to abstract a manual. This means you can expect nasty replies because no one wants to do voluntarily what you apparently avoid to do: read documentation.
    RMAN can not backup directly to a tape, it needs a media management library, like Legato, or Tivoli, or Netbackup or ....
    Yes you need to allocate channels, and the exact method is different for each library product, so no info is possible.
    Backup database also back ups the controlfile. In Oracle 10g and higher you should have autobackup of the controlfile to disk enabled, this replaces and supplements the catalog database.
    Sybrand Bakker
    Senior Oracle DBA

  • Consistent hot backup possible

    Is a consistent hot backup possible?
    I would like to perform hot backups while the database is in basically a read only state. I am currently using Oracle recommended backups via OEM, for example.
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    release channel oem_disk_backup;
    allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%U';
    backup recovery area;
    Would executing the sql command "alter database begin backup;" before running the above RMAN script accomplish this task? Then off course when completed execute sql "alter database end backup;".
    My basic concern is this type of RMAN hot backup usable in a disaster situation, i.e recreated on another server from tape backup.
    I am open to any other ideas.
    Thanks for your help in advance.
    Ed - Wasilla, Alaska
    Edited by: evankrevelen on Sep 11, 2008 10:18 PM

    Thanks everyone who replied to this thread.
    Just to clarify my complete backup strategy, there are two RMAN scripts run on daily and weekly basis. The daily does pickup the archivelogs. I had shown the weekly when first opening this thread. Here is the daily.
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    release channel oem_disk_backup;
    allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%U';
    backup archivelog all not backed up;
    backup backupset all not backed up since time 'SYSDATE-1';
    My question now is what RMAN does in the increments. It appears to be updating the original level 0 copies of datafiles with changed blocks only. Is the new copy of the datafile now a level 0 type file?
    Here is a transcript from one of the daily backups.
    Starting recover at 11-SEP-08
    channel oem_disk_backup: starting incremental datafile backupset restore
    channel oem_disk_backup: specifying datafile copies to recover
    recovering datafile copy fno=00001 name=+DEVRVYG1/landesk/datafile/system.2576.616107783
    recovering datafile copy fno=00002 name=+DEVRVYG1/landesk/datafile/undotbs1.2574.616107865
    recovering datafile copy fno=00003 name=+DEVRVYG1/landesk/datafile/sysaux.2575.616107829
    recovering datafile copy fno=00004 name=+DEVRVYG1/landesk/datafile/users.2572.616107871
    recovering datafile copy fno=00005 name=+DEVRVYG1/landesk/datafile/landesk.2914.616107643
    channel oem_disk_backup: reading from backup piece +DEVRVYG1/landesk/backupset/2008_09_10/nnndn1_tag20080910t220150_0.12330.665100189
    channel oem_disk_backup: restored backup piece 1
    piece handle=+DEVRVYG1/landesk/backupset/2008_09_10/nnndn1_tag20080910t220150_0.12330.665100189 tag=TAG20080910T220150
    channel oem_disk_backup: restore complete, elapsed time: 00:05:16
    Finished recover at 11-SEP-08
    Starting backup at 11-SEP-08
    channel oem_disk_backup: starting incremental level 1 datafile backupset
    channel oem_disk_backup: specifying datafile(s) in backupset
    input datafile fno=00005 name=+DEVG1/landesk/datafile/landesk.374.614072207
    input datafile fno=00003 name=+DEVG1/landesk/datafile/sysaux.384.614002027
    input datafile fno=00001 name=+DEVG1/landesk/datafile/system.383.614002025
    input datafile fno=00002 name=+DEVG1/landesk/datafile/undotbs1.385.614002027
    input datafile fno=00004 name=+DEVG1/landesk/datafile/users.386.614002027
    channel oem_disk_backup: starting piece 1 at 11-SEP-08
    channel oem_disk_backup: finished piece 1 at 11-SEP-08
    piece handle=+DEVRVYG1/landesk/backupset/2008_09_11/nnndn1_tag20080911t220708_0.12999.665186835 tag=TAG20080911T220708 comment=NONE
    channel oem_disk_backup: backup set complete, elapsed time: 00:02:26
    channel oem_disk_backup: starting incremental level 1 datafile backupset
    channel oem_disk_backup: specifying datafile(s) in backupset
    including current control file in backupset
    including current SPFILE in backupset
    channel oem_disk_backup: starting piece 1 at 11-SEP-08
    channel oem_disk_backup: finished piece 1 at 11-SEP-08
    piece handle=+DEVRVYG1/landesk/backupset/2008_09_11/ncsnn1_tag20080911t220708_0.2301.665186983 tag=TAG20080911T220708 comment=NONE
    channel oem_disk_backup: backup set complete, elapsed time: 00:00:21
    Finished backup at 11-SEP-08
    It appears to be updating the previous copy with updated blocks thus rolling forward the datafile copy to a new level 0 copy.
    Then to restore from the backup RMAN would first use this new copy of the datafile and then apply any archivelogs to them to bring the database to the point in time the incremental backup was taken.
    Are these assumptions true?
    Thanks for your help,
    ED

  • Hot Backups - Oracle 9i, 10g and 11g

    Are all hot backups run outside of RMAN as an OS file copy? If so, isn't this a very risky exercise.
    I understand that RMAN will check for corruption where as hot backups won't. RMAN can also track backups in a recovery catalog.
    If using a hot backup, it seems like corrupt data could be backed up with the good data.
    What exactly are the advantages of using a hot backup. It is understood that the databases can be up during a hot backup, but can't they also be up with an incremental RMAN backup?

    I think you need to read the documentation again. Check on tahiti.oracle.com
    A cold backup is when the database is shutdown (can be done by file copy or rman)
    A hot backup is when the database is running (can be done by file copy or rman)
    RMAN has the advantages of backing up at block level, and going directly to tape, and compression, and incremental backup, and block checking, and backup from ASM, and catalog ......
    File copy has the advantage of being logically simple (e.g you can see exactly what is happening when you copy a file).

  • Incomplete Recovery Fails using Full hot backup & Archive logs !!

    Hello DBA's !!
    I am doing on Recovery scenario where I have taken One full hot backup of my Portal Database (EPR) and Restored it on New Test Server. Also I restored Archive logs from last full hot backup for next 6 days. Also I restored the latest Control file (binary) to their original locations. Now, I started the recovery scenario as follows....
    1) Installed Oracle 10.2.0.2 compatible with restored version of oracle.
    2) Configured tnsnames.ora, listener.ora, sqlnet.ora with hostname of Test server.
    3) Restored all Hot backup files from Tape to Test Server.
    4) Restored all archive logs from tape to Test server.
    5) Restored Latest Binary Control file from Tape to Test Server.
    6) Now, Started recovery using following command from SQL prompt.
    SQL> recover database until cancel using backup controlfile;
    7) Open database after Recovery Completion using RESETLOGS option.
    Now in Above scenario I completed steps upto 5) successfully. But when I execute the step 6) the recovery completes with Warning : Recovery completed but OPEN RESETLOGS may throw error " system file needs more recovery to be consistent " . Please find the following snapshot ....
    ORA-00279: change 7001816252 generated at 01/13/2008 12:53:05 needed for thread
    1
    ORA-00289: suggestion : /oracle/EPR/oraarch/1_9624_601570270.dbf
    ORA-00280: change 7001816252 for thread 1 is in sequence #9624
    ORA-00278: log file '/oracle/EPR/oraarch/1_9623_601570270.dbf' no longer needed
    for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00308: cannot open archived log '/oracle/EPR/oraarch/1_9624_601570270.dbf'
    ORA-27037: unable to obtain file status
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/oracle/EPR/sapdata1/system_1/system.data1'
    SQL> SQL> SQL> SQL> SQL> SQL> SQL>
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/oracle/EPR/sapdata1/system_1/system.data1'
    Let me know What should be the reason behind recovery failure !
    Note : I tried to Open the database using Last Full Hot Backup only & not applying any archives. Then Database Opens successfully. It means my Database Installation & Configuration is OK !
    Please Let me know why my Incomplete Recovery using Archive logs Goes Fail ?
    Atul Patil.

    oh you made up a new thread so here again:
    there is nothing wrong.
    You restored your backup, archives etc.
    you started your recovery and oracle applyed all archives but the archive
    '/oracle/EPR/oraarch/1_9624_601570270.dbf'
    does not exist because it represents your current online redo log file and that is not present.
    the recovery process cancels by itself.
    the solution is:
    restart your recovery process with:
    recover database until cancel using backup controlfile
    and when oracle suggests you '/oracle/EPR/oraarch/1_9624_601570270.dbf'
    type cancel!
    now you should be able to open your database with open resetlogs.

  • Rman hot backup

    hello
    i am using rman hot backup script to take backup database everyday but the problem is it is working but not deleting old backup older than 2 days .
    also i have question .. my database is in archive log mode and everyday about 6-7 .arch files generating in my archive directory.
    it is not deleting the old files but generating new files everyday so adding up to the space.
    SQL> show parameter archive
    NAME TYPE VALUE
    archive_lag_target integer 0
    log_archive_config string
    log_archive_dest string /u03/archive_logs/DEVL
    log_archive_dest_1 string
    also should i set dest_1 as archive location or just log_archive_dest
    whats is the difference.?
    my rman script is
    RMAN Hot backup.unix script
    The RMAN hot backup script rman_backup.sh:
    # !/bin/bash
    # Declare your environment variables
    export ORACLE_SID=DEVL
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
    export PATH=$PATH:${ORACLE_HOME}/bin
    # Start the rman commands
    rman target=/ << EOF
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u03/backup/autobackup_control_file%F';
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
    run {
    allocate channel d1 type disk;
    allocate channel d2 type disk;
    allocate channel d3 type disk;
    allocate channel d4 type disk;
    ALLOCATE CHANNEL RMAN_BACK_CH01 TYPE DISK;
    CROSSCHECK BACKUP;
    BACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT '/u03/backup/databasefiles_%d_%u_%s_%T';
    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL FORMAT '/u03/backup/archivelogs_%d_%u_%s_%T' DELETE INPUT;
    BACKUP AS COMPRESSED BACKUPSET CURRENT CONTROLFILE FORMAT '/u03/backup/controlfile_%d_%u_%s_%T';
    CROSSCHECK BACKUP;
    DELETE NOPROMPT OBSOLETE;
    DELETE NOPROMPT EXPIRED BACKUP;
    RELEASE CHANNEL RMAN_BACK_CH01;
    EXIT;
    EOF
    thanks

    Ahmer Mansoor wrote:
    RMAN never deletes the Backups unless there is a space pressure in the Recovery Area. Instead it marks the Backups as OBSOLETE based on Retention Policy (in your case it is 2 Days),
    To confirm it SET DB_RECOVERY_FILE_DEST_SIZE to some smaller value, the RMAN will remove all the Obsolete Backups automatically to reclaim space.Be very careful with this. If you generate a LOT of archivelog files and you exceed this size, on the next archivelog switch your database will hang with "cannot continue until archiver freed". RMAN will not automatically remove anything. RMAN only removes stuff when you program it in your script.
    See:
    http://docs.oracle.com/cd/E14072_01/backup.112/e10642/rcmconfb.htm#insertedID4 Retention Policy (recovery window or redundancy)
    things like:
    set retention window and number of copies
    crosscheck backup
    delete obsolete <-- delete old, redundant, no longer necessary backups/archivelogs
    delete expired <-- NOTE: If you manually delete files and do not execute delete expired (missing file), the DB_RECOVERY_FILE_DEST_SIZE remains the same. So, you can clean out the space and oracle will still say the location is "full".
    Understand that if you also set this parameter too small and your backup recovery window/redundancy are incorrectly set, you can also exhaust the "logical" space of this location again, putting your database at risk. Your parameter could be set to 100G on a 400G file system and even though you have 300G available, Oracle will see the limit of this parameter.
    My suggestion, get in a DEV/TEST environment and test to see how to best configure your environment for RMAN database backups/control file, archivelog backups also taking into consideration OS tape backup solutions. I always configure DISK for RMAN backups, then have some other tape backup utility sweep those locations to tape ensuring that I have sufficient backups to reconstitute my database - I also include a copy of the init.ora file, password file as well as the spfile backup in this location.
    >
    In case of Archivelogs, It is better to create and execute a Purge Job to remove Archivelogs after backup them on tape.I almost agree. I try to keep all archivelogs necessary for recovery from last full backup online. I try to keep a full backup online as well. much faster at restoring stuff instead of trying to locate it on tape.

  • Hot backup slow

    Hi,
    I am working in oracle8i.We are using hot backup in our database. Normally it takes 2 hrs to complete the backup process.
    but today it took 5 hrs to complete the backup process. Kindly let me know what are the possible ways to identify the solution for taking more time.
    Rgds.

    Hi,
    There could be any number of reasons for the backup taking longer - but here are a few likely candidates:
    The server was busier than usual - run top to see if anything unusual is hogging CPU.
    The database was busier than usual - did someone run a large report/update
    Tape drive contention - do you share a tape device with another app?
    The database has grown significantly.
    Cheers,
    Andy Barry
    http://www.shutdownabort.com

  • Recovery using Hot Backup

    We have to create a new enviornment(pre-prod) using Hot backup (restore from tape of last week) of the current prod DB, we have installed the same version of software as in prod and prepared init file but i am not sure about how we are going to do the recovery from last week backup,it would be a incomplete recovery as they want data till last week only,to my knowledge..we will create a new control file and open the DB using resetlogs...please can somebody help/guide me more on this...please share the steps required.
    Thank You

    We have to create a new enviornment(pre-prod) using Hot backup (restore from tape of last week) of the current prod DB, we have installed the same version of software as in prod and prepared init file but i am not sure about how we are going to do the recovery from last week backup,it would be a incomplete recovery as they want data till last week only,to my knowledge..we will create a new control file and open the DB using resetlogs...please can somebody help/guide me more on this...please share the steps required.If you have backup of one week older, then
    1)startup instance in nomount status
    2) check the logfile of RMAN for controlfile backup piece
    or from Production give below command and check for the backup of the last week controlfile.
    RMAN> list backup of controlfile;
    note the backup piece
    3) again back to pre-prod
    RMAN> restore controlfile from 'backup piece';
    5) SQL> alter database mount;
    6) RMAN> Restore database;
    after restore database open database with resetlogs, If you see any inconsistency apply archives 1/2 or as needed for consistency. and open database with resetlogs.
    Here duplicate from active database wont work as you want 1 week older data.

  • Implementing Hot Backups

    HI ,
    i am new to the idea of hot backups , so need abit of advice on how to implement them by using RMAN and User based techniques
    a little bit abt my production environment
    Oracle 9.2.0.6
    EBS 11.5.10
    OS is HP UX 11.11
    earlier i used to get downtime of 2 hrs , so iused to cold backups wid RMAN as well OS based techniques , now due to 24 hr system requiremnt
    i have to use hotbackups, DB size is 200GB, how can i use hot backups so as my system works efficiently without any extra load

    Soli wrote:
    Hi,
    Each tablespace that needs to be backed-up must be switched into backup mode before copying the files out to secondary storage.
    This can be done as shown below:
    ALTER TABLESPACE xyz BEGIN BACKUP;
    ! cp xyfFile1 /backupDir/
    ALTER TABLESPACE xyz END BACKUP;
    The above would only be for user managed backups, which the OP has no reason to be doing. We should be guiding him in how to use rman, not in how to use obsolete techniques -- <b><i><u>ESPECIALLY</u></i></b> since he is new to the whole subject of backups and would easily be confused by mixing the techniques.
    Recovery Manager command:
    run {
    allocate channel t1 type `SBT_TAPE';
    backup
    format `df_%s_%t'
    (datafile 10);
    When Recovery Manager executes the above command, it sends the Oracle backup request to the Oracle server performing the backup.
    The Oracle server process identifies the output channel as the type `SBT_TAPE', and requests the Media Management Library to load a tape and write the output specified.
    but ther you must ask sysadm which storage you use and how to backup there.
    btw.
    there is link how to setup RMAN
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/setup004.htm
    Regards,
    Tom
    http://oracledba.cz

  • Backup on Tape

    Hi
    I was wondering, what is the best way to backup Oracle Database on DDS Tapes??
    Any suggestions or ideas are apreciated.
    Regards
    Tony S. Garabedian

    Hi
    Thanks for the reply, i usually do Export save it on 2 seperate places i use it for small recoveries like 1 single table or couple of rows and stuff, and i backup the oradata folder on Tape, these are daily and monthly the whole system.
    I'll lookup for the hot backup and try it.
    Regards
    Tony S. Garabedian

  • Hot swapping DLT tape drives

    Is it possible to hot-swap a tape drive on an Enterprise 4000 running Solaris 5.5.1?
    I have an E4000 with an array and tape drive attached. The drive seems to be kaput. I can get it to run for a little while, but my cron backups are failing. I've done all the hardware chacking I can (I'm 2500 miles away from the server) and had the on-site techs check the scsi connections, recycle the unit, clean it, et al.
    I don't know where in the chain the drive is, or even if it's on the same scsi bus as the array. Is there any way I can find out which bus it's on, and which bus the array is on?
    Assuming it's either the last device on the chain attached to the array or on it's own scsi bus, can I swap it with another drive set to the same scsi address?
    Thanks,
    Mark

    As Emily Latilla said, "Never mind..." Answered the question myself.
    Thanks
    Mark

  • Hot Backup을 Script로 작성후 Cron으로 실행시...

    안녕하세요!
    건강한 가을 보내시고 계신지요?
    오늘은 Hot Backup에 대해서 몇가지 궁금한게 있어서 글을 올립니다
    -. HP-UNIX 11, Oracle 9.2.0.7
    -. Oracle Database 파일 용량 : 약 50G
    -. Script 내용중 일부 발췌
    alter system switch log file; <--백업해야할 dbf 양이 많아 먼저 한번 실행시켰음
    ####### Tablespace Backup
    alter tablespace system begin backup;
    !cp /oradata/system01.dbf /BACKUP/hot/system01.dbf
    alter tablespace system end backup;
    ...........각 테이블스페이스별로 위와 같이 정의
    ####### Archive Log File Backup
    alter system switch log file;
    alter system archive log off;
    !cp /oradata/arch/*.arc /BACKUP/hot/arch/.
    !rm /oracle/arch/*.arc
    alter system archive log start;
    ####### Control File Backup
    alter system checkpoint;
    alter database backup controlfile '/BACKUP/hot/control.bkp';
    위와 같이 Script를 작성하여, Cron을 사용하여 야간에 작업을 수행코자 합니다.
    1. 위의 Script에서 수정을 가해야 하는 부분이나, 좀 더 추가되어야할 부분이 있으시면 기탄없이 지적 부탁드립니다.
    2. 야간에 작업을 수행하다보니, Tablespace의 Begin backup을 했는데, 여타의 장애로 인해 End Backup이 수행이 안될경우, DBA가 강제로 End Backup을 안해줄 경우에는 어떻게 되는지요?
    그리고, 이러한 위험을 해결키 위해 고수님들은 어떠한 방법을 사용하는지 알고 싶습니다.
    행복한 하루 되십시요!
    감사합니다.

    첫번째로..
    백업초기에 log switch를 하는 것은 경험상 필요하기도 합니다.
    트랜잭션이 거의 없는 백업본의 경우에 archive가 거의 떨어지지
    않게 되고, 하루 백업하는데 백업본에 archive는 없는 이상한 사태가
    벌어지죠. 차후에 cancel복구를 해야 하는 경우에도 어렵기 때문에
    online backup 시 초기에 log switch 를 해주기는 합니다.
    두번째로..
    alter system archive log stop; 명령은 왜 하셨는지요?
    이거 하면.. archiveing 이 멈추니 트랜잭션도 멈춥니다. 서비스 영향을
    줄텐데요.. 백업이 서비스에 영향을 주어서는 안되겠죠.
    archive log를 백업시에는 파일명에 대한 리스트를 만들고 그 리스터에
    있는 파일들을 백업후 삭제하는 방법으로 변경하시는 것이 좋을 것 같습니다.
    세번째로.. 컨트롤파일 백업은 tablespace backup 이후에
    바로 하시는 것이 좋습니다. archive file을 백업하는 시간동안
    SCN이 변경이 되겠고, 그러면 해당 컨트롤파일을 백업하고 그것을
    restore하게 되면 controlfile의 scn이 틀리니 controlfile의 SCN까지
    복구가 필요하다고 판단하겠죠.
    순서를.. 테이블스페이스 데이터파일 백업 -> 컨트롤파일 백업 -> 아카이브백업
    이런 순으로 하시면 좋을 것 같습니다.
    네번째로..
    begin backup을 하게 되면 테이블스페이스의 데이터파일 헤더에는 bebin
    backup mode라고 쓰게 됩니다. 그리고 이렇게 begin backup mode인
    테이블스페이스에서 변경된 데이터는 그 데이터를 row 단위로 redo log entry에
    등록하는 것이 아니라 블록단위로 등록하게 됩니다. 즉 단 하나의 row만을
    update했을 뿐인데도 해당 block전체가 redo log entry로 들어가겠죠. 당연히
    archive file이 훨씬 많이 쌓이게 됩니다. 또한 DB를 abort로 내렸을 경우에는
    이후에 open을 하려고 하면 system01.dbf 파일을 복구하라고 나와서
    아주 당황하게 되지요.
    그리고 사례를 보면..모 시청에서 DBA가 한달동안
    begin backup이 된 것을 몰랐고, DB fail이 났는데..복구를 한답시고
    controlfile을 재생성하였습니다. 그런데 bootstrap failure가 발생했고
    게다가 아카이브도 없고 백업도 없는 것이었습니다. 결국엔 adjust scn으로
    강제복구를 했지요.. begin backup mode인지는 아침에 시스템담당자가
    꼭 확인해야 하는 것 중에 하나입니다. 아침 점검 스크립트 수행하지
    않으시는지요?
    첨부로.. 얼마전에 여기 게시판에도 올렸던 내용인데요..
    백업 스크립트를 드리죠..
    그리고 아침에 DB를 점검할 때 보아야 하는 사항은 제가 정리한 것이
    있습니다.
    아래 링크에서 다운받아서 참고하세요.
    http://www.dbguide.net/servlet/com.util.DownloadServlet?file=%2F20060120%2F1137768090586.zip&filename=%C0%CF%C0%CF+DB%C1%A1%B0%CB+%BD%BA%C5%A9%B8%B3%C6%AE_%B0%F8%B0%B3%BF%EBv0.1.zip
    ===================================================
    온라인 백업은 파라메터 파일 , 콘트롤 파일, 모든 데이터파일 , 아카이브로그를
    백업후 다른 서버로 이동시키면 다른 서버로 복구할 수 있습니다.
    하지만 online backup시에 datafile, controlfile만을 백업하므로 current redo log가 없으므로
    until cancel 복구를 해야 합니다.(rman 백업도 마찬가지)
    1) init파일,DB file, controlfile을 다른서버로 이동시킵니다.
    보통 controlfile백업은 alter database backup controlfile to '~~'; 이렇게 하기 때문에
    하나만 복사하므로 이것을 추가 복사해서 controlfile의 경로에 복사해줍니다.
    2) init파일에 controlfile의 경로, background_dump_dest, user_dump_dest, core_dump_dest, log_archive_dest 를
    경로에 맞게 지정해줍니다.
    3) DB를 mount상태로 올립니다. 만약 mount하는 동안 에러가 난다면 controlfile에서
    문제가 생겼으므로 controlfile의 백업을 확인합니다.
    4) datafile, redolog file의 file_name을 변경합니다.
    select name from v$datafile;
    select member from v$logfile;
    alter database rename file '현재경로' to '이동시킨 경로';
    alter database rename file '현재경로' to '이동시킨 경로';
    단 여기에서 tempfile은 백업대상도 아니고 rename이 안되므로 새로 생성해 주어야 합니다.
    select name from v$tempfile;
    select * from sys.props$;에서 default temporary tablespace를 찾거나
    또는 select distiinct temporary_tablespace from dba_users 에서 찾습니다.
    tempfile을 추가하는 방법은 더이상 말씀 안드립니다. NBR과정의 기본이니까요..
    5) DB의 archive file을 log_archive_dest 에 설정된 곳으로 이동시키고 recovery를 수행합니다.
    recover database until cancel;
    마지막 archvie까지 적용후 cancel하기
    alter database open resetlogs;
    resetlogs open하기
    # 온라인 백업 스크립트(데이터파일, 컨트롤파일만 백업)
    작업 이전에 /backup , /backup/control 이라는 디렉토리 생성
    - 백업 메인
    vi /backup/onbackup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    sh -x /backup/1_onbackup.sh
    sh -x /backup/2_cp_backup.sh
    sh -x /backup/3_control_backup.sh
    sh -x /backup/4_offbackup.sh
    - 백업 모드 변경
    vi /backup/1_onbackup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    # backup mode on
    sqlplus /nolog << EOF1
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/backup_online.tmp
    select 'alter tablespace '||tablespace_name||' begin backup;' from dba_tablespaces where status='ONLINE' and contents <>'TEMPORARY';
    spool off
    !cat /tmp/backup_online.tmp|grep -v spool|grep -v SQL > /tmp/backup_online.sql
    @/tmp/backup_online.sql
    exit
    EOF1
    - 데이터파일 백업할 쿼리
    vi /backup/2_cp_backup.sql
    select 'mkdir /backup/'||to_char(sysdate,'YYYYMMDD_HH24MI') from dual;
    select 'cp '||name||' /backup/'||to_char(sysdate,'YYYYMMDD_HH24MI') from v$datafile;
    - 데이터파일 copy하는 스크립트
    vi /backup/2_cp_backup.sh
    # cp backup, mkdir /backup/SYSDATE directory
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    sqlplus /nolog << EOF2
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/backup_script.tmp
    @2_cp_backup.sql
    spool off
    !cat /tmp/backup_script.tmp |grep -v spool |grep -v SQL > /tmp/backup_script.sh
    !chmod 755 /tmp/backup_script.sh
    exit
    EOF2
    sh -x /tmp/backup_script.sh
    - 컨트롤파일 백업
    vi /backup/3_control_backup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    # controlfile backup
    sqlplus /nolog << EOF3
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/control_backup.tmp
    select 'alter database backup controlfile to ''/backup/control/'||to_char(sysdate,'YYYYMMDD_HH24MI')||'.ctl'';' from dual;
    spool off
    !cat /tmp/control_backup.tmp |grep -v spool|grep -v SQL > /tmp/control_backup.sql
    @/tmp/control_backup.sql
    exit
    EOF3
    - 백업모드 offline하기
    vi /backup/4_offbackup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    # backup mode off
    sqlplus /nolog << EOF4
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/backup_offline.spool
    select 'alter tablespace '||tablespace_name||' end backup;' from dba_tablespaces where status='ONLINE' and contents <>'TEMPORARY';
    spool off
    !cat /tmp/backup_offline.spool |grep -v SQL > /tmp/backup_offline.sql
    @/tmp/backup_offline.sql
    exit
    EOF4
    그리고 만약 파일리스트만 내리고 veritas netbackup으로 백업이 가능하다면 아래와 같이 하면
    됩니다. veritas netbackup에서는 file리스트만 파일로 떨구면 그 파일을 백업해줍니다.
    archvie backup은 아래와 같이 하면 되는데 아래는 archive file의 backup list만 만듭니다.
    수정해서 backup list에서 YYYYMMDD_HH24MI의 분단위 디렉토리를 만들고 archive file을
    다른 서버로 cp복사하도록 하면 됩니다. 꼭 아래 스크립트는 테스트 후에 사용하시길
    바랍니다...
    # 데이터파일 백업과 archvie백업 쉘은 아래와 같습니다.
    1. begin backup할 스크립트를 수행합니다.
    dbbegin.sh
    TBS_INFO=/tmp/tbs_info~.$$
    sqlplus /nolog << EOF > $TBS_INFO 2>&1
    connect / as sysdba;
    select 'tablespace '||tablespace_name from dba_tablespaces;
    disconnect;
    exit
    EOF
    cat $TBS_INFO | awk ''$1 == "tablespace" { print $2 }'' | while read LINE
    do
    export LINE
    echo "Issuing alter tablespace $LINE begin backup;"
    /usr/openv/netbackup/oracle/table_begin.sh
    done
    \rm $TBS_INFO
    2. 위에서의 table_begin.sh 는 아래와 같습니다.
    table_begin.sh
    sqlplus /nolog << EOF > /dev/null 2>&1
    connect / as sysdba;
    alter tablespace $LINE begin backup;
    disconnect;
    exit
    EOF
    3. dbbegin.sh 을 하게 되면 테이블스페이스가 backup mode가 됩니다.
    4. 데이터파일 리스트를 추출합니다.
    datafile_list
    #!/bin/ksh
    DATAFILE_INFO=/tmp/datafile_info~.$$
    datafile_list=/tmp/PROD_data_list
    sqlplus /nolog << EOF > $DATAFILE_INFO 2>&1
    connect / as sysdba;
    select ''datafile_name ''||file_name from dba_data_files;
    select ''logfile_name ''||member from v\$logfile;
    select ''controlfile_name ''||name from v\$controlfile;
    disconnect
    EOF
    cat $DATAFILE_INFO | awk ''$1 == "datafile_name" {print $2}''
    /tmp/PROD_dbfile_list cat $DATAFILE_INFO | awk ''$1 == "logfile_name" {print $2}''
    /tmp/PROD_logfile_list cat $DATAFILE_INFO | awk ''$1 == "controlfile_name" {print $2}''
    /tmp/PROD_controlfile_list cat /tmp/PROD_dbfile_list > $datafile_list
    cat /tmp/PROD_logfile_list >> $datafile_list
    cat /tmp/PROD_controlfile_list >> $datafile_list
    \rm $DATAFILE_INFO
    5. 데이터파일 리스트를 netbackup에서 tape백업을 하도록 합니다.
    veritas netbackup에서 리스트만 주면 백업해줌..
    6. end backup 을 만드는 스크립트를 수행
    dbend.sh
    #!/bin/ksh
    TBS_INFO=/tmp/tbs_info~.$$
    sqlplus /nolog << EOF > $TBS_INFO 2>&1
    connect / as sysdba;
    select ''tablespace ''||tablespace_name from dba_tablespaces;
    disconnect;
    exit
    EOF
    cat $TBS_INFO |awk ''$1 == "tablespace" { print $2 }''|while read LINE
    do
    export LINE
    echo "Issuing alter tablespace $LINE end backup;"
    /usr/openv/netbackup/oracle/table_end.sh
    done
    \rm $TBS_INFO
    7. 위에서 table_end.sh 는 아래와 같습니다.
    table_end.sh
    sqlplus /nolog << EOF > /dev/null 2>&1
    connect / as sysdba;
    alter tablespace $LINE end backup;
    disconnect;
    exit
    EOF
    6. archive log가 없을 수 있으므로 수동으로 log switch 해줍니다.
    arch_list_1
    #!/bin/ksh
    sqlplus /nolog << EOF > $LOG
    connect / as sysdba;
    alter system switch logfile;
    disconnect;
    exit;
    EOF
    7. archvie file의 리스트를 뽑아냅니다.
    arch_list
    #!/bin/ksh
    TBS_INFO=/tmp/tbs_info~.$$
    ARCHIVE_DIR=/tmp/PROD_archive_dir.txt
    sqlplus /nolog << EOF > $LOG 2>&1
    connect / as sysdba;
    alter system switch logfile;
    disconnect;
    exit;
    EOF
    sqlplus /nolog << EOF > $TBS_INFO 2>&1
    connect / as sysdba;
    archive log list;
    disconnect;
    exit;
    EOF
    cat $TBS_INFO | awk ''$1 == "Archive" {print $3}'' > $ARCHIVE_DIR
    ARCH_DIR=
    cat $ARCHIVE_DIR
    ARCH_LIST_PROD=
    ls -ltr $ARCH_DIR/*.arc |wc -l
    echo "ARCH_LIST_PROD : $ARCH_LIST_PROD" >> $LOG
    ARCH_LIST_PROD_1=
    expr$ARCH_LIST_PROD - 1
    echo "ARCH_LIST_PROD_1 : $ARCH_LIST_PROD_1" >> $LOG
    /usr/bin/ls -ltr $ARCH_DIR/*.arc |awk ''{print $9}'' |head -
    $ARCH_LIST_PROD_1 > /tmp/PROD_arch_list
    echo "Archive Log List Print.....O.k....
    /usr/bin/date +%c
    " >> $LOG
    #\rm $TBS_INFO $ARCHIVE_DIR
    8. 위에서 /tmp/PROD_arch_list에 있는 archive리스트를 veritas netbackup에서 넣어주면 tape백업이 됩니다.그리고 특이한 것은 archvie file은 archive file을 백업했으면
    지우도록 설정하면 되겠지요.

  • FULL HOT Backup failing with a 6 on media management layer....

    Hi all,
    My thanks in advance for reading and any posts. Appologies for the long post, but wanted to make sure I got all information required into the post
    *******************The background*************************
    We are currently doing full hot backups of all production databases to tape. The database we use is RAC install (9.2.0.6.0) on Linux Redhat Enterprise 4 (database on OCFS). We use a seperate Solaris 8 box with 2 HP Ultium tape drives over a standard Cat5 line (100mb), we use Veritas Netbackup 5.1 as our media manager and we use an RMAN repositry on another box. Currently the backup is taking on average 17 hours to complete (something that I have been through with Oracle).
    We use the below rman script to do the full database backup.
    DATE=`date +%m%d%Y-%H%M%S`; export DATE
    USER=`id | cut -f2 -d"(" | cut -f1 -d")"`
    ORACLE_SID=ausl5; export ORACLE_SID
    ORACLE_USER=oracle; export ORACLE_USER
    ORACLE_HOME=/u01/oracle/product/9.2.0 export ORACLE_HOME
    #delete log files older than 35 days
    find /var/adm/netbackup -name "auslive*" -mtime +35 -type f -exec rm {} \;
    #if [ "${USER}" = "root" ]
    #then
    # su - ${ORACLE_USER} "cd /rac/DBA/scripts/BACKUP/" #-c "${CMD_STRING}"
    # SUCCESS=$?
    #else
    # eval "/rac/DBA/scripts/BACKUP"
    # SUCCESS=$?
    #fi
    <<EOF su - oracle
    <<EOF1 /u01/oracle/product/9.2.0/bin/rman msglog /var/adm/netbackup/AUSLIVE_b
    ackup.${DATE} append
    connect target sys/fowler@rman_ausl5
    connect catalog rman/rman@rman
    #change archivelog all validate;
    run {
    allocate channel ch1 type sbt_tape PARMS="BLKSIZE=1048576";
    #allocate channel ch2 type sbt_tape PARMS="BLKSIZE=1048576";
    #allocate channel ch3 type sbt_tape;
    CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
    CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 100000m
    CONNECT = 'SYS/fowler@rman_ausl5';
    #CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 100000m
    CONNECT = 'SYS/fowler@rman_ausl3';
    #CONFIGURE CHANNEL 3 DEVICE TYPE 'SBT_TAPE' CONNECT = 'SYS/fowle
    r@rman_ausl4';
    change archivelog all validate;
    ###=============== Veritas Calls =========================
    send "NB_ORA_CLASS=ORAhot_AUSLIVE";
    #send "NB_ORA_CLIENT=sunatlsunx008";
    send "NB_ORA_CLIENT=sunatlsunx008";
    send "NB_ORA_SCHED=full";
    ###=====================main backup sections =============
    backup
    incremental level=0
    filesperset 15
    format "bk_%s_%p_%t"
    tag "hot_${ORACLE_SID}_${DATE}"
    database;
    sql "alter system archive log current";
    change archivelog all validate;
    backup
    filesperset 10
    format "ct_%s_%p_%t"
    current controlfile;
    sql "alter system archive log current";
    backup
    filesperset 150
    format "al_%s_%p_%t"
    archivelog all not backed up 2 times;
    change archivelog all validate;
    backup
    filesperset 50
    format "al_%s_%p_%t"
    archivelog until time 'SYSDATE-4' delete input;
    change archivelog all validate;
    release channel ch1;
    #release channel ch2;
    #release channel ch3;
    exit
    EOF1
    EOF
    Now due to the backup taking so long, we often have archive log backups that kick off. We generally get Restore Validates of this backup once a week.
    *********************************Problem*******************************
    Getting to the problem, the media manager generally completes the job with a 6, which in Veritas means that the backup failed to back up the requested files. I guess that this could be something to do with the media manager layer. But myself and my colleagues are of the opinion that this is something to do with the archive log backups running inbetween (hence the change archivelog all validate; appearing so many times in the script).
    Has anyone got any ideas?
    Thanks again for any posts / ideas,
    Mark.

    No I mean, it really tries to backup everything; control file, archive logs etc...
    Yeah I will admit its a bit strange, didn't code it myself. The idea was to do a bit a of house keeping at the same time with the archived redo logs (hence the file system stuff with the archived redo logs).
    You see we thought that this might be causing the issue.
    any ideas are welcomed,
    thanks again,
    Mark.

  • RMAN Full  Hot Backup Daily

    Hi,
    I have Production Database going to live this week..
    this is my RMAN Backup script for taking daily Full Hot Backup night 12pm...
    I have enabled FLASH_RECOVERY_AREA
    DB_RECOVERY_FILE_DEST=/backup/flash_recovery_area
    log_archive_dest=/backup/archivelog
    log_archive_format='arch_%d_%S_%T';
    =========================================================
    rman target=/
    configure controlfile autobackup on;
    run
    allocate channel c1 device type disk;
    crosscheck backup;
    backup as compressed backupset database;
    sql 'alter system switch logfile';
    crosscheck backup;
    release channel c1;
    exit
    ===========================================================
    Above script is scheduled usgin cron job...
    =============================================================
    Here I am not taking the archive logs backup...because..by default..archive logs are created in 2 places
    (a) FLASH RECOVERY AREA
    (b) /backup/archivelog
    so archive logs are created by date wise in Flash Recovery Area....
    I have flash recovery area structure like this for ever day
    /backup/flash_recovery_area/PROD/archivelog/29_09_2007
    /backup/flash_recovery_area/PROD/autobackup/29_09_2007
    /backup/flash_recovery_area/PROD/archivelog/30_09_2007
    /backup/flash_recovery_area/PROD/autobackup/30_09_2007
    Above are 2 days backups of 29th and 30th....
    I can simply send those 30_09_2007 and 29_09_2007 directories to TAPE Drive....
    =======================================================================
    When disaster recovery, i can restore those directories to flash_recovery_area and do the recovery using rman...
    =============================================
    Friends...am i goin in correct way..if anything wrong...please correct me..
    my doubt is..I am not used any command of backuping up archivelogs in rman script.......becasue..archive logs are created in flash_recovery_area by date wise......
    am i correct..

    Hi,
    Thanks for the reply,
    My requirement is......Full Hot Backup daily at 2 AM......Daily i have to take this...so i scheduled this using cron job......I need to maintain 7 days backup in backup location.....
    Here is my script
    # Export Environment Variables
    export ORACLE_HOME=/oradata/oracle
    export ORACLE_SID=PROD
    export PATH=$PATH:$ORACLE_HOME/bin
    # RMAN Full Backup
    rman target / catalog rman/rman << EOF
    configure controlfile autobackup on;
    configure retention policy to redundancy 7;
    run
    crosscheck backup;
    backup as compressed backupset database;
    sql 'alter system switch logfile';
    backup as compressed backupset archivelog all;
    backup as compressed backupset current controlfile;
    crosscheck backup;
    crosscheck archivelog all;
    delete noprompt obsolete;
    delete noprompt expired backup;
    exit=============================================================
    Can u please verify that, script is good or not
    Message was edited by:
    bsubbu
    Message was edited by:
    bsubbu

  • Problem with backups on Tape

    Could you help me ,I have a problem with backups on tape drive .The error which Windows throws is "BackupTapeFile::UnloadTape: PrepareTape(UNLOCK) failure on backup device '\\.\tape0'. Operating system error 21(failed to retrieve text for this error. Reason: 15105)."
    Does anyone of you have the same problem.Thank you!

    You cannot perform a regular restore/recovery (up to the latest possible point in time), because at this time dropped tablespace is not known to the controlfiles/recocery catalog and therefore not known to RMAN,too. You have to 2 possibilities:
    1. Restore the entire database and recover back in time to before the tablespace is dropped.
    This will cause ALL data within the database to go back in time, not just this tablespace.
    2. Clone the target database to a new location, perform point in time recovery in order to export
    the data of the tablespace for import into the original database. This causes the data of this
    tablespace to be brought back into the production database, not effecting existing (current) data
    in any other area of the database.
    As you can see recovering from a dropped tablespace needs some additional efforts. By the way you also cannot use RMAN's TSPITR functionality.
    Werner

Maybe you are looking for

  • Who can help me with this form?

    Having some problems with the form ive placed on my site. I cant find the problem. Is there someone who can tell me what i have done wrong. you can see the form on. http://www.salontouche.nl/explorers.htm and the error i get is.. Oops! This page appe

  • Business content - UDC extractors

    I am activating a package that contains InfoSources with UDC data sources. I would like to use the Infosources and Infopackages out of the box if possible: Scenario 1: J2EE RFC and JNDI name will be the same as defined in Business content InfoSources

  • HOW do you save FCP X to external drives?

    How do I set the scratch disk or change where my project is saved in FCP X?

  • Canon 70D raw files  Photoshop Elements 11

    How can I view Canon 70D raw files in Photoshop Elements 11?

  • Styles Won't Preview in Browser

    This must be something simple I haven't set up right... (fairly new at this) ... but I've created a stylesheet for the site I'm working on and the styles all show up fine in Dreamweaver, but whenever I try to preview the pages in a browser, the style