Tablespace restore

Hi all experts,
My environment is 2 node rac 11GR2 in windows 2008. I put the database in no mount mode but when i tried to log in through sqlplus , i am getting following errors,. My purpose is to restore control file from autobackup for dropped tablespace in rman while database in no mount.
C:\Users\bn>SRVCTL start database -d DBTSTLAB -o nomount
C:\Users\bn>sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 10 08:51:33 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
nolog> connect sys @DBTSTLAB as sysdba
Enter password:
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections

user10890219 wrote:
I shut down database instance in both nodes through sqlplus then tried to do no mount. I am getting following errors.
SQL> conn sys@LAB as sysdba
Enter password:
Connected.
SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
SQL>
Not "conn sys@lab", but "conn / as sysdba".  The "@lab" forces a tns connection through the listener, which cannot be serviced if the database is down .. unless you have static registration.  But there is really no reason to be using a tns connection for basic db admin like startup and shutdown. 

Similar Messages

  • Tablespace restore pending

    Hi, experts
    While redirect restore, I didnot pay attention to the tablespace states and started the rollforward and started the sap instance.
    Checked the log and found out the one of the z-tablespace was offline and it is still restore pending status.
    Since the tablespace is not important to typical business transactions, I do not want to restore the whole database and start from scratch.
    I am considering the tablespace restore.
    What options do I have?
    Thanks for the sugguestions in advance.

    Hi,
    You can restore the particular tablespace and rollforward to bring it in line with the rest of the tablespaces.
    Here is the info centre guide for v9.7, please adjust if you are using a different release:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.cmd.doc%2Fdoc%2Fr0001976.html
    regards,
    Paul

  • Cold backup tablespace restore

    From a cold backup can you restore a tablespace to a different database.
    A datafile was created and dropped and now we are recieving ORA-1186, ORA-1157 cannnot/identify lock datafile
    We know that if our database goes down it won't come back up. The table space has about 250 tables and its huge about 100g in size. Does anyone know of what steps needs to be taken?
    Edited by: user10767182 on Jan 6, 2009 8:35 PM

    I couldn't quite workout what you were saying, but I think you were suggesting that copies of the lost tables and data are sitting in a second database somewhere, and you would like to pull them out of that database and plug them into the broken database. Is that right?
    If so, you cannot take a datafile from one database and plug it into another, unless you use the transportable tablespace option.
    Basically, on your broken database, you'd shut it down, bring it back to the mount state and then say alter database datafile X offline drop
    That will let you issue an alter database open followed by a drop tablespace X, and your broken database will at least be open, minus the important tablespace
    You then get your second database open and make the important tablespace read-only
    You'd drop to the command line and do an export using the TRANSPORT_TABLESPACE option -the command is too susceptible to the specifics to show you here. Check the documentation at http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta063.htm
    You then copy the datafile and the export dump file to the server where your broken database is running
    You then run an import, again specifying the TRANSPORT_TABLESPACE option
    Effectively, the datafile copy gets 'plugged in' to the broken database and gets adopted as a native, brand new tablespace, complete with contents. You finish off by making the tablespace read-write in both databases once more.
    Obviously, you lose data using this sort of process: the data comes back into your 'broken' database in the same state it was in your second database, and you can't apply redo to it to recover it to a more recent state. But that's going to be the best you can do if you don't have proper physical backups of the file. Your subject mentioning cold backups confused me a little on that score too.
    So I won't go into any more detail for now. It may be that I misunderstood the reference to 'restore a tablespace to a different database' and your requirements completely. But if this sounds like what you are after, and if you are stuck on any of the details, then you can always post a follow-up.

  • Tablespace Restore From Whole Database Backup

    Hi
    I tooks whole database backup.
    BACKUP DATABASE;
    Note:- No saperate tablespaces backup.
    After that, if required I use to restore saprate tablespace from above backup.
    RESTORE TABLESPACE tb_1;
    RECOVER TABLESPACE tb_1;
    Is this tecnique recomanded or not?
    Wishes
    Jawad

    There's no need to recover the whole database, if only one component has a failure. Tablespace recovery will only work, if the database runs in archivelog mode.

  • Tablespace Backup & Restore

    Hi Team,
    I am working on the TableSpace Backup & restore operation.
    I can able to take backup of the tablespace using the rman script. Also I can able to restore that table space properly without any errors.
    Now my query is that How can I verify that tablespace is restored properly or not.
    Like in whole database backup & restore , we will create table in database & take a backup of the whole database after that we delete that table. & then we will perfom the Incomplete recovery to get back that table.
    Can we have any method to verify for Tabalespace.?
    Plz comment ,
    Regards,
    S. Tiwari

    Hi edrian,
    Thanks for the reply,
    I had created the table in the EXAMPLE tablespace as testing
    Now after that I had taken the backup of EXAMPLE tablespace using follwing script.
    run
    BACKUP TABLESPACE 'EXAMPLE' FORMAT 'C:\BK\EXAMPLE_%d_%s';
    & its taking the tablespace backup succesfully also .
    Now after that I am dropping that table from the database.
    If I do Incomplete recovey for the EXAMLE tablespace , I am expecting the table back in the database. But its not there in the database.
    I am using Incomplete restore Script as given below.
    run
    RESTORE TABLESPACE "EXAMPLE" UNTIL TIME "to_date('Feb 08 2007 11:54:56','Mon DD YYYY HH24:MI:SS')";
    Plz comment if I am going wrong anywhere. Also suggest me the proper Incomplete tablespace restore script.
    Regards,
    S. Tiwari

  • Restoring a tablespace that was dropped

    Hello all, I've got a question. I'm trying to make a script to restore a tablespace that was deleted with the command DROP TABLESPACE, but I can't do it without restoring the whole database.
    This is the script I used to make the backup:
    allocate channel full1 type disk;
    backup
    incremental level 0 cumulative
    skip inaccessible
    format '/home/oracle/backups/FULL_DB_%d_%t_%s_%p'
    database;
    copy current controlfile to '/home/oracle/backups/FULL_CF_%d_%t_%s_%p.ctl';
    backup format '/home/oracle/backups/FULL_AL_%d_%t_%s_%p'
    archivelog all
    delete input;
    release channel full1;
    I'm using Oracle 9i, running on Debian. Any one knows how to make the script that restores just a tablespace?
    Thank you.

    If you have to recover a tablespace which was read-write , you will have to restore complete database and recover to a point in time just before your drop, its not possible to recover database and tablespaces to different SCN's.
    Had it been a diskcrash/fileless, then it was able to offline tablespace, restore only that file and recover to current SCN

  • Rman restore taking unexpectedly long time

    Dear ALL,
    I have 3 TB of database which I am restoring from a hot backup on tape drive.
    Backup of this database took 7 hours but restoration of a single tablespace(800 GB) takes more than 3 days.
    Any idea ,why it is taking so much time.
    Just out of curiosity : Which is faster- restore database/restore tablespace /restore datafile in terms of bytes restored per second?
    Regards
    Saket Bansal
    Edited by: saket bansal on 11-Feb-2010 04:05

    Not enough information to advise. Your bottleneck may be on the Tape read, IO write, or even network.
    Depending on where the bottleneck is, you may increase speed by restoring from multiple channels, to faster disk, or from compressed backup pieces.
    Restore database should be faster because then rman can decide the fastest way to restore.

  • Table not found after complete tablespace recovery

    Hello Everyone, Table not found even after tablespace restored and recovered. Please loot at this if you got a minute.
    SQL> conn reddy/reddy
    Connected.
    SQL> select table_name from user_tables where tablespace_name='REDDY';
    TABLE_NAME
    RECORDS
    EMP
    SQL> select * from emp;
    ENAME E_NUM ESAL E_ID
    jim 1001 40000 25
    sam 1002 30000 27
    kim 1003 35000 30
    phil 1005 25000 37
    sam 1006 32000 40
    james 1009 43000 45
    6 rows selected.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [oracle@RHELSRV ~]$ rman
    Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 4 21:05:37 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    RMAN> connect target/
    connected to target database: ORCL (DBID=1314955841)
    RMAN> backup tablespace reddy;
    Starting backup at 04-JUL-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=115 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00008 name=/u01/app/oracle/oradata/orcl/reddy01.dbf
    channel ORA_DISK_1: starting piece 1 at 04-JUL-12
    channel ORA_DISK_1: finished piece 1 at 04-JUL-12
    piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_07_04/o1_mf_nnndf_TAG20120704T210605_7z8rq6pb_.bkp tag=TAG20120704T210605 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
    Finished backup at 04-JUL-12
    Starting Control File and SPFILE Autobackup at 04-JUL-12
    piece handle=/u01/orabackup/c-1314955841-20120704-01 comment=NONE
    Finished Control File and SPFILE Autobackup at 04-JUL-12
    RMAN> exit
    Recovery Manager complete.
    [oracle@RHELSRV ~]$ expdp dumpfile=emp.dmp logfile=emp.log directory=dpump tables=emp
    Export: Release 10.2.0.1.0 - Production on Wednesday, 04 July, 2012 21:07:21
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Username: reddy
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Starting "REDDY"."SYS_EXPORT_TABLE_01": reddy/******** dumpfile=emp.dmp logfile=emp.log directory=dpump tables=emp
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 64 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    . . exported "REDDY"."EMP" 6.070 KB 6 rows
    Master table "REDDY"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
    Dump file set for REDDY.SYS_EXPORT_TABLE_01 is:
    /u01/orabackup/emp.dmp
    Job "REDDY"."SYS_EXPORT_TABLE_01" successfully completed at 21:08:07
    [oracle@RHELSRV ~]$ sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 4 21:08:21 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter user-name: reddy
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> drop table emp;
    Table dropped.
    SQL> select table_name from user_tables where tablespace_name='REDDY';
    TABLE_NAME
    RECORDS
    SQL> conn /as sysdba
    Connected.
    SQL> alter tablespace reddy offline;
    Tablespace altered.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [oracle@RHELSRV ~]$ rman
    Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 4 21:09:39 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    RMAN> restore tablespace reddy;
    Starting restore at 04-JUL-12
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 07/04/2012 21:09:56
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06171: not connected to target database
    RMAN> connect target/
    connected to target database: ORCL (DBID=1314955841)
    RMAN> restore tablespace reddy;
    Starting restore at 04-JUL-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=109 devtype=DISK
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00008 to /u01/app/oracle/oradata/orcl/reddy01.dbf
    channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_07_04/o1_mf_nnndf_TAG20120704T210605_7z8rq6pb_.bkp
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_07_04/o1_mf_nnndf_TAG20120704T210605_7z8rq6pb_.bkp tag=TAG20120704T210605
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
    Finished restore at 04-JUL-12
    RMAN> recover tablespace reddy;
    Starting recover at 04-JUL-12
    using channel ORA_DISK_1
    starting media recovery
    media recovery complete, elapsed time: 00:00:01
    Finished recover at 04-JUL-12
    RMAN> exit
    Recovery Manager complete.
    [oracle@RHELSRV ~]$ sqlplus '/as sysdba'
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 4 21:10:42 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> alter tablespace reddy online;
    Tablespace altered.
    SQL> conn reddy/reddy
    Connected.
    SQL> select table_name from user_tables where tablespace_name='REDDY';
    TABLE_NAME
    RECORDS
    Thanks in Advance!!!!

    Hi,
    As you performed complete recovery you did see the table resotred. You can use TSPITR
    recover tablespace reddy until time "to_date('04-JUL-2012 21:07:00','dd-mon-rrrr hh24:mi:ss')" auxiliary destination ''xxxxxx';
    Read http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmtspit.htm#BRADV009
    Anand

  • Shrinking BIG file tablespace

    Version: 11.1.0.7.4 RAC & ASM
    OUR DB size is 3TB and all the tablespaces are BIGFILE tablespaces, one datafile has grown to consumed all Free Space in ASM. We have dropped the table, but some LOB segments are at the end of the data file, so we could not shrink the datafile at this time as we are getting below error
    ORA 3297 file contains <num> blocks of data beyond requested RESIZE value
    Datpump export & re-import all the object in that tablespace will relieve the space. However at this time there is not empty ASM space to adopt this route.
    So If we take "COMPRESSED RMAN BACKUP" of this tablespace and drop the tablespace and re-store it again, will the segments in that tablespace after re-store will be compact? so that we can re-size the datafile?
    or
    RMAN tablespace restore will have no effect on segments inside the tablespace evethough the RMAN backup is COMPRESSED ?

    try this,
    alter table your_big_table deallocate unused keep your_req_value;
    Also you can move the big table into an another tablespace,
    alter table your_big_table move tablespace more_space_tablespace;
    You can also use DBMS_REDEFINITION package to reorganize a table while it remains online for updates.
    Thanks

  • Database refresh from db A to db B and changing the name from B to A

    We have two databases A and B, both running on HP-UX environment on different servers. both of 10.2.0.1.0 version.
    Now, database A is production with 75.5 GB of data. database B is just skeloton with no user tablespaces.
    1.Our requirement is to refresh / clone database A to B. we are fine in recreating the database B like in case of cloning. but we want to avoid recreating database B as much possible.
    2. After refresh/clone, database B should be renamed_ to database A.
    Can you all please suggest the different methods available both by shutting down / without shutdown of database A and the approximate time taken on each cases.

    Thanks Sanjay for your suggestion.
    As per your case, we need to shutdown database A and delete the database B. We are trying to avoid this case as much as possible.
    We are thinking of options like
    export/import using datapump,
    transportable tablespaces
    restoring and recovering from backups
    In the above scenarios, we no need to delete the database B and no need to shutdown database A.
    Also, I need the approx time for each process and the method to rename the database?

  • Recover from full backup

    Hi,
    I want to recover a tablespace from a RMAN full backup. Now the related schema has many truncated objects (in a bach process), so normal tablespace restore, recovery won't help. Have to go for TSPITR. But the time I can't fix. Is there any other way to recover the tablespace other than point-in-time recovery ?

    Hi Hemant,
    When I run the TSIPTR recovery I am getting error,
    RMAN> run {
    ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    SEND 'NB_ORA_CLIENT=UBIHQ,NB_ORA_SERV=UBIHQ';
    RECOVER TABLESPACE PD811T UNTIL TIME "to_date('02-JUL-2010 23:00:00','DD-MON-YYYY HH24:MI:SS')";
    auxiliary destination '/tmp';
    }2> 3> 4> 5>
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "auxiliary": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, copy, convert, crosscheck, configure, duplicate, debug, delete, execute, endinline, flashback, host, mount, open, plsql, recover, release, replicate, report, restore, resync, }, set, setlimit, sql, switch, startup, shutdown, send, show, transport, validate"
    RMAN-01007: at line 5 column 1 file: standard input

  • Triggering offline backup getting error

    Hello All,
    While triggering offline backup getting the below error
    n4shost:db2n4s 28> db2 backup db N4S to /mnt/hgfs/DB2backup/
    SQL2048N  An error occurred while accessing object "1".  Reason code: "6".
    I have been check the tablespace status
    Tablespace 1(ZTSTTABLESPACE) state  is showing 0x4000
    How to proceed in this case.
    Kindly assist.
    Thanks and Regards,
    Sridhar

    State 0x4000 means Offline and Not Accessible. A table space is in this state if there is a problem with one or more of its containers. A container might be inadvertently renamed, moved, or damaged.
    You need first check on OS level whether the disk has been damanged.
    After the problem has been rectified, and the containers that are associated with the table space are accessible again, this abnormal state can be removed by disconnecting all applications from the database and then reconnecting to the database. Alternatively, you can issue an ALTER TABLESPACE statement, specifying the SWITCH ONLINE clause, to remove the Offline and Not Accessible state from the table space without disconnecting other applications from the database.
    If the error can not be fixed, you may need database restore, at least tablespace restore to rescue the database.

  • Migrate VLDB(30TB) NonRAC database to ASM

    My customer is running 10.2.0.5 database which is 30TB in size. Its HACMP/PowerHA with active/passive configuration.
    Customer would like to migrate this database to ASM. They dont take rman backups because of the size of the database and rely on bcv backup technology. Customer would like to know what is the best possible way of doing this migration with minimal downtime and risk.

    BCV uses copy on write technology and advanced mirroring techniques. A BCVs can be used to resync data or it can be detached from the active data storage and mounted separately for offline processing.
    If a complete restore of an object or previous device clone is sufficient then it can be a quick disaster recovery. However, certain implementations, like EMC Timefinder/Snapshot are not suitable for disaster recovery since they rely on the existence of the original data source.
    Anyway, I think BCV technology provides only a very limited way for Oracle database backup since it duplicates data errors and is not suitable for advanced rman database or tablespace restore and recovery. A 30 TB database can be time consuming for RMAN, which also depends on what kind of database it is and, for instance, how frequent a full backup is required, but it can be done.
    Regarding NAS, it is just an example to show that affordable storage solutions exist and that it does not have to be expensive EMC storage. I do not see why such a solution cannot meet very strict data center controls in terms of technical aspects.

  • ORACLE8: RECOVERY MANAGER 사용 방법(RMAN)

    제품 : ORACLE SERVER
    작성날짜 : 1997-11-17
    Oracle 8 NEW : Recovery manager 란 ?
    ====================================
    - 소개
    Oracle 8 은 새로운 backup와 recovery 방법인 Recovery manager 를 제공한다.
    Recovery manager(이하 RMAN) 는 backup,restore,recover process를 관리하는
    tool 이다. Oracle Enterprise Manager 를 통해 GUI mode 로 가능하고,
    rman 이라는 command line interface 를 함께 제공한다.
    특히, OS device control 기능이 보완 되었기 때문에, 현재 backup catalog 를
    유지하고, 이 정보를 이용해 OS level 에서 file 을 auto-restore 해 주기
    때문에, database recovery 전에 file 을 manual 하게 restore 할 필요가
    없어졌다.
    Incremental backup 을 제공하고, backup 이나 restore 중에 current block
    detection 을 해 주며(v$backup_corruption, v$copy_corruption 또는 alert
    log 에 report), Rman 작업시에 parallelization 을 제공하며, open database
    backup 동안 특별한 redo 를 발생하지 않는다.
    - 구조
    Recovery               
    manager in OEM(oracle          
              enterprise      ---> Database
              manager) <---     (catalog)          
    or RMAN
         /| |
         | |/
    DATABASE     ---> OS
    (target to backup) <--- Device
    - 구성 요소 설명
    1) recovery manager
    Command 를 해석하고, backup, restore, recover 를 실행하기 위해 target
    database 로 command 를 전달한다. recovery catalog 를 update 한다. 실행
    과정을 조정, 모니터링 한다.
    2) Target database
    backup,restore,recovery action 이 수행될 데이타베이스
    3) Recovery Catalog
    Information 저장장소. 즉, target database 의 물리적 스키마, datafile 과
    archivelog 의 backup sets 과 pieces, backup script 등을 포함하고 있음.
    rman 작업시 recovery catalog 정보를 이용한다.
    4) channel
    allocation channel 은 target database 의 backup,restore,recover 에 대한
    server process 초기화를 한다. 즉, 이 channel 은 disk 를 포함 기타 OS
    device 를 지정하게 되며, 이 갯수에 따라 parallelization 의 degree 가 결정
    된다.
    - recovery catalog 를 사용할 것인지를 결정하기
    catalog 없이 RMAN 을 사용할 때의 단점은 recovery catalog 의 overhead 가
    없는 대신, Point-In-Time recovery 를 쉽게 할 수 없다. 또한, control file
    손상시에 recovery 할 수 없고, stored script 를 사용할 수 없다.
    (datafile 이 20개 이상일 경우에는 recovery catalog 사용을 권장한다.)
    - Setup
    가. Recovery catalog 생성
    1. Backup(target) db 외의 별도의 db 생성 (8.0.3 이상)
    2. catalog DB 에 분리된 tablespace 생성
    create tablespace rcvcat datafile '/oracle/rcvcat/rcvcat01.dbf'
    size 20 M;
    3. catalog 의 owner 생성과 권한부여
         create user rman identified by rman
         temporary tablespace temp
         default tablespace rcvcat;
         grant dba,connect,resource,recovery_catalog_owner to rman;
    4. catalog 저장에 필요한 object 생성
         cd $ORACLE_HOME/rdbms/admin
         sqlplus rman/rman
         @catrman
    나. Recovery manager 기동
    1. recovery catalog DB 를 사용하는 경우
    rman target \"system/manager\" rcvcat \"rman/rman@orabeta1\"
    (orabeta1 은 catalog DB 로 접속하는 tnsname 입니다.
    즉, sqlplus rman/rman@orabeta1 하면, catalog db 와 접속되어야 합니다.)
    2. recovery catalog DB 를 사용하지 않는 경우
    rman target system/manager@target nocatalog
    위 경우 모두, target database 를 catalog 에 등록해야 한다.
    RMAN> register database;
    다. Backup 시작
    - Backup 은 database 가 open 또는 close(close 후에는 반드시 mount
    상태이어야 한다)
    - Backup 의 단위
         full database
         tablespace
         datafile
         control file
         archived logs
    - Backup 의 예
    --full database
    run { 
    allocate channel dev1 type disk;
    allocate channel dev2 type disk;
    backup full filesperset 2
    (database format '/user7/ora8/backup.%n_%p') ;
    release channel dev1;
    release channel dev2;
    -- tablespace
    run {
    allocate channel dev_1 type disk ;
    backup incremental level 0
    filesperset 1
    (tablespace system channel dev_1 format '/vol312/net8%d_%u');
    release channel dev_1;
    -- datafile
    run{ 
    allocate channel dev1 type disk;
    copy datafile "/vo3/orabeta6/backup/copy_tools.dbf"
    to "/vo3/orabeta6/oradata/orabeta6/tools01.dbf"
    tag "org_tools";
    release channel dev1;
    -- archived logs
    create script beta_arch_full { 
    allocate channel dev1 type disk;
    allocate channel dev2 type disk;
    backup full filesperset 10
    (archivelog all delete input
    format '/vo3/orabeta6/backup/beta_arch.%s_%p') ;
    release channel dev1;
    release channel dev2;
    -- backup to tape
    run {
    allocate channel t1 type 'sbt_tape';
    backup
    format 'dbfull_sunday_s%s_t%t'
    tag 'Sunday full backup'
    (database);
    라. Restore
    - Backup 으로 부터 원래 위치로 복원
    - Archive log file 은 manual 하게 restore 할 수도 있고, 필요하다면
    recovery 시 자동으로 restore 된다.
    restore (archivelog all| like <filename | <archivelog range>);
    - restore 명령
    database : restore (database);
    tablespace : restore (tablespace <name>,...,<name>);
    datafile : restore (datafile <name>,...,<name>);
    control file : restore control file to location;
    - recovery 시에 database 는 어떤 상태에 있어야 하는가 ?
    1) control file restore - not mount
         SVRMGRL> startup nomount
    2) whole database, or system tablespace - not open
         SVRMGRL> startup mount
    3) tablespace or datafile - open but tablespace or datafile offline
         SVRMGRL> alter tablespace user_data offline temporary;
         SVRMGRL> alter database datafile '/oracle/file/user_data1.dbf'           offline;
    마, Recovery
    - Recoervy 는 file restore 후의 과정이다.
    1) Archive log mode : complete recovery, incomplete recovery 가 가능하다     
    2) No archive log mode : consistent whole database backup 으로 부터
    restore 하는 것이 유일한 option 이다.
    - whole database recovery 의 예
    svrmgrl
    connect internal
    shutdown abort
    startup mount
    rman target \"system/manager\" rcvcat \"rman/rman@orabeta1\"
    run {
    allocate channel dev1 type disk;
    allocate channel dev2 type disk;
    restore database;
    recover database;
    release channel dev1;
    release channel dev2;
    or
    run {
    allocate channel dev1 type disk;
    allocate channel dev2 type disk;
    restore tablespace 'SYSTEM';
    restore tablespace 'USERS';
    recover tablespace 'SYSTEM';
    recover tablespace 'USERS';
    sql "alter database open ";
    release channel dev1;
    release channel dev2;
    - datafile 하나가 사용할 수 없을 경우의 recovery
    가정) full backup set 이 있을 경우
    ORA-01157: cannot identify data file 3 - file not found
    ORA-01110: data file 3: '/user7/ora8/oradata/ORA8/temp01.dbf'
    SVRMGR> startup mount
    rman target \"system/manager\" rcvcat \"rman/rman@orabeta1\"
    RMAN> run {
    allocate channel dev1 type disk;
    restore database;
    recover database;
    release channel dev1;
    };

    Check the TSM logs for errors, the error stack here doesn't show any useful information (only informational messages and an undefined exit code). This is an 8i problem, later releases transfer much better messages from the media management software.

  • Step By step guide to recover lost datafiles from RMAN

    Hi All
    I am new to RMAN recovery.
    I tried searching internet but I cannot find the detail steps for "How to restore datafile using RMAN when we have backup on tape and How to then apply archive logs" .
    Can anyone please explain the steps .
    I will really appreciate that.
    Thanks

    Thanks All I really appreciate your help :)
    So as far as I understand here is my scenario and here are the steps I will follow please correct me if I am wrong.
    I have last night backup of all datafiles and archivelog files on tape.
    I lost one of datafile in morning.
    Here are the steps I will perform to recover datafile
    Restore the backup(including archive files) from tape to OS directory.
    Mount the database
    RMAN> run{
    restore datafile 6;
    RMAN > recover datafile 6;
    RMAN> alter database open;
    The RMAN will apply all the archivelog file and datafile will be available again.
    I also have some additional question:
    1) do I have to take datafile offline?
    2) are these steps same for tablespace restore ? Do i have to take tablespace offline?
    3) How will I confirm if all the archivelogs were applied to data file and data is upto date?
    Thanks

Maybe you are looking for