Extracting Backups Sets from ASM with RMAN (10g)
If I backup my database to my flash recovery area in ASM using RMAN, can I then extract those backup sets from ASM and turn them into normal file system files?
I think I read that you can do this but I just wanted to be sure. I don't need super detail on this, just get me pointed in the right direction.
I've certainly read about extracting a database from ASM, but I'm just not sure how I'd migrate an individual, arbitrary file.
http://www.oracle.com/technology/oramag/oracle/04-nov/o64rman.html#T2 describes something like this, in the "Adding ASM" section. Here's the excerpt:
Files inside an ASM location are not accessible as operating system files. To get the backups and archived logs from the ASM disk group to regular disks and tapes, John will use RMAN to back up the recovery area from ASM to tape (at the network backup server) through the following command:
BACKUP RECOVERY AREA;
This backs up the entire recovery area, including data file backups, archived logs, and control file backups from the ASM disk group to the tape.
So, this would lead us to believe that what we want can be done. However, I read somewhere in the RMAN doc that BACKUP RECOVERY AREA will only create a backup to an sbt (i.e. tape) device. That is, it would appear that RMAN cannot store backups in ASM, and also allow you to "export" them to disk. You can export to tape, but not to disk.
This is disconcerting. I'd like to store all Oracle-related files under ASM, but I'd also like to allow our tape backup procedures (which I am not in control of, and which do more than just backup Oracle) to easily just grab OS files that I put out there.
Similar Messages
-
Clone database with backup sets from another server
Hi, I want to clone a database in Host A with a backup set stored in Host B.
My script in Host A (where i want the cloned DB to be created) is as follows:
ORACLE_SID=test8; export ORACLE_SID
rman target sys/XXX@OriginalDB_in_HostB catalog prodifs/prodifs@CatalogDB_in_HostB
connect auxiliary / ;
configure channel device type disk clear;
configure default device type to disk;
configure device type disk parallelism 3;
run{
set until scn 317776086;
set newname for datafile 1 to '/o2/oradata/test8/system01.dbf';
set newname for datafile 2 to '/o2/oradata/test8/undotbs01.dbf';
duplicate target database to test8
logfile
group 1 ('/o1/oradata/test8/redo0101.rdo','/o2/oradata/test8/redo0102.rdo') size 104858112,
group 2....;
How do I specify in this script that backup files to be restored are not saved in current Host (A) but in Host B? Is it something that i should edit in the "configure channel" sentence ?
A workaround for this is to copy all backup files from HostB to the same location in HostA but I would prefer to do it in a more elegant way. Thanks and regards,
LeandroHi,
You have to set DB_FILE_NAME_CONVERT or LOG_FILE_NAME_CONVERT parameters.
Duplicating a Database on a Remote Host with the Same Directory Structure
http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10734/rcmdupdb.htm#1006630
go through below link
http://dbataj.blogspot.com/2006/12/duplicating-database-with-recovery.html
hope this helps
regards
Taj -
How can i output backup set that generated by RMAN into a named pipe?
Hi, buddy!
Now i want to backup and restore oracle database or tablespaces with RMAN, and i need to use RMAN to write/read backup set into a named pipe that Operation System created. Is there any method to do it??
Thank you for your attention!!Thank you very much!!
I hava read this article you give and have a try according to it. When i start RMAN with pipe mode, i can send command in sqlplus and receive the result log from RMAN. But i can't take the RMAN to backup database into a pipe. for example, my sql statements is following that:
please note line 2,"FORMAT 'ORA$RMAN_P1_OUT' ". It is error ,but that is what i want.
so could you tell me how should i do? Or Rman does not support output the backup set to a pipe radically.
SQL> DECLARE
2 V_INPUT VARCHAR2(32767) := 'BACKUP DATABASE FORMAT 'ORA$RMAN_P1_OUT';';
3 V_OUT NUMBER;
4 BEGIN
5 DBMS_PIPE.PACK_MESSAGE(V_INPUT);
6 V_OUT := DBMS_PIPE.SEND_MESSAGE('ORA$RMAN_PI_IN');
7 DBMS_OUTPUT.PUT_LINE(V_OUT);
8 COMMIT;
9 END;
10 / -
Hi
I have tested the codes too but it doesn't seem to be able to recover the database (including the tablespace which I have dropped). Why?
# RMAN backup
run
allocate channel ch1 type disk;
sql 'alter system archive log current';
backup format '/backup/orcl/%d_t%t_s%s_p%p'
filesperset=4
database;
release channel ch1;
RMAN > list backup;
File LV Type Ckp SCN Ckp Time Name
1 Full 4072944 06-JUL-05 /oracle/oradata/system01.dbf
8 Full 4072944 06-JUL-05 /oracle/oradata/tools01.dbf
12 Full 4072944 06-JUL-05 /oracle/oradata/test01.dbf
# Drop tablespace
drop tablespace test including contents;
# RMAN Recovery
shutdown immediate;
startup mount;
# time is set to after rman backup and before tablespace dropped
RMAN>
run {
set until time "to_date('06-07-2005 16:50:00','dd-mm-yyyy hh24:mi:ss')";
restore database;
recover database;
RMAN > list backup;
File LV Type Ckp SCN Ckp Time Name
1 Full 4072944 06-JUL-05 /oracle/oradata/system01.dbf
8 Full 4072944 06-JUL-05 /oracle/oradata/tools01.dbf
12 Full 4072944 06-JUL-05
Why is the RMAN list empty for the deleted tablespace? That's the reason why there is nothing to reover from?check at sql prompt
select substr(name,1,50),status
2 from v$datafileYours test01.dbf file should have status recover and filename should be missing.
Khurram -
How do I read a web page and extract text information from it with LabVIEW?
Hello,
I want to read a webpage (not Labview), extract the text from the page and then sort out the text to get the information I want. It would be like reading a weather webpage and wanting to extract the current temperature from the webpage usign labview. Any suggestions?
ThanksThe discussion below touches on the subject, it looks like it will do what you want.
http://forums.ni.com/ni/board/message?board.id=170&message.id=137315&requireLogin=False -
Restore backups on new server with RMAN (nocatalog).
Hi,
On my production database (Oracle8i/Solaris8) I use RMAN(nocatalog) to backup database:
connect target
run {
allocate channel d1 type disk;
backup full tag = 'Full Backup'
format '/oracle_backups/db_%t_%s_p%p'
(database);
sql 'alter system switch logfile';
backup
full
etc.}
I need to test backup by restoring it on test server (Oracle8i/Linux7.3). How I can point RMAN on test server to backup files location?
Thanks.If you use a recovery catalog and want to duplicate database in a fresh server.
1. connect with the target database.
2. connect with the recovery catalog.
3. connect with the auxiliary database.
4. Run the duplicate command.
Before running the duplicate command copy the backup piece to your fresh server from the target server. Both mount point should be same.
Regards
Asif Kabir
-- mark your helpful post as correct/helpful. -
Oracle SQL - Extracting clob value from XML with repeating nodes
Hi All,
I am attempting to run SQL on a table (called test_xml with a column xml_data [data type xmltype]). The column contains xml with repeating nodes (description). The following statement runs successfully when the node contains data of a non clob size:
SELECT
extractvalue (Value (wl), '*/description')
FROM test_xml
, TABLE (xmlsequence (extract (xml_data, '*/record'))) wl
but fails when description node contains a lot of data:
ORA-01706: user function result value was too large
I amended my query:
SELECT
extractvalue(Value (wl), '*/description').getClobVal()
FROM test_xml
, TABLE (xmlsequence (extract (xml_data, '*/record'))) wl
but this fails with:
ORA-22806: not an object or REF
Thanks in AdvanceHi Greg,
11.2.0.2.0 (Although I will need to do this on my work instance also which is 10.2.0.4)That's gonna be a problem...
Direct CLOB projection is supported starting with 11.2.0.2, using XMLTable or XMLCast/XQuery functions (extractvalue, extract, xmlsequence are deprecated now) :
SELECT x.*
FROM test_xml t
, XMLTable(
'/*/record'
passing t.xml_data
columns
description clob path 'description'
) x
;On prior versions, implicit conversions will occur to VARCHAR2 datatype, hence the limitation observed.
AFAIK you have two options on 10.2.0.4 :
1) Using Object-Relational storage, with the xdb:SQLType="CLOB" annotation.
2) Using the following trick :
SELECT dbms_xmlgen.convert(x.description.getClobVal(), 1) as description
FROM test_xml t
, XMLTable(
'/*/record'
passing t.xml_data
columns
description xmltype path 'description/text()'
) x
; -
How to extract controlfile from backup set?
Hi
If I use this "INCLUDE CURRENT CONTROLFILE" in backup command direct to tape and no catalog, How to extract controlfile from backup set from tape?
Thanks,
Taohiko
Edited by: taohiko on Sep 17, 2009 7:54 AMyes
list backup of controlfile
will show you where controlfile backup piece reside with backup piece name
after then
restore controlfile from 'backup_piece_naem_with_its_full_path_from_above_command_result';Khurram -
I am restoring the production database to testing server. i have taken the cold backup of my catalog database and refreshed on development server so that i can have information about the production db in RMAN catalog db.
i have copied the backup sets ( level 0 ) of my production db to development server. backup set path is not identical as production. so When i try to recover in dev server i am getting error file not found. ( not able to find the backup piece ) since it is point to production backup set path.
how do i set or update the RMAN database about my testing server backup set path so that during the recovery rman reads from new location on the development.thank you.
I am facing problem while restoring the database.
i trying to restore from level 0 backup which we take daily basis. when i use the below command and while restoring one of the datafile referring the old backup set which is not available. i have valid backup sets taken yesterday. but rman refers the backup sets taken on day before yesterday.
i am using the following command.
rman << EOS
connect catalog rman/rman@PSMTRRCT
set dbid 4151495469;
connect target /;
startup nomount;
run {
allocate channel c1 type disk;
set until time "to_date('9/mar/2011 23:00','dd/mon/yyyy hh24:mi')";
restore controlfile;
restore database;
alter database mount;
exit
EOS
LEVEL 0 backup which i have was taken on 9 mar. but rman refers the 8 march backup set for one particular datafile. since i dont have that backup set. restore fails.
can you please help. -
Hi all,
I plan to start using RMAN soon. After doing a lot of reading, I have a pretty good feel for how it works and the syntax.
I'd appreciate getting some good example scripts that I can compare with mine. I realize I can compare with the DBA manual, but I'd rather see something that someone has been using successfully. Perhaps I'll use them as a starting point for my on RMAN scripts.
If it makes a difference, we are at RMAN 10G and our server is Windows 2003.
Thanks a bunch.Full Database backup
rman
connect rcvcat username/password@rmancat
connect target username/password@target
run {
set command id to 'rman 10g database';
allocate channel tape1 type 'SBT_TAPE' format '%d_full_%U';
allocate channel tape2 type 'SBT_TAPE' format '%d_full_%U';
allocate channel tape3 type 'SBT_TAPE' format '%d_full_%U';
backup incremental level=0 tag="target_Level0_full" (database filesperset=25 include current controlfile);
sql 'alter system archive log current';
change archivelog all validate;
backup filesperset 5 archivelog all;
backup current controlfile format '%d_cf_%U';
release channel tape1;
release channel tape2;
release channel tape3;
Archive log backup and delete
rman
connect rcvcat username/password@rmancat
connect target username/password@target
run {
set command id to 'rman 10g archive backup';
allocate channel tape1 type 'SBT_TAPE' format '%d_full_%U';
allocate channel tape2 type 'SBT_TAPE' format '%d_full_%U';
allocate channel tape3 type 'SBT_TAPE' format '%d_full_%U';
sql "alter system archive log current";
backup tag="target_Level0_arch" filesperset 10 archivelog until time 'sysdate - 1/24' delete input;
release channel tape1;
release channel tape2;
release channel tape3;
} -
Backup controlfile from O/S command
Is it possible that backup controlfile by OS level command without issue oracle DDL command such as "alter database backup controlfile to ..." ?
The control file is a binary file that is constantly being written to when the database is open. If the database is open, then you should only backup the control file with RMAN or the 'alter database ..." commands. If the database is shut down, then you can use the OS command to backup the control file.
Thanks, Tammy -
Migrating with RMAN from 10g to 11g
Hi gurus,
I am following the following procedure to migrate database from 10g to 11g using rman
Source side:
RMAN>connect target
RMAN>backup database;
RMAN>backup archivelog all;
RMAN>backup current controlfile;
SQL> create pfile from spfile;
Copied datafile, archivelog backup files and pfile and password files to target side. i.e. on 11g server side
Target side:
Set proper parameters for 11g
SQL>startup nomount;
RMAN>connect target
RMAN>set dbid=<source database id>
RMAN>catalog start with '<rman backup file location';
RMAN>restore controlfile;
RMAN>run
set newname for datafile 1 to '<target datafiles location with file name';
restore database;
switch datafile all;
finished
upto now it's success full when i am trying to recover
RMAN>recover database;
it is saying
rman 00571
rman 00569
rman 00571
rman 03002
ora - 19698
can you please suggest the solution for this.
thanks a lot.I'm not sure what you're doing is supported.
You are taking a 10g database and restore and recover it using 11g software.
I think you are allowed to do that with 10g software only. -
Duplicate an old RMAN backup set on Oracle 9.2.0.8 with no catalog
Version: 9.2.0.8. We don't use an RMAN catalog
Scenario: I need to duplicate a database to the same server with a different name so I can recover some old data. The restored backup set is about 20 days old
and my RMAN retention is 1 day.
Current date: 24 March 2011
I try
./rman target sys/syspassword@pasdbt9i auxiliary /
RMAN> duplicate target database to pastemp until time "to_date('04-MAR-2011 18:30:00','DD-MON-YYYY HH24:MI:SS')";
Starting Duplicate Db at 24-MAR-11
using target database controlfile instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=17 devtype=DI
.using channel ORA_AUX_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/24/2011 12:00:11
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 13 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
I presume this is happening because the target database has a retention of one day and is unaware of this rman backup that is about 20 days old.
If this is true, is there a way of telling the target database about this old backup set that I now want to duplicate?
From 10g onwards you can catalog a backup piece which might be the fix for this??
I've got round the problem by restoring the database to a different server, but would still like to know if the above is possible.
Can anyone offer any suggestions? thanks.Hi C3PO,
I presume this is happening because the target database has a retention of one day and is unaware of this rman backup that is about 20 days old?Correct the backupset metadata is nolonger available.
From 10g onwards you can catalog a backup piece which might be the fix for this??In 9i you can catalog image copies.
http://download.oracle.com/docs/cd/B10501_01/server.920/a96565/rcmsynta11.htm#1005792
Can anyone offer any suggestions?Another option would be setup a catalog and change the retention policy to 30 days and add extra diskspace.
Regards,
Tycho -
Rman backup and restore from ASM env to Non ASM Environment
Hi,
I got a situation where i need to take RMAN Backup from ASM RAC environment and Restore that back to Non ASM standalone database.
Please let me know the procedure.
would appreciate your quick response874152 wrote:
Hi,
I got a situation where i need to take RMAN Backup from ASM RAC environment and Restore that back to Non ASM standalone database.
Please let me know the procedure.
would appreciate your quick response
Hi,
You can follow this procedure
1. take the backup to destination host
2. restore spfile and controlfile
3. catalog the backup with command 'catalog start with <location of backup>'
4. use "set newname for datafile" to restore the datafile to non asm disk
5. restore database
6. recover database until point in time
7. rename redolog and tempfile
8. open database with resetlogs
9. remove redolog group from another instance
10. you might want to drop undo tablespace from another instance too
11. task complete
Cheers -
Database restore from a particular backup set using rman
Hi all,
My OS: UNIX
DB : 10.2.0.1
As i checked the database it will indicate datafile 5 is header corruption.
yesterday i take complete online backup of the database using RMAN but now when i run restore database command it will show as
ORA-19870: error reading backup piece /cms/BACKUP/ora_BSCS_set149_piece1_20111206_4lmth1qj_1_1
ORA-19573: cannot obtain exclusive enqueue for datafile 6
Database is open and datafile is physically present there
So can anyone tell what to do next
Edited by: Vikas Kohli on Dec 9, 2011 9:58 AMhere are the result for the same:
Starting restore at 09-DEC-11
using channel ORA_DISK_1
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
147 Incr 0 1.10G DISK 00:14:10 06-DEC-11
BP Key: 147 Status: AVAILABLE Compressed: YES Tag: TAG20111206T085858
Piece Name: /cms/BACKUP/ora_BSCS_set149_piece1_20111206_4lmth1qj_1_1
List of Datafiles in backup set 147
File LV Type Ckp SCN Ckp Time Name
1 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/system01.dbf
2 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/undotbs01.dbf
3 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/sysaux01.dbf
4 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/users01.dbf
5 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/DATA.dbf
6 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/users02.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
149 Incr 1 11.49M DISK 00:00:07 07-DEC-11
BP Key: 149 Status: AVAILABLE Compressed: YES Tag: TAG20111207T082737
Piece Name: /cms/BACKUP/ora_BSCS_set151_piece1_20111207_4nmtjkbr_1_1
List of Datafiles in backup set 149
File LV Type Ckp SCN Ckp Time Name
1 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/system01.dbf
2 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/undotbs01.dbf
3 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/sysaux01.dbf
4 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/users01.dbf
5 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/DATA.dbf
6 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/users02.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
151 Incr 1 115.07M DISK 00:01:24 08-DEC-11
BP Key: 151 Status: AVAILABLE Compressed: YES Tag: TAG20111208T075327
Piece Name: /cms/BACKUP/ora_BSCS_set153_piece1_20111208_4pmtm6nn_1_1
List of Datafiles in backup set 151
File LV Type Ckp SCN Ckp Time Name
1 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/system01.dbf
2 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/undotbs01.dbf
3 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/sysaux01.dbf
4 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/users01.dbf
5 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/DATA.dbf
6 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/users02.dbf
no backup of log thread 1 seq 411 lowscn 9068988025356 found to restore
no backup of log thread 1 seq 412 lowscn 9068988167985 found to restore
no backup of log thread 1 seq 413 lowscn 9068988203392 found to restore
List of Archived Log Copies
Key Thrd Seq S Low Time Name
263 1 3 A 05-DEC-11 /u01/app/oracle/admin/BSCS/arch/BSCS/1_3_769127125.dbf
273 1 13 A 07-DEC-11 /u01/app/oracle/admin/BSCS/arch/BSCS/1_13_769127125.dbf
Media recovery start SCN is 9068988123314
Recovery must be done beyond SCN 9068988123314 to clear data files fuzziness
Finished restore at 09-DEC-11
Maybe you are looking for
-
Content conversion in sender file adapter problem
Hello, I receive a flat file with the following structure: HEADER;...fields; ITEM;...fields; ITEM;...fields...; HEADER;...fields; ITEM;...fields...; ...etc. and I am converting it to xml with the same structure. The Problem by the conversion is that
-
How to run report to show all the records in the form view of Siebel 8.1.1
Hi. My template has "for-each" section and there are more than 1 records in the form view. But when generating report, there is only one record in the report. Can anyone offers help? Thanks a lot. Edited by: user11948585 on 2009-11-18 下午6:08
-
Attaching iMac to the wall -- like a flatscreen ?!?!
Hi, I'm about to buy my FIRST apple in April, and looking into the iMacs. My husband & I were wondering if it's possible to remove the foot pedistol (spelling!?) from the screen, and attach the screen just to the wall, like a flatscreen. THis would b
-
Starting from a clean page.
Hello everyone. I am new to video editing and I purchased a copy of Premiere Elements 7 based on reviews I read and other peoples experiances with Adobe programs. I've made a couple of movies, some using istamovie and others using click and drag etc.
-
How do I get my hinge repaired? how much will it cost?
the hinge on the left died of my laptop has come apart and my key board side is coming apart. what can i do? This computer is fairly new.