Tablespace Backup

SQL> CREATE TABLESPACE RMANTBS
DATAFILE 'C:\Oracle10g\Ora10gdata\oradb\RMANTBS1.DBF' SIZE 10M
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTO;
RMAN> BACKUP TABLESPACE RMANTBS;
SQL> DROP TABLESPACE RMANTBS INCLUDING CONTENTS AND DATAFILES;.. Accidentally
How can we recover the tablespace..using the Tablespace backup
..But I can do a Incomplete Recovery successfully..
RMAN> run {
2> shutdown immediate;
3> startup mount;
4> sql " alter session set nls_date_format=''yy-mm-dd hh24:mi:ss'' ";
5> set until time '09-11-24 12:30:00';
6> restore database;
7> recover database;
8> alter database open resetlogs;
9> }
Edited by: Verma on Nov 24, 2009 10:28 AM

DROP TABLESPACE RMANTBS INCLUDING CONTENTS AND DATAFILES;..
Will cause the control file to be updated also.
So RMAN> SQL 'ALTER TABLESPACE RMANTBS OFFLINE';..
gives ERROR..
RMAN> SQL 'ALTER TABLESPACE RMANTBS OFFLINE';
sql statement: ALTER TABLESPACE RMANTBS OFFLINE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 11/25/2009 17:21:27
RMAN-11003: failure during parse/execution of SQL statement: ALTER TABLESPACE RMANTBS OFFLINE
ORA-00959: tablespace 'RMANTBS' does not exist..
So only if the physical file is corrupted your solution is Ok..which I know..
Or you have to go for point-in-time recovery..which was Ok

