Restore tablespace from sbt_tape
Hi
by using list backup command I see that all the backups are in sbt_tape.
If I type
restore tablespace a;
Does ıt restore ıt dırectly from the tape into the database or do I have to take ıt from the sbt_tape manually on to the disk and restore ıt.
If you would have read the documentation (which, by default, and already for many months, you refuse to do), you would have noticed you need to configure a channel to the tape device, with proper parameters.
In that case you would have issued
restore tablespace ...
The other alternative doesn't exist, and shows that even after asking a plethora of doc questions, about RMAN, you still don't seem to understand anything of it.
Isn't it time you start reading those manuals?
Sybrand Bakker
Senior Oracle DBA
Similar Messages
-
Hi everyone.
Im using a 11.0.6.0 database running on RHEL 5.
i have a full backup every saturday, and everyday a backup of archivelogs.
Could i restore a tablespace from 2 days ago with rman or i only can restore it from last saturday? how?
if i had 2 full backup, how to choose from wich one i want restore the tablespace?
Thanks in advance
Edited by: user13748341 on 14-jun-2011 6:52user13748341 wrote:
Hi everyone.
Im using a 11.0.6.0 database running on RHEL 5.I don't think so. Where did you find an 11.ZERO? Oracle's first release at 11 was 11.1
>
i have a full backup every saturday, and everyday a backup of archivelogs.
Could i restore a tablespace from 2 days ago with rman or i only can restore it from last saturday? how?
if i had 2 full backup, how to choose from wich one i want restore the tablespace?
Thanks in advance
Edited by: user13748341 on 14-jun-2011 6:52You RESTORE the files from the backup of those files
You RECOVER the files to a point in time from the archivelogs since the backup from which you restored.
Go to tahiti.oracle.com and spend some time in the Backup and Recovery manuals to get clear on the concept of "backup", "recover", and "restore". -
How to restore tablespace from backup
Dear all,
I need to restore my deleted tablespace from its backup. I backuped that tablespace with RMAN without catalog option. I connected the RMAN by the following way.
/home/oracle/db/bin/rman target / nocatalog
When I restoring the tablespace the following error occurs:
RMAN> run {
2> allocate channel ch1 type disk format '/disk6/backup/tek_backup/tek_bak1101';
3> restore tablespace tek_data;
4> }
Starting restore at 12-NOV-07
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/12/2007 17:13:48
RMAN-20202: tablespace not found in the recovery catalog
RMAN-06019: could not translate tablespace name "tek_data"
Please helpHere I am posting what I have done. Now I have the backuped tablespace by RMAN. I tried to restore it but couldn't.
Please help
##### 1. create tablespace & insert some data to it.
[oracle@localhost ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 12 19:14:50 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> CREATE SMALLFILE TABLESPACE "TS07" DATAFILE '/disk6/TS07_1' SIZE 100M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
Tablespace created.
SQL> create table MBS200710_1 tablespace TS07 as SELECT * FROM mediator.MBS200710 WHERE M105 = 3
2 ;
Table created.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
##### 2. backup TS07 with RMAN
[oracle@localhost ~]$ /home/oracle/db/bin/rman target / nocatalog
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Nov 12 19:19:38 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: UCCS (DBID=1480994533)
using target database control file instead of recovery catalog
RMAN> run {
2> allocate channel c1 device type disk;
3> set command id to 'BBBackup';
4> configure backup optimization on;
5> sql "alter tablespace TS07 offline normal";
6> backup format '/disk6/backup/TS07_bak_%T_%U'
7> (tablespace TS07);
8> release channel c1;
9> sql "alter tablespace TS07 online";
10> }
allocated channel: c1
channel c1: sid=136 devtype=DISK
executing command: SET COMMAND ID
old RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
sql statement: alter tablespace TS07 offline normal
Starting backup at 12-NOV-07
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00052 name=/disk6/TS07_1
channel c1: starting piece 1 at 12-NOV-07
channel c1: finished piece 1 at 12-NOV-07
piece handle=/disk6/backup/TS07_bak_20071112_0uj0srn6_1_1 tag=TAG20071112T193502 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 12-NOV-07
Starting Control File and SPFILE Autobackup at 12-NOV-07
piece handle=/disk6/backup/controlfile/c-1480994533-20071112-05 comment=NONE
Finished Control File and SPFILE Autobackup at 12-NOV-07
released channel: c1
sql statement: alter tablespace TS07 online
RMAN> quit
Recovery Manager complete.
##### 3. drop tablespace including data files
[oracle@localhost ~]$
[oracle@localhost ~]$
[oracle@localhost ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 12 19:37:38 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> drop tablespace TS07 including contents and datafiles;
Tablespace dropped.
SQL> commit;
Commit complete.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
#####4. restore deleted tablespace from backup
[oracle@localhost ~]$ /home/oracle/db/bin/rman nocatalog target /
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Nov 12 19:39:59 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: UCCS (DBID=1480994533)
using target database control file instead of recovery catalog
RMAN> run {
2> allocate channel c1 type disk format '/disk6/backup/TS07_bak_20071112_0uj0srn6_1_1';
3> restore tablespace TS07;
4> release channel c1;
5> }
allocated channel: c1
channel c1: sid=76 devtype=DISK
Starting restore at 12-NOV-07
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/12/2007 19:41:48
RMAN-20202: tablespace not found in the recovery catalog
RMAN-06019: could not translate tablespace name "TS07" -
Partial Restoration of Tablespace from RAC instance to non-RAC instance
when i am trying to restore tablespace from RAC environment to Non-RAC i got below error in my log
channel aux1: starting datafile backup set restore
channel aux1: restoring control file
channel aux1: reading from backup piece c-1840232663-20110405-01
channel aux1: ORA-19870: error while restoring backup piece c-1840232663-20110405-01
ORA-19507: failed to retrieve sequential file, handle="c-1840232663-20110405-01", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
sbtrestore: Job[0] thread[18841]: InitializeCLRestore() failed.
kindly revert,
Thanks & Regards,
MJI am not sure what you mean by "OS replication".
Whether you use RAC or a Failover Cluster, the database has to be on Shared Storage (which requires no "replication").
RAC licence costs are higher than that for a Failover Cluster because both instances have to licenced and the RAC option has to be purchased.
Of course, if the two nodes together are limited to 4 CPUs, you could consider Standard Edition to reduce the licencing costs.
DBA skills requirements are also higher for RAC.
With respect to your question "...will be sufficient for the avaialability purposes" it really depends on what your requirements are. People use RAC for Avaialability when it really is better positioned for Scalability. If you want only availability and can afford a few minutes downtime, and each node in the cluster can individually handle the user/batch loads, a Failover Cluster would suffice.
I suggest that you raise this question in the "Database - General" forum : General Database Discussions
or the "Real Application Clusters" forum : Real Application Clusters
"Replication" is the wrong forum for such a question.
When you do re-raise your question, please clarify your understinding of "OS replication".
Hemant K Chitale
Hemant K Chitale -
Restore a single tablespace from full backup erroring out
Hi,
I have backed up the full database using RMAN:
$ rman catalog rman/rman@catdb target /
RMAN> run {
backup as compressed backupset
format '<Full Path>/databkp/DATA_%d_%s_%p'
database
plus archivelog format '<Full Path>/arcbkp/ARC_%d_%s_%p';
Backup was successful.
Now dropped the tablespaces:
SQL> alter tablespace rtestusr offline;
SQL> drop tablespace RTESTUSR including contents and datafiles;
Now trying to restore the tablespace RTESTUSR
$ rman catalog rman/rman@catdb target /
RMAN> restore tablespace rtestusr;
Starting restore at 25-FEB-11
starting full resync of recovery catalog
full resync complete
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/25/2011 14:28:47
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20202: tablespace not found in the recovery catalog
RMAN-06019: could not translate tablespace name "RTESTUSR"
Also performed the Tablespace Point-in-time recovery:
RMAN> run {
2> set until time "to_date('2011-02-25:12:44:00','yyyy-mm-dd:hh24:mi:ss')";
3> restore tablespace RTESTUSR;
4> }
executing command: SET until clause
Starting restore at 25-FEB-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=46 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=45 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=44 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00006 to /dev2db/rmantst/db/oradata/rtest/rtestusr01.dbf
channel ORA_DISK_1: reading from backup piece /dev2db/rmantst/archrtst/databkp/DATA_RTEST_76_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/dev2db/rmantst/archrtst/databkp/DATA_RTEST_76_1 tag=TAG20110225T114341
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/25/2011 15:07:42
ORA-19654: must use backup control file to switch file incarnations
Please help.
Thanks in advance.
Regards,
BikramI think you misunderstand some concepts.
1) drop tablespace RTESTUSR including contents and datafiles;
is a valid command, it removes the named tablespace from the database. There's nothing wrong with the database (although it may be a logical (human) error). Restore/recovery is used to repair media failures. RMAN is right: 'RMAN-06019: could not translate tablespace name "RTESTUSR"', since there's no such tablespace in the actual database, the restore/recover process fails.
2) Unfortunately you hide your database version. Up to 10gR2 tablespace point-in-time recovery cannot be used to recover dropped tablespaces, in 11gR1 and higher it's possible.
And - TSPITR - requires a little bit more than 'set until ...'. Refer to the doumentation for your unknown database version.
Werner -
Restoring only the tablespace from the database
How do we restore only a 'tablespace' from a Terabyte database without restoring the entire database.
ie... if a particular tablespace has been dropped from the database and we have the backup available for the database.
So, how do we go about it for restoring only that tablespace.
Version:10.2.0.4
OS : solaris 10
Edited by: user13364377 on Sep 29, 2010 3:49 AM
Edited by: user13364377 on Sep 29, 2010 3:51 AMIf you have a RMAN backup before dropping the tablespace then we can restore the tablespace by below method
It is a tablespace point in time recovery ,here we need to create a auxillary DB.
Recover a table/tablespace from Rman backup on same server:
===============================================
Here we have to create the auxillary database.
1.u should have valid backup of the database before dropping the tablespace.
2.create the password file of target database.
orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
3.Take backup of the control file to trace for creating the new control file for new
auxillary database/
SQL> alter database backup controlfile to trace;
sample control file:
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "aux1" RESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 454
LOGFILE
GROUP 1 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO01.LOG' SIZE 10M,//make sure here to change the location of of redo
GROUP 2 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO02.LOG' SIZE 10M, logs to new location or change the location name before
GROUP 3 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO03.LOG' SIZE 10M //starating the database at the end.
-- STANDBY LOGFILE
DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSTEM01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\UNDOTBS01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSAUX01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS02.DBF'
CHARACTER SET WE8MSWIN1252
4.create the password file of auxillary database.
orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
5.create the control file
sqlplus "/as sysdba"
SQL>@create.sql
6 catalog all the backuppiece to the newly created database;
catalog backuppiece 'D:\oracle\product\10.1.0\LOG_707656915_50P1';
7.We have to restore system,sysaux,undo and the tablespace which was dropped
run
set newname for datafile 1 to 'D:\oracle\product\10.1.0\oradata\aux1\system01.dbf';
set newname for datafile 2 to 'D:\oracle\product\10.1.0\oradata\aux1\undotbs01.dbf';
set newname for datafile 5 to 'D:\oracle\product\10.1.0\oradata\aux1\users02.dbf';
set newname for datafile 3 to 'D:\oracle\product\10.1.0\oradata\aux1\sysaux01.dbf';
set newname for datafile 4 to 'D:\oracle\product\10.1.0\oradata\aux1\users01.dbf';
restore tablespace SYSTEM;
restore tablespace UNDOTBS1;
restore tablespace users;
restore tablespace sysaux;
switch datafile all;
8.Take the other tablespace offline
sqlplus>alter tablespace tablespace_name offline drop;
9.recover the database prior to the time when tha table/tablespace was dropped.
RMAN> run{
2> set until time "to_date('07-01-2010 14:00:00','dd-mm-yyyy hh24:mi:ss')";
3> recover database;
4> }
10.open the database in resetlog mode.
take a transpotable tablespace backup of that tablespace and import it on the database where you dropped it. -
Backup/restore tablespaces in noarchivelog mode
In our office there is a oracle 10g box that's used for testing purposes.
It's only got 1 database, but each user has their own tablespace.
As it's not a 'live' box, archivelog and flashrecovery have been disabled by the dba probably in favour of speed.
I have a NUnit test suit that runs across a tablespace, and I am trying to restore the tablespace before each run.
In noarchivelog mode, RMAN allows me to take the tablespace offline, and create a backup - so far so good.
Later on, I am able to take the tablespace offline again, and issue a "RESTORE TABLESPACE" command.
But then I cannot bring the tablespace online without issuing a "RECOVER" command.
I have tried the NOREDO option but it still says that the file needs a media recovery before it can be brought online.
Is there a way to bring the tablespace online without applying the REDO logs ?
Or is tablespace backup/restore not possible because of noarchivelog ?
Thanks.I tried the TTS method, and it was only marginally quicker than a data_only impdp.
I suspect this is due to the nature of a fresh nunit test database, where the metadata (huge tables structure, stored proc, etc) is often larger than the table contents itself.
In the grand scheme of things it might even end up slower, as i need to drop the tablespace including contents if i want to use TTS to load up the backed up dbf.
From the comments I'm guessing that there's no way of just updating the timestamp of the tablespace without applying the REDO logs then ?
I've tested other methods as well.
Flash recovery could only work on a table or db level, I can't take the db offline as there are other users on it with their own tablespace/schemas. (it was an old dev's box, we're reusing what we can)
impdb with the truncate and data_only flag seems to be the only viable option so far, with TTS up for consideration. -
Migrating SYSTEM tablespace from DMTS to LMTS in Oracle 9.2.0.7
Migrating SYSTEM tablespace from DMTS to LMTS in Oracle 9.2.0.7 using
brspace -f dbcreate
SAP version: 4.6C
Oracle: 9.2.0.7
OS: AIX 5.3
BRTools: 6.40(42) /** 6.40(10) or (12) will be sufficient according to SAP ***/
IMPORTANT ***************************************
MUST DO:
1. Create a Full Backup of your system
2. Test your Restore and recovery of your backup.
3. Have a copy of all your tablespaces names on hand
4. Know your SYS and SYSTEM passwords
5. Run CheckDB in DB13 to ensure it is completed successfully with no warnings. This reduce the chance of hitting errors in the process
6. Ensure your UNDO tablespace is big enough
7. OSS 400241 Problems with ops$ or sapr3 connect to Oracle
NOTE: OSS 706625(Read this note)
The migration from a dictionary-managed SYSTEM tablespace to a locally-managed tablespace using the PL/SQL procedure DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL is not supported in the SAP environment.
In UNIX, logon as ora<sid>
run command: brspace -f dbcreate
This command will triggers a Menu. The are seven(7) steps to complete the whole process. Do them in sequence, from step 1 to step 7 faithfully. In Step 1, ensure that your settings of PSAPTEMP, PSAPUNDO etc details such as filenames are correct. The rest I leave it as default and they are fine. Do not change redo log group from 8 to 4 even if you only have 4 redo groups. If not, you might need to restore the system! If the seven steps are complete without errors(warnings is acceptable), congrats. Perform a backup again.
Problems I encountered that caused me to restore system:
1./ Problem: I changed the redo group from 8 to 4 and in the later stage after the tablespaces and files are dropped, the system prompted me that 4 is not acceptable! I can't go back then so a restore is performed.
Solution: Leave the default value 8 as it is
2./ I was using wireless network and the network breaks thus process breaks.
Solution: This process in user-interactive and requires you to input confirmation along the way so do it using LAN.
3./ In the process of dropping tablespace PSAP<SID>, I encountered:
BR0301E SQL error -604 at location BrTspDrop-2
ORA-00601: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 22 with name '_SYSSMU22$" too small
Solution: I have not fixed this yet but I think it is because my PSAPUNDO is too small(800M) so I will increase it to a bigger value e.g. 5GB
4. Problem: Unable to start sap after successfully migrated. OPS$user problem
Solution: logon as <sid>adm, run R3trans -x in a directory that <sid>adm has read/write permission. R3trans -x will creates a file call trans.log. Read the details and refer to OSS 400241
Result: I have successfully performed this on one(1) system and doing this on the another one currently but encounter Problem 3. Will update this further if there are more findings.
REFERENCE:
OSS 748434 New BRSPACE function "dbcreate" - recreate database
OSS 646681 Reorganizing tables with BRSPACE
OSS 541538 FAX: Reorganizations
Message was edited by:
Annie Chan
Message was edited by:
Annie Chan
Message was edited by:
Annie ChanThe current one I am implementing is a development system. The database is less than 100GB. 800MB of PSAPUNDO is sufficient for our development usage.
Follow up on Problem 3:
I created another undo tablespace PSAPUNDO2(undodata.dbf) with size of 5GB. I switched undo tablespace to PSAPUNDO2 and placed PSAPUNDO(undo.data1) offline. With PSAPUNDO2 online and PSAPUNDO offline, I started brspace -f dbcreate and encountered the error below at Step 2 Export User tablespace:
BR0301E SQL error -376 at location BrStattabCreate-3
ORA-00376: file 17 cannot be read at this time
ORA-01110: data file 17: '/oracle/DVT/sapdata1/undo_1/undo.data1'
ORA-06512: at 'SYS.DBMS_STATS", line 5317
ORA-06512: at line 1
I aborted the process and verified that SAP is able to run with this settings. I started CheckDB in DB13 and it shows me these messages:
BR0301W SQL error -376 at location brc_dblog_open-5
ORA-00376: file 17 cannot be read at this time
ORA-01110: data file 17: '/oracle/DEV/sapdata1/undo_1/undo.data1'
BR0324W Insertion of database log header failed
I don't understand then. I have already switched the undo tablespace from PSAPUNDO to PSAPUNDO2. Why the message above still appears? Once I put PSAPUNDO online, CheckDB completes successfully without warning.
I did show parameter undo_tablespace and the result is PSAPUNDO2(5GB).
So exactly, what's going on? Can anyone advise?
===============================================
I have managed to clear the message in DB13 after dropping PSAPUNDO tablespace including contents and datafiles. This is mentioned is OSS note 600141 pg 8 as below:
Note: You cannot just set the old rollback-tablespace PSAPROLL to offline instead of deleting it properly. This results in ORA-00376 in connection with ORA-01110 error messages. PSAPROLL must remain ONLINE until it is deleted. (Oracle bug 3635653)
Message was edited by:
Annie Chan -
Restore controlfile from tape backup without autobackup setting on
I am testing a scenraio of restoring control file if we loose all control files.
My RMAN settings for CONTROLFILE AUTOBACKUP is OFF. But, I have taken a backup of controlfile using 'BACKUP CURRENT CONTROL FILE' .
When I tried to restore control file. I am receiving following error:
RMAN> run {
2> allocate channel c101 type sbt_tape;
3> restore controlfile ;
4> }
allocated channel: c101
channel c101: sid=153 devtype=SBT_TAPE
channel c101: VERITAS NetBackup for Oracle - Release 6.0 (2006110304)
Starting restore at 24-MAY-2007 13:44:59
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/24/2007 13:44:59
RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP
My question is, How can I restore control file from tape backup without CONTROLFILE AUTOBACKUP setting ON.
It sounds like, There is no way we can restore control file from tape backup if you've not set the CONTROLFILE AUTOBACKUP is ON.
Please adviceWhen all controlfiles are lost and a recovery catalog is NOT used, RMAN has no information , where to find the controlfile backup. It's not enough to specify the channel, such a channel could hold many different backups from many different databases. You have tell , which database and which backupset. Modify your run block:
SET DBID <DBID of the database,for which you want to restore the controlfile>;
RESTORE CONTROLFILE FROM <name_of_backupiece_which_contains_the_controlfile backup>';
Werner -
Need immediately script for Restore Datafiles from TAPE Please.
Hi All,
Could you please provide me the script to restore 10 datafiles using RMAN which are stored on tape.Hi!
1. Restore the whole database:
run {
allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
restore database;
release channel t1;
2. Restore a tablespace: (In the Example the USERS tablespace will be restored)
run {
allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
restore tablespace users;
release channel t1;
3. Restore a datafile: (In the example teh datafile number 5 will be restored)
run {
allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
restore datafile 5;
release channel t1;
In the above examples:
- you need to change the location of your TDPO config file.
- the database/tablespace/datafile will be only restored and not will be recovered
Best Regards
Norbert -
FOR EXPERTS!! How to restore controlfile from tape using TSM??
Hi ,
I have a backup of my database (controlfiles, datafiles and archives) on tapes (TSM).
I'm doing some tests and i delete all my controlfiles.
Now i'm trying to restore the control file using the following:
RMAN>set DBID=1489198124;
RMAN>run{
allocate channel t1 device type sbt_tape parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_capdb15p.opt)';
restore controlfile from autobackup;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/10/2007 16:25:30
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
The autobackup is OFF now (i will put this ON later and become a production enviroment).
How can i get the controlfile backup from tape. I have this backup on tape made by RMAN using TIVOLI STORAGE MANAGER.
Tks,
Paulo.This is the command:
run {
allocate channel t1 device type sbt_tape parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_capdb15p.opt)';
backup current controlfile;
This is my backups!!!
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
5234 Incr 0 7.25M SBT_TAPE 00:00:06 10-MAY-07
BP Key: 5236 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_02ihckld_1_1 Media: 35240
Control File Included: Ckp SCN: 215589 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5254 Incr 1 7.25M SBT_TAPE 00:00:04 10-MAY-07
BP Key: 5260 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_05ihcksm_1_1 Media: 35240
Control File Included: Ckp SCN: 215769 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5315 Incr 0 7.25M SBT_TAPE 00:00:05 10-MAY-07
BP Key: 5327 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_0aihcld9_1_1 Media: 35212
Control File Included: Ckp SCN: 216284 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5454 Incr 0 7.25M SBT_TAPE 00:00:04 10-MAY-07
BP Key: 5459 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_0gihcmjn_1_1 Media: 35240
Control File Included: Ckp SCN: 217433 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5553 Incr 0 7.11M DISK 00:00:01 10-MAY-07
BP Key: 5556 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Piece Name: /oracle/product/10.2.0/db/dbs/BKP_HOT_SEMANAL_0nihcv0m_1_1
Control File Included: Ckp SCN: 260191 Ckp time: 10-MAY-07 -
Unable to restore TABLESPACE using RMAN backups
Hi,
I am not able to restore tablespace using RMAN (TSPITR).
I have full backup of database,
While try to restore it's failed.
RMAN> recover tablespace TEST1 until logseq 706 auxiliary destination '/tmp';
Starting recover at 16-OCT-13
using channel ORA_DISK_1
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS2
Creating automatic instance, with SID='CsFz'
initialization parameters used for automatic instance:
db_name=TRAINEE
db_unique_name=CsFz_tspitr_TRAINEE
compatible=11.2.0.0.0
db_block_size=8192
db_files=200
sga_target=280M
processes=50
db_create_file_dest=/tmp
log_archive_dest_1='location=/tmp'
#No auxiliary parameter file used
starting up automatic instance TRAINEE
Oracle instance started
Total System Global Area 292933632 bytes
Fixed Size 1336092 bytes
Variable Size 100666596 bytes
Database Buffers 184549376 bytes
Redo Buffers 6381568 bytes
Automatic instance created
List of tablespaces that have been dropped from the target database:
Tablespace TEST1
contents of Memory Script:
# set requested point in time
set until logseq 706 thread 1;
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
executing Memory Script
executing command: SET until clause
Starting restore at 16-OCT-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=81 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /oracle/product/11.2.0/dbhome_1/dbs/c-332232391-20131016-09
channel ORA_AUX_DISK_1: piece handle=/oracle/product/11.2.0/dbhome_1/dbs/c-332232391-20131016-09 tag=TAG20131016T144951
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/tmp/TRAINEE/controlfile/o1_mf_95wbkpvj_.ctl
Finished restore at 16-OCT-13
sql statement: alter database mount clone database
sql statement: alter system archive log current
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
contents of Memory Script:
# set requested point in time
set until logseq 706 thread 1;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 7 to new;
set newname for clone datafile 2 to new;
set newname for clone tempfile 1 to new;
set newname for datafile 6 to
"/oracle/oradata/TRAINEE/datafile/o1_mf_test1_95w9fln9_.dbf";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 7, 2, 6;
switch clone datafile all;
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /tmp/TRAINEE/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 16-OCT-13
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /tmp/TRAINEE/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00007 to /tmp/TRAINEE/datafile/o1_mf_undotbs2_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /tmp/TRAINEE/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /oracle/oradata/TRAINEE/datafile/o1_mf_test1_95w9fln9_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /tmp/1iomi9rv_1_1
channel ORA_AUX_DISK_1: piece handle=/tmp/1iomi9rv_1_1 tag=TAG20131016T144935
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 16-OCT-13
datafile 1 switched to datafile copy
input datafile copy RECID=11 STAMP=828975325 file name=/tmp/TRAINEE/datafile/o1_mf_system_95wbkybb_.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=12 STAMP=828975325 file name=/tmp/TRAINEE/datafile/o1_mf_undotbs2_95wbkycy_.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=13 STAMP=828975325 file name=/tmp/TRAINEE/datafile/o1_mf_sysaux_95wbkybz_.dbf
contents of Memory Script:
# set requested point in time
set until logseq 706 thread 1;
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 7 online";
sql clone "alter database datafile 2 online";
sql clone "alter database datafile 6 online";
# recover and open resetlogs
recover clone database tablespace "TEST1", "SYSTEM", "UNDOTBS2", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 1 online
sql statement: alter database datafile 7 online
sql statement: alter database datafile 2 online
sql statement: alter database datafile 6 online
Starting recover at 16-OCT-13
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 702 is already on disk as file /oracle/product/11.2.0/dbhome_1/dbs/arch1_702_807275402.dbf
archived log for thread 1 with sequence 703 is already on disk as file /oracle/product/11.2.0/dbhome_1/dbs/arch1_703_807275402.dbf
archived log for thread 1 with sequence 704 is already on disk as file /oracle/product/11.2.0/dbhome_1/dbs/arch1_704_807275402.dbf
archived log for thread 1 with sequence 705 is already on disk as file /oracle/product/11.2.0/dbhome_1/dbs/arch1_705_807275402.dbf
archived log file name=/oracle/product/11.2.0/dbhome_1/dbs/arch1_702_807275402.dbf thread=1 sequence=702
archived log file name=/oracle/product/11.2.0/dbhome_1/dbs/arch1_703_807275402.dbf thread=1 sequence=703
archived log file name=/oracle/product/11.2.0/dbhome_1/dbs/arch1_704_807275402.dbf thread=1 sequence=704
archived log file name=/oracle/product/11.2.0/dbhome_1/dbs/arch1_705_807275402.dbf thread=1 sequence=705
media recovery complete, elapsed time: 00:00:01
Finished recover at 16-OCT-13
database opened
contents of Memory Script:
# make read only the tablespace that will be exported
sql clone 'alter tablespace TEST1 read only';
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/tmp''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/tmp''";
executing Memory Script
sql statement: alter tablespace TEST1 read only
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/tmp''
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/tmp''
Performing export of metadata...
EXPDP> Starting "SYS"."TSPITR_EXP_CsFz":
EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
EXPDP> Master table "SYS"."TSPITR_EXP_CsFz" successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_CsFz is:
EXPDP> /tmp/tspitr_CsFz_17454.dmp
EXPDP> ******************************************************************************
EXPDP> Datafiles required for transportable tablespace TEST1:
EXPDP> /tmp/TRAINEE/datafile/o1_mf_test1_95wbkyck_.dbf
EXPDP> Job "SYS"."TSPITR_EXP_CsFz" successfully completed at 14:56:02
Export completed
contents of Memory Script:
# shutdown clone before import
shutdown clone immediate
executing Memory Script
database closed
database dismounted
Oracle instance shut down
Performing import of metadata...
IMPDP> Master table "SYS"."TSPITR_IMP_CsFz" successfully loaded/unloaded
IMPDP> Starting "SYS"."TSPITR_IMP_CsFz":
IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Removing automatic instance
Automatic instance removed
auxiliary instance file /tmp/TRAINEE/datafile/o1_mf_temp_95wblk08_.tmp deleted
auxiliary instance file /tmp/TRAINEE/onlinelog/o1_mf_3_95wblj14_.log deleted
auxiliary instance file /tmp/TRAINEE/onlinelog/o1_mf_2_95wblhn8_.log deleted
auxiliary instance file /tmp/TRAINEE/onlinelog/o1_mf_1_95wblh8q_.log deleted
auxiliary instance file /tmp/TRAINEE/datafile/o1_mf_sysaux_95wbkybz_.dbf deleted
auxiliary instance file /tmp/TRAINEE/datafile/o1_mf_undotbs2_95wbkycy_.dbf deleted
auxiliary instance file /tmp/TRAINEE/datafile/o1_mf_system_95wbkybb_.dbf deleted
auxiliary instance file /tmp/TRAINEE/controlfile/o1_mf_95wbkpvj_.ctl deleted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 10/16/2013 14:56:16
RMAN-06963: Error received during import of metadata
RMAN-06961: IMPDP> ORA-39123: Data Pump transportable tablespace job aborted
ORA-01565: error in identifying file '/oracle/oradata/TRAINEE/datafile/o1_mf_test1_95w9fln9_.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3Hi,
Cloud you please cheek below link:
ORACLE Cookies: TSPITR to recover a dropped tablespace
Thank you -
Restore Tablespace incremental backup is not work as after reimage oracle
TheTablespace incremental backup Restore is not work as after reimage the oracle database or restore tablespace in standby machine(another machine) is not working .its working in the same machine without reimage .after reimage not working please clarify me ,
I need the solution as soon as please reply as soon as .
Commnads used:
This is the step is followed but i am getting backup or control file not found error.Its works i the application server is not reimaged ;
please give your valuable suggestion .
Product Used:oracle 11g in linux environmnet
1)Before taking backup get SCN number for restore.
Command applied: Select current_scn from v$database;
2)running Full backup of database
Command applied:
configure controlfile autobackup on;
backup database plus archivelog;
CROSSCHECK BACKUP;
exit;
3)Running level 0 incremental backup
Before taking backup get SCN number for restore.
Command applied:
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 0 TAG ='WEEKLY' TABLESPACE TEST;
exit;
3) Running level 1 incremental backup
Before taking backup get SCN number for restore.
Command applied:
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 1 TAG ='DAILY' TABLESPACE TEST;
4)Before Restore(TSPITR) following procedure are applied under sysdba privilege
Command applied:
SQL 'exec dbms_backup_restore.manageauxinstance ('TSPITR',1)';
5)TSPITR Restore command
Command applied:
run
RECOVER TABLESPACE TEST UNTIL SCN 1791053 AUXILIARY DESTINATION '/opt/oracle/base/flash_recovery_area';
SQL 'ALTER TABLESPACE TEST ONLINE';
please calrfiy my following question:
1. After reimage(reinstall oracle database with application ).The aboove scenario is not working
2. After fullbackup what are the files needs to copy from (opt/oraclle/base/flash_recovery_area/dbname/) to repository because daily cleanup script will keep the data as sysdate -1 .
For fullbacckup we are currently copying entire (flash_recovery_area/dbname) database folder to repoistory.
3. after incremental backup what are the files needs to copy from (opt/oraclle/base/flash_recovery_area/dbname/..) to repository because daily cleanup script will keep the data as sysdate -1
For incremenatl backup currently we are copying (flash_recovery_area/dbname/backupset/<currentdate> and flash_recovery_area/dbname/autobackup/<currentdate>) folder to repoistory.
4.During restore we are copy entire things from repository to flash_recovery_area finaly apply the above mentioned restore command.
Tabelspace incremenatl restore is possible after reimage application server(fresh database)/another server with same database(standby machine) ....?
If we missing something in backup side please clarify me how to retore the tablespace incremental / level 0 tablespacae after reinstallion of server/another standby server.
Any information please let me know .I need the solution as soon as please reply as soon as .Try the Recovery Manager (RMAN) instead. This forum is for feedback about the 11g XE Beta.
-
How to restore TABLESPACE not in backup set?
I was playing with RMAN on one of my test databases. Here's what I did.
1) Performed full backup on an ARCHIVELOG enabled database
2) I created a table space named TBLSP
3) shutdown the database
4) Corrupted the only data file in TBLSP
5) startup
As you all guessed database won't open. I was pretty sure that if I restore last full backup and roll archive logs forward, I would be able to recover my corrupted tablespace.
6) rman target /
7) restore datafile 'D:\oracle\oradata\training\tmptbl01.dbf';
8) I get
RMAN-06023: no backup or copy of datafile 14 found to restore
9) Then I tried following and both worked(?) fine.
RMAN> RESTORE DATABASE UNTIL TIME "TO_DATE('09/04/2006 12:20:00','MM/DD/YYYY HH:MI:SS')";
RMAN> RECOVER DATABASE UNTIL TIME "TO_DATE('09/04/2006 12:20:00','MM/DD/YYYY HH:MI:SS')";
10) Now I can do ALTER DATABASE OPEN RESETLOGS;
Database is opened but I lost tblsp tablespace. What should I do to recover corrupted tablespace until its last consistent state.
Thanks...From the error you received, I would assume you are not on 10g?
If you are on 10g, once you determine the tablespace containing the corrupted datafile, you could rename the datafile on the file system and issue the following in RMAN:
RMAN> startup mount;
RMAN> restore tablespace tblsp;
RMAN> recover tablespace tblsp;
RMAN> alter database open;or
RMAN> startup mount;
RMAN> restore datafile <corrupt_datafile_#>;
RMAN> recover datafile <corrupt_datafile_#>;
RMAN> alter database open; -
RMAN Restore tablespace across LPAR's
My Oracle revision is 10.2.0.4
I have a full backup of a Production database and I want to restore just ONE tablespace from the backupset to another database instance on a different LPAR. I have read the documentation on creating and updataing duplicate databases with RMAN but havent found if I can just restore one tablespace/datafile to another instance.
Help!!You can try to use RMAN DUPLICATE with the SKIP TABLESPACE clause to skip all application tablespaces except the one you really want to restore:
>
SKIP TABLESPACE 'tablespace_name'
Excludes the specified tablespace from the duplicate database. Note that you cannot exclude the SYSTEM tablespace, undo tablespaces, and tablespaces with rollback segments.
>
(From http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta028.htm#RCMRF126).
From the duplicated database you should be able to transport the tablespace to the right database.
Maybe you are looking for
-
Data in application based on User logged in
Hi, We have a requirment in our project in which we need to prefill few fields of all pages of application based on the user logged in. The required information to be populated in application is available in database table. When the page is gettign l
-
Hello, We are working in our test environment on our upgrade process from 10.2.0.4 to 11.2.0.1. I have cloned a copy of our Production database to support this effort. During the upgrade process using DBUA, we consistently receive an error. The error
-
Hi, I'm working on one of the reports which displays group currency. I'm using a function module to convert the incoming local currency(which is in different units like GBP,AUD) into the group currency which is in USD. After loading the data the curr
-
ORA-06550: line 8, column 21: PLS-00306: wrong number or types of arguments
Hello, I have a form page that inserts rows to a table by using a custom plsql which is defined via application process. the process is shown as: DECLARE v_loop NUMBER := trunc(:P43_SEG_SCH_DEP_DT2) - trunc(:P43_SEG_SCH_DEP_DT); v_date date; BEGIN FO
-
Navigation between applications
Hello everyone, i had a problem while Navigating from one application to another application.....in webdynpro project. i had two application in one webdynpro project. i am passing one url string in first application exit plug. using the code below. S