Similar Messages

  • Restoring a Rman Tablespace backup to noarchilog mode database

    Hi All,
    Is it possible to take a backup of a tablespace through rman from archivelog mode database and restore the same to noarchivelog mode database through rman ? Please suggest if it is not possible why it is not possible.
    We have a testing database from which a tablespace has been dropped. Can it be restored from the Prod database ?
    Please help. The database version is 9.2.0.8..

    Fabricio_Jorge wrote:
    I think it's possible to backup/restore a single tablespace:
    BACKUP TABLESPACE nome_tablespace [FORMAT 'path/bkp_file'];
    Being able to backup a single tablespace is NOT the same as grafting that TS into a different database.
    First, you are not really backing up a 'tablespace'. You are backing up files. In this case, just the files that implement the named TS, but files, nevertheless. And files belong to a database. Header info in each file defines, among other things, the dbid of the database the file belongs to. And the current scn. That will be a severe mis-match if you tried to 'restore' it to some other db.

  • Query: Tablespace backup Vs Full database backup

    Which is an better option- Tablespace Backup or Full database backup.What are the adv and disadv of each?
    Rgds,

    RMAN> backup tablespace users;
    Starting backup at 27-AUG-11
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00004 name=/u02/oradata/TEST/datafile/o1_mf_users_6o06qs2q_.dbf
    channel ORA_DISK_1: starting piece 1 at 27-AUG-11
    channel ORA_DISK_1: finished piece 1 at 27-AUG-11
    piece handle=/u02/fra/TEST/backupset/2011_08_27/o1_mf_nnndf_TAG20110827T163233_75l0015r_.bkp tag=TAG20110827T163233 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 27-AUG-11

  • 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

  • Can I plug in (restore) an RMAN tablespace backup into another DB ?

    11.2.0.3/AIX 6.1
    We accidently dropped a development DB without taking the latest expdp backup of an important schema. All the objects on this schema belonged to only one tablespace and we have the RMAN backup of that tablespace. Is there anyway we could recreate that schema by restoring the tablespace backup into another database ?

    Yes.
    Use the TRANSPORT TABLESPACE feature/method :
    http://oracle.su/docs/11g/backup.112/e10643/rcmsynta2021.htm
    Also check out sys.dbms_tts.transport_set_check
    RMAN> transport tablespace emp_data, emp_data2
               tablespace destination '/u01/app/oracle/oradata'
               auxiliary destination '/u04/app/oracle/oradata';If you need to check your endian format use this query :
    SELECT
      PLATFORM_NAME,
      ENDIAN_FORMAT
    FROM
      V$TRANSPORTABLE_PLATFORM;http://www.fadalti.com/oracle/database/how_to_transportable_tablespaces.htm
    http://husnusensoy.wordpress.com/2008/07/12/migrating-data-using-transportable-tablespacetts/
    Best Regards
    mseberg

  • UNDO Tablespace backup- RMAN

    Hi Team/champions,
    I am confused in RMAN full DB backup why UNDO tablespce is included even we include the archive logs also.
    in Short ?
    why UNDO tablespace backup is required while taking RMAN backup ?
    Regards,
    Shitesh Shukla

    if I dont want to include the UNDO tablespce in my backup
    what if I took only database files backup excluding TEMP n UNDONOT an option. You have to include UNDO. 11g has optimization for backing up an Undo tablespace.
    In 10gR2 what you could do is
    1. Create a New Undo Tablespace
    2. Switch to the new Undo Tablespace
    3. verify that the Old Undo Tablespace is no longer in use -- confirm that there are no active transactions in undo segments in it
    4. drop the old Undo tablespace
    5. Run your RMAN Backup
    You run the risks of
    a. Waiting a long time at step 3
    b. ORA-1555s for users after you drop the Undo tablespace in step 4.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Oracle8 Tablespace backup question

    [Sorry for posting in this "8iLite" forum. I couldn't seem to locate a better forum.]
    When I perform a hot OS tablespace backup in Oracle8, I know to perform the ALTER TABLESPACE <TS_NAME> BEGIN BACKUP command. And I also know that this command checkpoints the tablespace's datafiles.
    Question 1 of 2: Do I have to wait until the checkpoint is complete for a particular datafile until I can begin the OS file-copy?
    Question 2 of 2: If so, what Oracle8 view can I use to ascertain when the checkpoint is finished for each of the datafiles in the tablespace being backed up.
    Thanks!
    null

    [Sorry for posting in this "8iLite" forum. I couldn't seem to locate a better forum.]
    When I perform a hot OS tablespace backup in Oracle8, I know to perform the ALTER TABLESPACE <TS_NAME> BEGIN BACKUP command. And I also know that this command checkpoints the tablespace's datafiles.
    Question 1 of 2: Do I have to wait until the checkpoint is complete for a particular datafile until I can begin the OS file-copy?
    Question 2 of 2: If so, what Oracle8 view can I use to ascertain when the checkpoint is finished for each of the datafiles in the tablespace being backed up.
    Thanks!
    null

  • Restoring from RMAN tablespace backup ; Few questions

    11.2.0.3/RHEL 5.8
    We have a RAC DB which is used by more than 20 applications. One schema for each application and one tablespace for each schema.
    We have a schema with 130gb in size. All Objects in this schema use a single tablespace MCS_DATA.
    This weekend we are applying some changes involving DDL, Code and Data .Usually we take an expdp backup of the schema before the activity starts and later if something goes wrong with script deployment we'll revert to old state by dropping the schema and doing an impdp from the expdp backup.
    Question1.
    Can we do an RMAN tablespace only backup and if something goes wrong with script deployment can we drop the schema and the tablespace and then create an empty schema and then restore from the tablespace backup ?
    Question2.
    If the above is possible , can you explain how it is going to work out because we are essentially plugging (restore,recover) in a tablespace to the database. Any potential problems ?
    Question3. If the above (Question1) is possible, will restore/recover of this tablespace require a downtime for the entire DB ?

    Tom;
    If you are talking about RMAN TSPITR then yes you can. See - Purpose of RMAN TSPTIR in Backup and Recovery User's Guide E10642-03.
    The problem with TSPTIR is bulk. You need a lot of disk space to create a copy and then data pump the information out and back in. I just tested this on 11.2.0.3 and its slow. RMAN created a script which produced an AUX instance and did the data pump, but I had clean up afterwards. If it errors out you can have an AUX instance hanging out in the background.
    For TSPTIR you will need an area on the disk to server as an auxiliary destination large enough to hold what you are recovering plus the SYSTEM, UNDO and TEMP tablespaces.
    I would probably look at Transportable tablespaces as a possible option too.
    http://docs.oracle.com/cd/E25054_01/backup.1111/e10642/rcmttbsb.htm
    E10642-03 has a section for recovering a tablespace in chapter 2. The Tablespace must be offline, but the database can be up.
    This uses "restore tablespace" and "recover tablespace" commands. You would perform this type of recovery when you are say missing a datafile. You can recover any tablespace except SYSTEM and UNDO with this.
    Data Pump might be an option too, but given your tablespace size I would have worries about recovery time. Oracle lets you set compression
    and a limit to each file produced.
    expdp TABLESPACES=YOUR_DATA dumpfile=DATA_PUMP_DIR:ts_dumps_%U.dmp LOGFILE=DATA_PUMP_DIR:ts_dumps_log.log parallel=2 filesize=10G compression=ALL
    Given the size of your database a better option might be something like Data Guard as your recovery time would be brutal.
    Best Regards
    mseberg

  • Read Only Tablespace Backup Issue

    Hii!!
    I had been trying to to take Read Only Table space Backup. So, firstly changed the tablespace using
    SQL> alter tablespace users read only;
    Tablespace altered.
    2. Then took backup of all the data files using OS Copy command.
    Now , the issue i am facing is that can i change the table space to read_write mode???? If yes , then how?? , plz help...

    I had been trying to to take Read Only Table space Backup. So, firstly changed the tablespace using
    SQL> alter tablespace users read only;
    Tablespace altered.
    2. Then took backup of all the data files using OS Copy command.
    Now , the issue i am facing is that can i change the table space to read_write mode???? If yes , then how?? , plz help...Yes you can do,
    SQL> alter tablespace users read write;After successful restore,
    sys@11GDEMO> select tablespace_name,status from dba_tablespaces where tablespace_name='CKPT';
    TABLESPACE_NAME                STATUS
    CKPT                           ONLINE
    sys@11GDEMO> alter tablespace ckpt read only;
    Tablespace altered.
    sys@11GDEMO> select tablespace_name,status from dba_tablespaces where tablespace_name='CKPT';
    TABLESPACE_NAME                STATUS
    CKPT                           READ ONLY+
    sys@11GDEMO> alter tablespace ckpt read write;+
    Tablespace altered.
    sys@11GDEMO> select tablespace_name,status from dba_tablespaces where tablespace_name='CKPT';
    TABLESPACE_NAME                STATUS
    CKPT                           ONLINE+
    sys@11GDEMO>
    Edited by: CKPT on Jul 6, 2011 11:22 AM

  • Oracle 9i TEMP tablespace backup problem using RMAN!

    Oracle8/8i whole backup is ok for our backup software(using RMAN without RC database), but for Oracle 9i, I get following error messages when backing up temp tablespace.
    1. RMAN-20202: tablespace not found in the recovery catalog
    2. RMAN-06019: could not translate tablespace name "TEMP"
    I check some views of Oracle9i, and know some changes happen for temp tablespace in 9i, but how to deal with this problem. Any idea, please!

    In 9i RMAN does not restore temporary datafiles. Instead, you should create them after your restore. I believe that Oracle is going to make a change to this in the next release of 9i and have RMAN create the temporary files. You can view the temporary datafiles @ v$tempfile.
    I believe RMAN doesn't restore temporary files because they are locally managed and not in the control files. RMAN reads the controlfile of the target database to obtain info about backups, datafiles, etc.
    Hope this helps.

  • Single Tablespace Backup, Restore and Recovery

    Hi Experts,
    I need your kind help. Actually I want to take hot backup by RMAN for a particular TABLESPACE ..
    I know this is possible. My question is when I restore a tablespace to any other test database
    I need to create new database or I can restore it to any existing database? Just like adding new tablespace??
    To recover this tablespace I need to archive log backup ?
    How I can open the database on which I m going to restore/recover this particular tablespace ???
    Regards,
    Rizwan

    You cannot copy a tablespace from one database to another using the normal Backup/Restore methods.
    You have to use the TTS (Transportable Tablespace) methods.
    See http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/tspaces013.htm#ADMIN01101
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • RMAN throwing errors during Tablespace Backup - RMAN-06004 and RMAN-06019

    Hi All.
    Please help me to fix trail of error message I'm getting while trying backup of a newly added tablespace in database. I'm using RMAN as a recovery method.
    Tablespace Name: test
    DB Version: Oracle 10g R1.
    OS: Red Hat Linux 5
    RMAN> report schema;
    Report of database schema
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace RB segs Datafile Name
    1 490 SYSTEM YES /u01/app/oracle/oradata/qrcl/system01.dbf
    2 25 UNDOTBS1 YES /u01/app/oracle/oradata/qrcl/undotbs01.dbf
    3 270 SYSAUX NO /u01/app/oracle/oradata/qrcl/sysaux01.dbf
    4 23 USERS NO /u01/app/oracle/oradata/qrcl/users01.dbf
    5 40 TEST NO /u01/app/test01.dbf
    List of Temporary Files
    =======================
    File Size(MB) Tablespace Maxsize(MB) Tempfile Name
    1 20 TEMP 32767 /u01/app/oracle/oradata/qrcl/temp01.dbf
    RMAN>
    RMAN> backup tablespace "test";
    Starting backup at 22-AUG-12
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 08/22/2012 11:57:13
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20202: tablespace not found in the recovery catalog
    RMAN-06019: could not translate tablespace name "test"
    RMAN> restore tablespace test;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "test": expecting one of: "double-quoted-string, identifier, single-quoted-string"
    RMAN-01007: at line 1 column 20 file: standard input
    I tried to update Catalog Server but still no luck:
    RMAN> RESYNC CATALOG;
    starting full resync of recovery catalog
    full resync complete
    Please Assist.
    Thanks
    Prashant Dixit

    Hello Prashant;
    The main issue is your tablespace name is an RMAN Reserved Word "Test"
    http://docs.oracle.com/cd/B13789_01/server.101/b10770/rcmcomma.htm#1006728
    Different test
    -- Create the tablespace
    CREATE TABLESPACE OTN_TEST DATAFILE
      '/u01/oradata/RECOVER2/test01.dbf' SIZE 1M AUTOEXTEND OFF
    LOGGING
    ONLINE;-- Create a user for the tablespace
    CREATE USER RMAN_TEST
      IDENTIFIED BY RMAN_TEST
      DEFAULT TABLESPACE OTN_TEST
      TEMPORARY TABLESPACE TEMP
      PROFILE DEFAULT
      ACCOUNT UNLOCK;
    ALTER USER RMAN_TEST QUOTA UNLIMITED ON "OTN_TEST";  -- Create a table in the tablespace
    CREATE TABLE RMAN_TEST.EMP
      EMPNO     NUMBER,
      ENAME     VARCHAR2(30 BYTE),
      JOB       VARCHAR2(30 BYTE),
      MGR       NUMBER,
      HIREDATE  DATE,
      SAL       NUMBER,
      COMM      NUMBER,
      DEPTNO    NUMBER
    TABLESPACE OTN_TEST;-- Add some data
    SET DEFINE OFF;
    Insert into RMAN_TEST.EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (7369, 'SMITH', 'CLERK', 7902, TO_DATE('12/17/1980 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        800, 20, 0);
    Insert into RMAN_TEST.EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (5000, 'NOCATALOG', 'DBA', 77902, TO_DATE('04/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        200, 0, 0);
    COMMIT;-- start RMAN and backup tablespace
    RMAN> BACKUP TABLESPACE OTN_TEST;
    Starting backup at 22-AUG-12
    starting full resync of recovery catalog
    full resync complete
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00007 name=/u01/oradata/RECOVER2/test01.dbf
    channel ORA_DISK_1: starting piece 1 at 22-AUG-12
    channel ORA_DISK_1: finished piece 1 at 22-AUG-12
    piece handle=/u01/app/oracle/flash_recovery_area/RECOVER2/backupset/2012_08_22/o1_mf_nnndf_TAG20120822T080711_839pczng_.bkp tag=TAG20120822T080711 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 22-AUG-12
    Starting Control File and SPFILE Autobackup at 22-AUG-12
    piece handle=/u01/app/oracle/flash_recovery_area/RECOVER2/autobackup/2012_08_22/o1_mf_s_791971633_839pd1bm_.bkp comment=NONE
    Finished Control File and SPFILE Autobackup at 22-AUG-12
    Note
    If you dropped the tablespace then you need to recover the database to a point in time, not the tablespace.
    Best Regards
    mseberg

  • Tablespace backup list for recovery

    Hi,
    I plan to backup at tablesapce level instead of whole database. Other than the tablespaces used for the application, do I have to backup system and other tablespaces in 9i to guarantee recovery? The DB is on archivelog mode. Thanks.
    Tracy

    (Off forum answer)
    Tracy,
    Recovery does depend on what is it that you have lost wrt database. If you have lost some datafiles - due to disk corruption, then just bringing in those files is not helpful.
    You need to take a full backup of all files that constitute the database - control, data, redo).
    - Jojo

  • Offline Tablespace Backup?

    Please let me know how to take Backup of Offline Tablespace?
    I will be very thankful to all of you

    If the tablespace is already in offline mode, then just copy the datafiles of that tablespace to your backup destination. When ever you want to restore it, Just copy the datafiles of the tablespace to the location it is to be restored and then make it online. The checkpoint will start and it will synchronise all the datafile headers and controlfile with the CKPT info.
    Why would you require to backup an offline tablespace regularly? It just needs to be backed up once.
    Regards,
    Sanju

  • TABLESPACE BACKUP - Database crash

    Hello guys,
    i got a little question about "Online / Hot Backup" and a crashing instance.
    The following worst case happen:
    1) Alter Tablespace TABSP_USER01 in backup mode at 03:00 am
    2) There is a problem, while copying the datafiles and the backup modus for the tablespace TABSP_USER01 exists all the time
    3) Database crashes at 04:30 am and the tablespace TABSP_USER01 is still in backup mode
    4) While the whole online/hot backup was run, an archive log backup runs at 04:00 am and the saved archive log files are deleted from disk
    I know what happen to the datafiles while the "online backup". The SCN is frozen when the "backup modus" is set... and in the redo log files a complete block-image is written.
    All dirty blocks are written to the datafiles, while the "backup modus" is on, but the SCN is not updated.
    But my question is now:
    1) If i restart my crashed instance at 05:03 am .. are the archive logs needed for checking (which were already back upped and deleted) at a startup?
    2) Does Oracle verify the data in the redo/archive logs with the ones in the datafiles?
    3) Or does Oracle only set the actual SCNs to the header of the datafiles (the actual scn is get from the controlfile)?
    Thanks and Regards
    Stefan

    #1) If i restart my crashed instance at 05:03 am .. are the archive logs needed for checking (which were already back upped and deleted) at a startup? ##
    Yes it will ask for the recovery needed in the mount stage.you need to backup again...
    # 2) Does Oracle verify the data in the redo/archive logs with the ones in the datafiles? &3) Or does Oracle only set the actual SCNs to the header of the datafiles (the actual scn is get from the controlfile)? ###
    The asnwer is yes and no...It checks both header and information..
    Since it is asking for the recocvery it is understandable that it checks for header is not in synch and will apply all the changes...to make it synch.(.all the sequenced are captured in redo-log and archived logs.)
    kindly go through this document for clarifications..
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#i1007289
    Thanks
    -- Raman

Maybe you are looking for

  • Dsc 8.20 bug

    HI, there is an issue with DSC 8.20 and opc client (updated or not) that is bugging me. Make a new library with an opc client inside and deploying works. Change the name of the computer (restart the computer) and  when  I try  to deploy  a library  w

  • Can I install Windows Server 2012 r2 essentials over Windows 7 Pro

    I have new hardware that came with windows 7 pre-installed. It meets and exceeds hardware requirements. Can i install Windows Server 2012 R2 Essentials on this machine. What is the procedure? Any help would be grateful. Thanks Woodrow

  • Edit RSS and .xml in iweb on .mac

    I am desperately trying to find out how to edit my RSS and (.xml) file in iweb. I can get to the file if I publish my website to a folderr on my MAC, but this doesn't help me. I need to edit this file and let iweb publish it on my .mac podcast site.

  • Mods: Re Creative and conflicting statemen

    I'm an extremely annoyed X-Fi Fatality owner on Vista Ultimate 32bit.On XP this was a good, if not great, card, with good performance and features. It was used extensi'vely for recording and processing in Ableton Li've and Sonar, using the front pane

  • Any tool to change load command of Mac libraries

    I'm looking for a tool that can be used to remove dependency from a dylib. To be more specific, I have a.dylib which depends on b.dylib. So by using otool -L a.dylib I could see a depends on b. But I know a.dylib actually doesn't use b.dylib. So even