RMAN TSPITR
Hello
I use the oracle 10g (10.2.0.1) database in OEL 5.I tries to run TSPITR and played successfully by using the command below.
run
{
retrieve the USERS tablespace until time ' to_date (28 January 14 21:30 ',' dd-MON-rr hh24:mi:ss').
auxiliary destination ' / u01';
}
Now I'm performing TSPITR until 20:00, but it shows the error
RMAN-20202: tablespace not found in the recovery catalog
RMAN-06019: could not translate tablespace name "USERS."
1.)is TSPITR is performed with success we cannot make new TSPITR on same tablespace in time earlier that this has been done before?
2.) does TSPITR uses backup or archive log only enough?
Kind regards
007
Read the point * before * "Limitations of TSPITR without a Recovery Catalog.
Hemant K Collette
Tags: Database
Similar Questions
-
TSPITR - recover Tablespace dependence due to the XDB abandoned abandonment.
I discovered a problem using TSPITR to recover a deleted Tablespace when XML DB (XDB) is installed on a different tablespace "SYSAUX.
While running RMAN TSPITR use Data Pump export/import Tablespace Metadata as Data Pump dependence more views XDB and related objects and XDB is installed on a set of tablespace are not on the dummy database EXPDP fails.
Triggered errors ORA-39123, ORA-00376, ORA-01110.
I did not find any limitation on location XDB on documentation or MoS.
This looks like a Bug of Oracle.
See this:
XDB installed on TABLESPACE XDB.
A drop Tablespace SOE.SQL> select owner,tablespace_name from dba_segments where owner='XDB' GROUP BY owner,tablespace_name ; OWNER TABLESPACE_NAME ------------------------------ ------------------------------ XDB XDB
Restore dropped the Tablespace.SQL> select to_char(sysdate,'dd-mm-yyyy hh24:mi:ss') actual_date from dual; ACTUAL_DATE ------------------- 17-12-2012 11:57:44 SQL> drop tablespace SOE including contents and datafiles; Tablespace dropped.
If I drop tablespace SOE and XDB on target from the base and try to restore the two (SOE, XDB) export will be successful but in the RMAN Metadata IMPORT will faill due dependence XDB.RMAN> list backup tag TAG20121217T112226; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 69 Full 995.61M DISK 00:02:41 17-12-2012 11:25:07 BP Key: 69 Status: AVAILABLE Compressed: YES Tag: TAG20121217T112226 Piece Name: +DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947 List of Datafiles in backup set 69 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- ------------------- ---- 1 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/system.349.799325249 2 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/sysaux.348.799325249 3 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/undotbs1.347.799325251 4 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/users.335.799325251 5 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/audit_aux.287.799330083 6 Full 1628648 17-12-2012 11:22:26 7 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/xdb.311.801410833 RMAN> run{ SET NEWNAME FOR DATAFILE 6 TO "+DS8000_DG"; RECOVER TABLESPACE SOE UNTIL TIME "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')" AUXILIARY DESTINATION '/u01/app/oracle/flash_recovery_area01/stage_area_tspitr'; } executing command: SET NEWNAME Starting recover at 17-12-2012 12:01:29 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=18 device type=DISK 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 UNDOTBS1 Creating automatic instance, with SID='FCox' initialization parameters used for automatic instance: db_name=PROD db_unique_name=FCox_tspitr_PROD compatible=11.2.0.0.0 db_block_size=8192 db_files=200 sga_target=280M processes=50 db_create_file_dest=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr log_archive_dest_1='location=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr' #No auxiliary parameter file used starting up automatic instance PROD Oracle instance started Total System Global Area 292278272 bytes Fixed Size 2220880 bytes Variable Size 109055152 bytes Database Buffers 176160768 bytes Redo Buffers 4841472 bytes Automatic instance created List of tablespaces that have been dropped from the target database: Tablespace SOE contents of Memory Script: { # set requested point in time set until time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')"; # 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 17-12-2012 12:01:46 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=16 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 +DG_16M/prod/autobackup/2012_12_17/s_802265113.276.802265115 channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/autobackup/2012_12_17/s_802265113.276.802265115 tag=TAG20121217T112513 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:05 output file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/controlfile/o1_mf_8dy9ghpz_.ctl Finished restore at 17-12-2012 12:01:52 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 time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')"; # set destinations for recovery set and auxiliary set datafiles set newname for clone datafile 1 to new; set newname for clone datafile 3 to new; set newname for clone datafile 2 to new; set newname for clone tempfile 1 to new; set newname for datafile 6 to "+DS8000_DG"; # switch all tempfiles switch clone tempfile all; # restore the tablespaces in the recovery set and the auxiliary set restore clone datafile 1, 3, 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 /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_temp_%u_.tmp in control file Starting restore at 17-12-2012 12:01:58 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 /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_%u_.dbf channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_%u_.dbf channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_%u_.dbf channel ORA_AUX_DISK_1: restoring datafile 00006 to +DS8000_DG channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947 channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947 tag=TAG20121217T112226 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:09:15 Finished restore at 17-12-2012 12:11:13 datafile 6 switched to datafile copy input datafile copy RECID=5 STAMP=802267873 file name=+DS8000_DG/prod/datafile/soe.487.802267321 datafile 1 switched to datafile copy input datafile copy RECID=6 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_8dy9gs09_.dbf datafile 3 switched to datafile copy input datafile copy RECID=7 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_8dy9ov17_.dbf datafile 2 switched to datafile copy input datafile copy RECID=8 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_8dy9hxsc_.dbf contents of Memory Script: { # set requested point in time set until time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')"; # online the datafiles restored or switched sql clone "alter database datafile 1 online"; sql clone "alter database datafile 3 online"; sql clone "alter database datafile 2 online"; sql clone "alter database datafile 6 online"; # recover and open resetlogs recover clone database tablespace "SOE", "SYSTEM", "UNDOTBS1", "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 3 online sql statement: alter database datafile 2 online sql statement: alter database datafile 6 online Starting recover at 17-12-2012 12:11:14 using channel ORA_AUX_DISK_1 starting media recovery archived log for thread 1 with sequence 15 is already on disk as file +DG_16M/prod/archivelog/2012_12_17/thread_1_seq_15.277.802267317 channel ORA_AUX_DISK_1: starting archived log restore to default destination channel ORA_AUX_DISK_1: restoring archived log archived log thread=1 sequence=14 channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/backupset/2012_12_17/annnf0_tag20121217t112512_0.264.802265113 channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/backupset/2012_12_17/annnf0_tag20121217t112512_0.264.802265113 tag=TAG20121217T112512 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/1_14_801941068.dbf thread=1 sequence=14 channel clone_default: deleting archived log(s) archived log file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/1_14_801941068.dbf RECID=141 STAMP=802267877 archived log file name=+DG_16M/prod/archivelog/2012_12_17/thread_1_seq_15.277.802267317 thread=1 sequence=15 media recovery complete, elapsed time: 00:00:01 Finished recover at 17-12-2012 12:11:19 database opened contents of Memory Script: { # make read only the tablespace that will be exported sql clone 'alter tablespace SOE read only'; # create directory for datapump import sql "create or replace directory TSPITR_DIROBJ_DPDIR as '' /u01/app/oracle/flash_recovery_area01/stage_area_tspitr''"; # create directory for datapump export sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as '' /u01/app/oracle/flash_recovery_area01/stage_area_tspitr''"; } executing Memory Script sql statement: alter tablespace SOE read only sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/flash_recovery_area01/stage_area_tspitr'' sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/flash_recovery_area01/stage_area_tspitr'' Performing export of metadata... EXPDP> Starting "SYS"."TSPITR_EXP_FCox": EXPDP> ORA-39123: Data Pump transportable tablespace job aborted ORA-00376: file 7 cannot be read at this time ORA-01110: data file 7: '+DS8000_DG/prod/datafile/xdb.311.801410833' Removing automatic instance shutting down automatic instance database closed database dismounted Oracle instance shut down Automatic instance removed auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_temp_8dyb0qok_.tmp deleted auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_3_8dyb0kfp_.log deleted auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_2_8dyb0fm9_.log deleted auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_1_8dyb07xv_.log deleted auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_8dy9hxsc_.dbf deleted auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_8dy9ov17_.dbf deleted auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_8dy9gs09_.dbf deleted auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/controlfile/o1_mf_8dy9ghpz_.ctl deleted RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 12/17/2012 12:12:19 RMAN-06962: Error received during export of metadata RMAN-06965: Datapump job has stopped RMAN-06960: EXPDP> Job "SYS"."TSPITR_EXP_FCox" stopped due to fatal error at 12:12:02 RMAN>
In my opinion, they (average Oracle) need find a way to include XDB Tablespace on database-MODEL only for export purposes (EXPDP) metadata.
If someone coming to a workaround for this error will be grateful.
PS: This is not a Production environment and will soon open a SR on the Support of Oracle.Hi Michael,
I have not found solution to use TSPITR to recover the tablespace has fallen if XML DB is installed in a default tablespace (i.e. outside SYSAUX).As much, I could understand, the only way to perform this RESTORE uses old fashion. By creating the database clone excluding all needless tablespace, export and import of metadata of tablespace you want manually.
Given that Oracle has not solved the problem that I have created my own workaround solution.
@All
If someone is able to use TSPITR to restore interrupted tablespace when XDB is installed in a default tablespace, please let me know!
The procedure below is supported on all versions of Oracle from 10.1 up to 11.2.
I do not RECOMMEND to create AUXILIARY (clone) database by using the same TARGET server because you may damage the TARGET database.
On this example, I use same server.
See this example:
### ON TARGET DATABASE SQL> select count(1) SEG_COUNT from dba_segments where tablespace_name='SOE'; SEG_COUNT ---------- 32 SQL> ! date Wed Dec 19 15:08:11 GMT-02:00 2012 SQL> drop tablespace soe including contents and datafiles; Tablespace dropped. ### CHECK TABLESPACE TO BE EXCLUDED FROM RESTORE SQL> select tablespace_name from dba_tablespaces where tablespace_name not in ('SYSTEM','SYSAUX','UNDOTBS1','SOE','XDB','TEMP'); TABLESPACE_NAME ------------------------------ USERS AUDIT_AUX
### CHECK BACKUP ON TARGET DATABASE RMAN> list backup completed between "sysdate-1" and "sysdate"; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 95 Full 986.56M DISK 00:03:18 19-12-2012 14:41:59 BP Key: 95 Status: AVAILABLE Compressed: YES Tag: TAG20121219T143840 Piece Name: /fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp List of Datafiles in backup set 95 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- ------------------- ---- 1 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/system.349.799325249 2 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/sysaux.348.799325249 3 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/undotbs1.347.799325251 4 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/users.335.799325251 5 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/audit_aux.287.799330083 6 Full 1675258 19-12-2012 14:38:42 7 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/xdb.311.801410833 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ ------------------- 96 1.16M DISK 00:00:00 19-12-2012 14:42:08 BP Key: 96 Status: AVAILABLE Compressed: YES Tag: TAG20121219T144208 Piece Name: /fra/PROD/backupset/2012_12_19/o1_mf_annnn_TAG20121219T144208_8f3vm0k3_.bkp List of Archived Logs in backup set 96 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- ------------------- ---------- --------- 1 8 1675198 19-12-2012 14:38:25 1675365 19-12-2012 14:42:07 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 97 Full 7.52M DISK 00:00:02 19-12-2012 14:42:11 BP Key: 97 Status: AVAILABLE Compressed: NO Tag: TAG20121219T144209 Piece Name: /fra/PROD/autobackup/2012_12_19/o1_mf_s_802449729_8f3vm2cc_.bkp SPFILE Included: Modification time: 19-12-2012 14:36:30 SPFILE db_unique_name: PROD Control File Included: Ckp SCN: 1675376 Ckp time: 19-12-2012 14:42:09 RMAN>
### PREPARING ENV cp $ORACLE_HOME/dbs/orapwprod $ORACLE_HOME/dbs/orapwtspitr cd $ORACLE_HOME/dbs ## Creating INIT from TSPITR Instance vi inittspitr.ora DB_NAME=prod DB_UNIQUE_NAME=tspitr CONTROL_FILES=/stage_area_tspitr/PROD/controlfile/control01.ctl REMOTE_LOGIN_PASSWORDFILE=exclusive COMPATIBLE =11.2.0 DB_BLOCK_SIZE=8192 memory_target=700M streams_pool_size=100M ### creating stage area to deploy database mkdir -p /fra/stage_area_tspitr/PROD cd /fra/stage_area_tspitr/PROD mkdir controlfile datafile onlinelog
#### RESTORING DATABASE TSPITR export ORACLE_SID=tspitr $ rman target / RMAN> startup nomount Oracle instance started Total System Global Area 730714112 bytes Fixed Size 2225088 bytes Variable Size 553651264 bytes Database Buffers 167772160 bytes Redo Buffers 7065600 bytes RMAN> restore controlfile from '/fra/PROD/autobackup/2012_12_19/o1_mf_s_802449729_8f3vm2cc_.bkp'; Starting restore at 19-12-2012 15:16:27 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=146 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:03 output file name=/fra/stage_area_tspitr/PROD/controlfile/control01.ctl Finished restore at 19-12-2012 15:16:31 RMAN> startup mount database is already started database mounted released channel: ORA_DISK_1
### REPORT SCHEMA TO GET DATAFILE NUMBER TO BE RESTORED RMAN> report schema; RMAN-06139: WARNING: control file is not current for REPORT SCHEMA Report of database schema for database with db_unique_name TSPITR List of Permanent Datafiles =========================== File Size(MB) Tablespace RB segs Datafile Name ---- -------- -------------------- ------- ------------------------ 1 700 SYSTEM *** +DS8000_DG/prod/datafile/system.349.799325249 2 600 SYSAUX *** +DS8000_DG/prod/datafile/sysaux.348.799325249 3 200 UNDOTBS1 *** +DS8000_DG/prod/datafile/undotbs1.347.799325251 4 5 USERS *** +DS8000_DG/prod/datafile/users.335.799325251 5 100 AUDIT_AUX *** +DS8000_DG/prod/datafile/audit_aux.287.799330083 6 0 SOE *** +DS8000_DG/tspitr/datafile/soe.368.802445265 7 100 XDB *** +DS8000_DG/prod/datafile/xdb.311.801410833 List of Temporary Files ======================= File Size(MB) Tablespace Maxsize(MB) Tempfile Name ---- -------- -------------------- ----------- -------------------- 1 385 TEMP 32767 +DS8000_DG/prod/tempfile/temp.300.799325437 RMAN> ### GET LOGFILE NAME to RENAME to new location. $ sqlplus / as sysdba SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- +DS8000_DG/prod/onlinelog/group_1.330.802352807 +DS8000_DG/prod/onlinelog/group_2.331.802352815 +DS8000_DG/prod/onlinelog/group_3.321.802352821 run { set newname for datafile 1 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U'; set newname for datafile 2 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U'; set newname for datafile 3 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U'; set newname for datafile 7 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U'; set newname for datafile 6 to "+DS8000_DG"; restore datafile 1,2,3,7,6 from tag 'TAG20121219T143840' ; switch datafile 1; switch datafile 2; switch datafile 3; switch datafile 7; switch datafile 6; switch tempfile all; set until time "to_date('19-12-2012 14:42:00','dd-mm-yyyy hh24:mi:ss')"; recover database SKIP TABLESPACE "USERS", "AUDIT_AUX" delete archivelog; ## Renaming ONLINELOG sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_1.330.802352807'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group1.rdo''"; sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_2.331.802352815'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group2.rdo''"; sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_3.321.802352821'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group3.rdo''"; alter database open resetlogs; } executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 19-12-2012 15:32:13 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00001 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1 channel ORA_DISK_1: restoring datafile 00002 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSAUX_FNO-2 channel ORA_DISK_1: restoring datafile 00003 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-UNDOTBS1_FNO-3 channel ORA_DISK_1: restoring datafile 00007 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-XDB_FNO-7 channel ORA_DISK_1: restoring datafile 00006 to +DS8000_DG channel ORA_DISK_1: reading from backup piece /fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp channel ORA_DISK_1: piece handle=/fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp tag=TAG20121219T143840 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:12:35 Finished restore at 19-12-2012 15:44:48 datafile 1 switched to datafile copy input datafile copy RECID=6 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1 datafile 2 switched to datafile copy input datafile copy RECID=8 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSAUX_FNO-2 datafile 3 switched to datafile copy input datafile copy RECID=10 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-UNDOTBS1_FNO-3 datafile 7 switched to datafile copy input datafile copy RECID=12 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-XDB_FNO-7 datafile 6 switched to datafile copy input datafile copy RECID=14 STAMP=802453489 file name=+DS8000_DG/tspitr/datafile/soe.304.802452733 renamed tempfile 1 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-TEMP_FNO-1 in control file executing command: SET until clause Starting recover at 19-12-2012 15:44:49 using channel ORA_DISK_1 Executing: alter database datafile 4 offline Executing: alter database datafile 5 offline starting media recovery archived log for thread 1 with sequence 8 is already on disk as file +DS8000_DG/prod/onlinelog/group_2.331.802352815 archived log file name=+DS8000_DG/prod/onlinelog/group_2.331.802352815 thread=1 sequence=8 media recovery complete, elapsed time: 00:00:02 Finished recover at 19-12-2012 15:44:55 sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_1.330.802352807'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group1.rdo'' sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_2.331.802352815'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group2.rdo'' sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_3.321.802352821'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group3.rdo'' database opened
## Exporting Tablespace Metadata RMAN > run { sql 'alter tablespace SOE read only'; # create directory for datapump export sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''"; # grant on directory to SYSTEM sql "grant read,write on directory TSPITR_DIROBJ_DPDIR to system"; # exporting metadata host "expdp system/oracle@localhost:1521/tspitr DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_FULL_CHECK=Y TRANSPORT_TABLESPACES=SOE"; } using target database control file instead of recovery catalog sql statement: alter tablespace SOE read only sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr'' sql statement: grant read,write on directory TSPITR_DIROBJ_DPDIR to system Export: Release 11.2.0.3.0 - Production on Wed Dec 19 15:53:02 2012 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP, Data Mining, Oracle Database Vault and Real Application Testing options Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01": system/********@localhost:1521/tspitr DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_FULL_CHECK=Y TRANSPORT_TABLESPACES=SOE Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK Processing object type TRANSPORTABLE_EXPORT/TABLE Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/INDEX Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is: /fra/stage_area_tspitr/exp_transport_soe.dmp ****************************************************************************** Datafiles required for transportable tablespace SOE: +DS8000_DG/tspitr/datafile/soe.304.802452733 Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 15:54:28 host command complete
## Stop Database and destroy it to make sure that Datafile 6 will not be used by this database; RMAN> run { shutdown immediate; ## removing controlfile and SYSTEM Tablespace to make sure that database will not be opened host "rm -f /fra/stage_area_tspitr/PROD/controlfile/control01.ctl /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1"; } database closed database dismounted Oracle instance shut down host command complete
## TARGET Database ## Plugging Tablespace on TARGET database. $ export ORACLE_SID=prod $ rman target / run { # create directory for datapump import sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''"; # grant on directory to SYSTEM sql "grant read,write on directory TSPITR_DIROBJ_DPDIR to system"; host "impdp system/oracle@localhost:1521/prod DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_DATAFILES=''+DS8000_DG/tspitr/datafile/soe.304.802452733''"; sql "alter tablespace soe read write"; } sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr'' sql statement: grant read,write on directory TSPITR_DIROBJ_DPDIR to system Import: Release 11.2.0.3.0 - Production on Wed Dec 19 16:09:30 2012 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP, Data Mining, Oracle Database Vault and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/********@localhost:1521/prod DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_DATAFILES=+DS8000_DG/tspitr/datafile/soe.304.802452733 Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK Processing object type TRANSPORTABLE_EXPORT/TABLE Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/INDEX Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 16:10:03 host command complete sql statement: alter tablespace soe read write
### Recompiling Invalid Objects and Checking objects from tablespace SOE $ sqlplus / as sysdba SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2012-12-19 16:10:34 OBJECTS WITH ERRORS ------------------- 0 ERRORS DURING RECOMPILATION --------------------------- 0 Function created. PL/SQL procedure successfully completed. Function dropped. PL/SQL procedure successfully completed. SQL> select count(1) SEG_COUNT from dba_segments where tablespace_name='SOE'; SEG_COUNT ---------- 32 SQL> SELECT COUNT(1) OBJ_INVALID FROM DBA_OBJECTS WHERE STATUS != 'VALID'; OBJ_INVALID ----------- 0 ## PERFORM A FULL BACKUP AFTER RESTORE TABLESPACE.
Kind regards
Levi Pereira -
Restoration of RMAN with SBT_TAPE Symantec Netbackup
Hey, people! We have batch files to run backup who send a full and differential backups of a database. It works as below:
RUN {}
ALLOCATE CHANNEL ch00
TYPE 'SBT_TAPE ';
SEND "NB_ORA_CLIENT = corp08, NB_ORA_SID = GEDD, NB_ORA_POLICY = WINDOWS-ORACLE-FULL, NB_ORA_SERV = corp05, NB_ORA_SCHED = per default-Application-Backup";
BACKUP
ADDITIONAL = 0
FORMAT "% d_ % T_ t % db_full_.
TAG 'GIA-db-full ".
DATABASE;
OUTPUT CHANNEL ch00;
# Archived backup logs
SQL 'alter system archive log current';
ALLOCATE CHANNEL ch00
TYPE 'SBT_TAPE ';
SEND "NB_ORA_CLIENT = corp08, NB_ORA_SID = GEDD, NB_ORA_POLICY = WINDOWS-ORACLE-FULL, NB_ORA_SERV = corp05, NB_ORA_SCHED = per default-Application-Backup";
BACKUP
FORMAT "% d_ % T_ t % arch_full_.
TAG 'GIA-arch-full ".
ARCHIVELOG
ALL THE
REMOVE ALL THE ENTRIES;
OUTPUT CHANNEL ch00;
# Backup control files
ALLOCATE CHANNEL ch00
TYPE 'SBT_TAPE ';
SEND "NB_ORA_CLIENT = corp08, NB_ORA_SID = GEDD, NB_ORA_POLICY = WINDOWS-ORACLE-FULL, NB_ORA_SERV = corp05, NB_ORA_SCHED = per default-Application-Backup";
BACKUP
FORMAT "% d_ % T_ t % ctrl_full_.
TAG 'GEDD-ctrl-full ".
CURRENT CONTROLFILE;
OUTPUT CHANNEL ch00;
ALLOCATE CHANNEL ch00
TYPE 'SBT_TAPE ';
OVERLAP ARCHIVELOG ALL;
OUTPUT CHANNEL ch00;
}
We use Symantec Netbackup software to support us on leave, the backup files to SBT_TAPE.
The incident occurs when I try to restore a tablespace, for example.
When I run a restore below procedure:
RMAN > RUN {
ALLOCATE CHANNEL ch00 TYPE SBT_TAPE SEND 'NB_ORA_CLIENT = corp08';
recover the tablespace "T_CCEL_DAT_01", "T_CCEL_IND_01" until "to_date ('2014-06-23 08:00 ',' ' YYYY-MM-DD HH24:MI:SS)" auxiliary destination "D:\". » ;
}
The procedure allocates a ch00 channel, which triggers the work, find a revovery catalog but the Holy following error at the end:
channel alocado: ch00
channel ch00: SID = 66 = SBT_TAPE device type
channel ch00: Veritas NetBackup for Oracle - version 7.6 (20131113)
Iniciando recover em 24/07/14
RMAN-05026: ADVERTENCIA: implies - is o conjunto tablespaces has seguir is applied a um ponto specific no tempo
Espera - is a list of tablespaces have segmentos CANCEL
SYSTEM tablespace
Tablespace UNDOTBS1
Preencher uma instance automatica, com SID = 'sfgw'
inicializacao para instance automatica free time:
db_name = ORACLE02
db_unique_name = sfgw_tspitr_ORACLE02
compatible = 11.2.0.0.0
DB_BLOCK_SIZE = 8192
DB_FILES = 500
SGA_TARGET = 280M
process = 50
db_create_file_dest = D:------.
Log_archive_dest_1 =' location = d.: \'
Auxiliary parameter file #No used
inicializando instance automatica ORACLE02
Instance Oracle iniciada
Total da Area Global Sistema 292278272 bytes
Bytes of size 2254584 fixed
104859912 variable size bytes
180355072 of database buffers bytes
Redo buffers 4808704 bytes
Instance automatica criada
List of tablespaces that were banco dados destino sistematicamente:
Tablespace T_CCEL_DAT_01
Tablespace T_CCEL_IND_01
conteudo Memoria of Script:
{
# the requested value point in time
until ' to_date ('2014-06-23 08:00 ',' YYYY-MM-DD HH24:MI:SS') ";
# restore the controlfile
Restore clone controlfile;
# mount the controlfile
SQL clone "alter database database mount clone";
Current online journal archive #.
SQL 'alter system archive log current';
# avoid needless save structural changes during the TSPITR
SQL ' start dbms_backup_restore. AutoBackupFlag (FALSE); end;';
}
Executando Script de Memoria
Comando executando: SET until clause
Iniciando restoration em 24/07/14
Removendo instance automatica
desativando instance automatica
Oracle instance Encerramento
Instance automatica removida
channel released: ch00
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: falha comando recover em 24/07/2014 08:59:41
RMAN-03015: erro ocorrido no armazenado memory Script script
RMAN-06034: at least 1 channel must be distributed to run this command
I study and I can not find a conclusion as to the error. Is there someone to help me with this?
Kind regards
André Luis
I found the error: we put the channel as Symantec on Allocate environment variables below.
RUN {}
ALLOCATE CHANNEL ch00 TYPE SBT_TAPE SEND 'NB_ORA_CLIENT = corp0814';
Restore tablespace t_outorgas_dat_01 until TIME ' TO_DATE ('2014-07-24 02:50 ',' ' YYYY-MM-DD HH24:MI:SS) "validate;
}
-
Can you also level table recovery?
AND
Like you said granularity restore RMAN tablespace (TSPITR) and the database (complete or incomplete). No database object level recovery.
If you're on 10g, you may benefit from features of flashback. Flashback, flashback, flashback query etc. versions query table in the measure where your data is still in the undo tablespace.
-
RMAN tablespace recovery is a failure
Hello
I'm testing a scenario of passing my Test database table space and try to retrieve it using RMAN. I am getting below error while trying to recover from the storage space.
Target DB is GGSRC
With the help of catalogue: TOOLSB
Recovery Manager: release 11.2.0.3.0 - Production on Fri Aug 2 07:42:49 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: GGSRC (DBID = 3056046518)
connected to the recovery catalog database
RMAN> ###################################################
2 > #.
3 > # run_restore_tablespace.rman
4 > #.
5 > # use this script for all data files in one or more storage space
6 > # to their location on the original disc.
7 > #.
8> ###################################################
9 > run
10 > {}
11 > # < < RULE_OPTIMIZER > >
12 > run the script allocate_3_channel;
13 >
14 > the VALUE of NEWNAME for DATAFILE ' / u02/oradata/GGSRC/system01.dbf' to ' / u02/oradata/system01.dbf';
15 > the VALUE of NEWNAME for DATAFILE ' / u02/oradata/GGSRC/sysaux01.dbf' to ' / u02/oradata/sysaux01.dbf';
16 > the VALUE of NEWNAME for DATAFILE ' / u06/oradata/GGSRC/undotbs01.dbf' to ' / u06/oradata/undotbs01.dbf';
17 > RECOVER TABLESPACE AYYO until the SNA 19103062 auxiliary destination "/ u02/oradata ';
18 >
19 > run the script release_3_channel;
{20 >}
21 >
the script: allocate_3_channel
allocated channel: DTPUX3t1
channel DTPUX3t1: SID = 23 device type = SBT_TAPE
channel DTPUX3t1: for Oracle Data Protection: version 5.5.2.0
allocated channel: DTPUX3t2
channel DTPUX3t2: SID = 159 device type = SBT_TAPE
channel DTPUX3t2: for Oracle Data Protection: version 5.5.2.0
allocated channel: DTPUX3t3
channel DTPUX3t3: SID = 17 device type = SBT_TAPE
channel DTPUX3t3: for Oracle Data Protection: version 5.5.2.0
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
From back in August 2, 2013 07:42:52
Creation of automatic instance with SID = "rxAh."
initialization parameters for automatic instance:
db_name = GGSRC
db_unique_name = rxAh_tspitr_GGSRC
compatible = 11.2.0.0.0
DB_BLOCK_SIZE = 8192
DB_FILES = 200
SGA_TARGET = 280M
process = 50
db_create_file_dest = / u02/oradata
Log_archive_dest_1 = ' location = / u02/oradata.
Auxiliary parameter file #No used
turn on automatic instance GGSRC
Oracle instance started
Total System Global Area 292278272 bytes
Bytes of size 2227744 fixed
100663776 variable size bytes
184549376 of database buffers bytes
Redo buffers 4837376 bytes
Auto instance created
content of Script memory:
{
# the requested value point in time
until the SNA 19103062.
# restore the controlfile
Restore clone controlfile;
# mount the controlfile
SQL clone "alter database database mount clone";
Current online journal archive #.
SQL 'alter system archive log current';
# avoid needless save structural changes during the TSPITR
SQL ' start dbms_backup_restore. AutoBackupFlag (FALSE); end;';
Resync catalog #.
Catalogue of resynchronization;
}
execution of Script memory
executing command: SET until clause
From restoration to August 2, 2013 07:43:05
Delete an automatic instance
closing automatic instance
Instance Oracle to close
Automatic instance deleted
output channel: DTPUX3t1
output channel: DTPUX3t2
output channel: DTPUX3t3
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: failure of the command recover at 02/08/2013 07:43:09
RMAN-03015: an error has occurred in the script stored memory Script
RMAN-06034: at least 1 channel must be distributed to run this command
Please help me on how to solve it.
Thank you
Mahi
Hello
All by making a TSPITR, do not affect the RMAN channels explicitly. Let the RMAN allocate channel by itself.
Please see the note below.
RMAN-06034 for TSPITR (Doc ID 467189.1)
Thank you!!
-
I have the following questions from one of our partners.
For the Oracle 11 g R2 database version:
Q1: RMAN is able to save a single partition of a database?
Q2: RMAN is able to save a single partition of a single table?
I know that RMAN can back up a single table, but I found nothing on the partitions. Also, any documentation that you have on will help a lot.
Kind regards
AdrianHello;
With RMAN you can back up individual tablespaces. Or you can make the individual data files.
I think that the answer is no to the partitions.
Quote "you can't use TSPITR to retrieve the tablespaces containing one of the following objects - partitioned tables
Source - database backup and Guide 11g Release 2 user recovery (11.2) E10642-03
You can restore and recover in RMAN tablespace or datafile, but no table. You cannot back up just a willingness to table RMAN.
According to your need, Data Pump can provide the solution you need. The INCLUDE parameter filter objects on an export.
Best regards
mseberg
Published by: mseberg on December 7, 2012 08:18
-
Pouvez RMAN recovery table level
Hello
I know you can make database level recovery and a tablespace with RMAN. Can you also level table recovery? How granular can you get?
Thank youN ° as you said granularity restore RMAN tablespace (TSPITR) and the database (complete or incomplete). No database object level recovery.
If you're on 10g, you may benefit from features of flashback. Flashback, flashback, flashback query etc. versions query table in the measure where your data is still in the undo tablespace. (if your tablespace big enough undo and retention period is high, you can be lucky for a few last periods) -
Jin
I use oracle10g (10.2.0.4.0) in windows service pack 2 32-bit. with RMAN, I took a backup of a tablespace. Then, I created a table and the database is closed. Off, I deleted the file data in this table. Now I started the database in the editing phase, started the RMAN. I restored the tablespace by RMAN and then I got to a point where I did not create the table. But the RMAN performs a complete recovery. When I check the table there is always. How is it possible? can someone help me please... I am totally confused.
Here are the commands I used in the above scenario
RMAN > BACKUP TABLESPACE USERS (BACKUP 13:00 HRS)
SQL > CREATE TABLE TEST AS SELECT * FROM EMPLOYEES; (CREATED AT 17:00 HRS)
SQL > IMMEDIATE SHU
physically remove the data from the users table space file.
SQL > STARTUP MOUNT
RMAN > CONNECT TARGET SYS/password
RMAN > RESTORE TABLESPACE USERS
RMAN >RECOVER DATAFILE 4 until time ' to_date ('2010-11-23 16:00 ',' ' YYYY-MM-DD HH24:MI:SS) "
SQL > ALTER DATABASE OPEN RESETLOGS (DISPLAYS AN ERROR THAT RESETLOG CAN SE DO AFTER INCOMPLETE RECOVERY)
SQL > ALTER DATABASE OPEN
SQL > SELECT * FROM TEST (THE TABLE EXISTS)
Please tell me what is wrong in the above scenario? I use wrong queries?
Thanks in advanceYou cannot recover a Tablespace (or Datafile) to a point in time that is not consistent with the rest of the database, unless you use an auxiliary Instance. TSPITR (TablespacePointInTimeRecovery) uses an Auxiilary Instance where SYSTEM, UNDO and the required storage space are recovered to the point passed in time without affecting the current instance of the current database. The tablespace can then transported the auxiliary to the active database instance - you can have RMAN automatically do this but, personally, I would manually.
Hemant K Collette
-
RMAN-06136: &; ORA-04031: unable to allocate for SHARED_POOL
When I run my recovery of tablespace point in time recovery, I get:
RMAN-06136: the auxiliary database ORACLE error: ORA-04031: unable to allocate 1056 bytes of shared memory
On my system target, here is the info for pools:
You can see below that this as my DB to THE puts as well. Here is my info from my catalogSQL> select pool, sum(bytes)/1024/1024 Mbytes from v$sgastat group by pool; POOL MBYTES ------------ ---------- 918.84494 java pool 16 streams pool 16 shared pool 1024.00521 large pool 16 SQL> select * from v$sgainfo; NAME BYTES RES -------------------------------- ---------- --- Fixed SGA Size 2131168 No Redo Buffers 5046272 No Buffer Cache Size 956301312 Yes Shared Pool Size 1073741824 Yes Large Pool Size 16777216 Yes Java Pool Size 16777216 Yes Streams Pool Size 16777216 Yes Shared IO Pool Size 0 Yes Granule Size 16777216 No Maximum SGA Size 2137886720 No Startup overhead in Shared Pool 184549376 No NAME BYTES RES -------------------------------- ---------- --- Free SGA Memory Available 50331648 12 rows selected.
My profile on the DB is therefore:SQL> select pool, sum(bytes)/1024/1024 Mbytes from v$sgastat group by pool; POOL MBYTES ------------ ---------- 176.632385 java pool 4 shared pool 260.00457 large pool 4 SQL> select * from v$sgainfo; NAME BYTES RES -------------------------------- ---------- --- Fixed SGA Size 2133568 No Redo Buffers 6918144 No Buffer Cache Size 176160768 Yes Shared Pool Size 272629760 Yes Large Pool Size 4194304 Yes Java Pool Size 4194304 Yes Streams Pool Size 0 Yes Shared IO Pool Size 0 Yes Granule Size 4194304 No Maximum SGA Size 784998400 No Startup overhead in Shared Pool 67108864 No NAME BYTES RES -------------------------------- ---------- --- Free SGA Memory Available 318767104 12 rows selected.
Version - 11.1.0.7
Type - CARS, 2 nodes Cluster
Server - Win2003, SP4, 3 GHz, 4 GB RAM, 64-bit
Initially the target was fixed at 3 GB of a SGA_MAX_SIZE but I dropped it up to 2048 M.
I guess that the DB to the where the error happens as the export will fail from there. Now, when I went from the size of the target, I would have guessed that the shared_pool would have increased on the DB but it didn't. How can I get my db to get more space for the shared pool and actually complete my recovery.
Recovery Manager: Release 11.1.0.7.0 - Production on Wed Mar 24 14:12:49 2010 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. RMAN> connect target dbaraman@edbtest2 target database Password: connected to target database: EDBTEST (DBID=3958911274) RMAN> connect catalog rman@rmancat recovery catalog database Password: connected to recovery catalog database RMAN> run{ 2> set newname for datafile 1 to "+DATA"; 3> set newname for datafile 2 to "+DATA"; 4> set newname for datafile 3 to "+DATA"; 5> set newname for datafile 4 to "+DATA"; 6> RECOVER TABLESPACE RAMANS 7> until time "to_date('23-MAR-2010 13:36:00','DD-MON-YYYY HH24:MI:SS')" 8> AUXILIARY DESTINATION 'C:\EDBTEST2_backup\oradata\auxdest'; 9> } executing command: SET NEWNAME starting full resync of recovery catalog full resync complete executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting recover at 24-MAR-10 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=495 instance=edbtest2 device type=DISK Creating automatic instance, with SID='srmk' initialization parameters used for automatic instance: db_name=EDBTEST compatible=11.1.0.0.0 db_block_size=8192 db_files=200 db_unique_name=tspitr_EDBTEST_srmk large_pool_size=1M shared_pool_size=110M processes=50 #No auxiliary parameter file used db_create_file_dest=C:\EDBTEST2_backup\oradata\auxdest control_files=C:\EDBTEST2_backup\oradata\auxdest/cntrl_tspitr_EDBTEST_srmk.f starting up automatic instance EDBTEST Oracle instance started Total System Global Area 204632064 bytes Fixed Size 2127912 bytes Variable Size 146802648 bytes Database Buffers 50331648 bytes Redo Buffers 5369856 bytes Automatic instance created contents of Memory Script: { # set the until clause set until time "to_date('23-MAR-2010 13:36:00','DD-MON-YYYY HH24:MI:SS')"; # restore the controlfile restore clone controlfile; # mount the controlfile sql clone 'alter database mount clone database'; # archive current online log for tspitr to a resent until time sql 'alter system archive log current'; # avoid unnecessary autobackups for structural changes during TSPITR sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;'; # resync catalog after controlfile restore resync catalog; } executing Memory Script executing command: SET until clause Starting restore at 24-MAR-10 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=39 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 +FLASH/edbtest/autobackup/2010_03_23/s_714403881.525.714403883 channel ORA_AUX_DISK_1: piece handle=+FLASH/edbtest/autobackup/2010_03_23/s_714403881.525.714403883 tag=TAG20100323T133121 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07 output file name=C:\EDBTEST2_BACKUP\ORADATA\AUXDEST\CNTRL_TSPITR_EDBTEST_SRMK.F Finished restore at 24-MAR-10 sql statement: alter database mount clone database sql statement: alter system archive log current sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end; starting full resync of recovery catalog full resync complete contents of Memory Script: { # generated tablespace point-in-time recovery script # set the until clause set until time "to_date('23-MAR-2010 13:36:00','DD-MON-YYYY HH24:MI:SS')"; # set a destination filename for restore set newname for datafile 1 to "+DATA"; # set a destination filename for restore set newname for datafile 3 to "+DATA"; # set a destination filename for restore set newname for datafile 4 to "+DATA"; # set a destination filename for restore set newname for datafile 2 to "+DATA"; # set an omf destination tempfile set newname for clone tempfile 1 to new; # set a destination filename for restore set newname for datafile 21 to "+DATA/edbtest/datafile/ramans.285.714403881"; # rename all tempfiles switch clone tempfile all; # restore the tablespaces in the recovery set plus the auxiliary tablespaces restore clone datafile 1, 3, 4, 2, 21; switch clone datafile all; #online the datafiles restored or flipped sql clone "alter database datafile 1 online"; #online the datafiles restored or flipped sql clone "alter database datafile 3 online"; #online the datafiles restored or flipped sql clone "alter database datafile 4 online"; #online the datafiles restored or flipped sql clone "alter database datafile 2 online"; #online the datafiles restored or flipped sql clone "alter database datafile 21 online"; # make the controlfile point at the restored datafiles, then recover them recover clone database tablespace "RAMANS", "SYSTEM", "UNDOTBS1", "UNDOTBS2", "SYSAUX" delete archivelog; alter clone database open resetlogs; } 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 executing command: SET NEWNAME renamed tempfile 1 to C:\EDBTEST2_BACKUP\ORADATA\AUXDEST\TSPITR_EDBTEST_SRMK\DATAFILE\O1_MF_TEMP_%U_.TMP in control file Starting restore at 24-MAR-10 using channel ORA_AUX_DISK_1 creating datafile file number=21 name=+DATA/edbtest/datafile/ramans.285.714403881 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 +DATA channel ORA_AUX_DISK_1: restoring datafile 00003 to +DATA channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA channel ORA_AUX_DISK_1: restoring datafile 00002 to +DATA channel ORA_AUX_DISK_1: reading from backup piece +FLASH/edbtest/backupset/2010_03_23/nnndn0_tag20100323t120356_0.502.714398639 channel ORA_AUX_DISK_1: piece handle=+FLASH/edbtest/backupset/2010_03_23/nnndn0_tag20100323t120356_0.502.714398639 tag=TAG20100323T120356 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:09:15 Finished restore at 24-MAR-10 datafile 1 switched to datafile copy input datafile copy RECID=5 STAMP=714493490 file name=+DATA/tspitr_edbtest_srmk/datafile/system.283.714492973 datafile 2 switched to datafile copy input datafile copy RECID=6 STAMP=714493490 file name=+DATA/tspitr_edbtest_srmk/datafile/sysaux.289.714492949 datafile 3 switched to datafile copy input datafile copy RECID=7 STAMP=714493490 file name=+DATA/tspitr_edbtest_srmk/datafile/undotbs1.287.714492935 datafile 4 switched to datafile copy input datafile copy RECID=8 STAMP=714493491 file name=+DATA/tspitr_edbtest_srmk/datafile/undotbs2.288.714492943 sql statement: alter database datafile 1 online sql statement: alter database datafile 3 online sql statement: alter database datafile 4 online sql statement: alter database datafile 2 online sql statement: alter database datafile 21 online Starting recover at 24-MAR-10 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: starting incremental datafile backup set restore channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set destination for restore of datafile 00001: +DATA/tspitr_edbtest_srmk/datafile/system.283.714492973 destination for restore of datafile 00003: +DATA/tspitr_edbtest_srmk/datafile/undotbs1.287.714492935 destination for restore of datafile 00004: +DATA/tspitr_edbtest_srmk/datafile/undotbs2.288.714492943 destination for restore of datafile 00002: +DATA/tspitr_edbtest_srmk/datafile/sysaux.289.714492949 channel ORA_AUX_DISK_1: reading from backup piece +FLASH/edbtest/backupset/2010_03_23/nnndn1_tag20100323t124021_0.514.714400821 channel ORA_AUX_DISK_1: piece handle=+FLASH/edbtest/backupset/2010_03_23/nnndn1_tag20100323t124021_0.514.714400821 tag=TAG20100323T124021 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 starting media recovery archived log for thread 1 with sequence 316 is already on disk as file +FLASH/edbtest/archivelog/2010_03_23/thread_1_seq_316.734.714405211 archived log for thread 2 with sequence 207 is already on disk as file +FLASH/edbtest/archivelog/2010_03_23/thread_2_seq_207.733.714405211 archived log file name=+FLASH/edbtest/archivelog/2010_03_23/thread_2_seq_207.733.714405211 thread=2 sequence=207 archived log file name=+FLASH/edbtest/archivelog/2010_03_23/thread_1_seq_316.734.714405211 thread=1 sequence=316 media recovery complete, elapsed time: 00:00:02 Finished recover at 24-MAR-10 database opened contents of Memory Script: { # export the tablespaces in the recovery set host 'exp userid = '********' point_in_time_recover=y tablespaces= RAMANS file= tspitr_a.dmp'; # shutdown clone before import shutdown clone immediate # import the tablespaces in the recovery set host 'imp userid = '********' point_in_time_recover=y file=tspitr_a.dmp'; # online/offline the tablespace imported sql "alter tablespace RAMANS online"; sql "alter tablespace RAMANS offline"; # enable autobackups in case user does open resetlogs from RMAN after TSPITR sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;'; # resync catalog after tspitr finished resync catalog; } executing Memory Script Export: Release 11.1.0.7.0 - Production on Wed Mar 24 14:25:51 2010 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. EXP-00056: ORACLE error 604 encountered ORA-00604: error occurred at recursive SQL level 3 ORA-04031: unable to allocate 88 bytes of shared memory ("shared pool","select /*+ rule */ bucket_cn...","sql area","opn: qkexrInitOpn") EXP-00000: Export terminated unsuccessfully host command complete Removing automatic instance shutting down automatic instance RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 03/24/2010 14:26:09 RMAN-06136: ORACLE error from auxiliary database: ORA-04031: unable to allocate 544 bytes of shared memory ("shared pool","DBMS_BACKUP_RESTORE","PL/SQL DIANA"," PAR.C:parapt:Page") RMAN-03015: error occurred in stored script Memory Script RMAN-06136: ORACLE error from auxiliary database: ORA-04031: unable to allocate 1056 bytes of shared memory ("shared pool","DBMS_BACKUP_RESTORE","PL/SQL DIANA", "PAR.C:parapt:Page") RMAN>
There is always a problem with error ORA-04031 in 32 bit OS. However, it comes to Database 11G, then I would say to let oracle manage the pool rather doing this bu yourself. I would suggect to remove all manually allocation pool and 1 single value memory_target parameter and restart the database. Oracle MSA will take care of the rest.
-
RMAN-06034: at least 1 channel must be distributed to run this command
Hello
I'm trying to restore rman backup archives logs, but the rman fails with the error below, any help would be appreciated.
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 2009-06-24 09:48:05
RMAN-03002: failure during the compilation of command
RMAN-03013: type command: restore
RMAN-03002: failure during the compilation of command
RMAN-03013: order type: HAKIMOUSS
RMAN-06034: at least 1 channel must be distributed to run this command
RMAN script
-----------------
connect target xxxx
Connect catalog xxxx
connection Assistant xxxx
Run {}
allocate auxiliary channel t1b type 'SBT_TAPE' parms trace 'ENV = (NSR_CLIENT = xxxx, NSR_SERVER = xxxx, NSR_DATA_VOLUME_POOL = ultrium)' 5.
allocate auxiliary channel t2b type 'SBT_TAPE' parms trace 'ENV = (NSR_CLIENT = xxxx, NSR_SERVER = xxxx, NSR_DATA_VOLUME_POOL = ultrium)' 5.
allocate auxiliary channel t3b type 'SBT_TAPE' parms trace 'ENV = (NSR_CLIENT = xxxx, NSR_SERVER = xxxx, NSR_DATA_VOLUME_POOL = ultrium)' 5.
allocate auxiliary channel t4b type 'SBT_TAPE' parms trace 'ENV = (NSR_CLIENT = xxxx, NSR_SERVER = xxxx, NSR_DATA_VOLUME_POOL = ultrium)' 5.
Restore logseq archivelog = 145200 until logseq = 145204;
output channel t1b.
output channel t2b;
output channel t3b;
output channel t4b.
#
}You open a large number of auxiliary channels in your unknown database and OS environment. Auxiliary bodies are necessary for creation of duplicate/Eve/TSPITR tasks, but not necessary to restore something to the database target. Remove all the auxiliary elements of the script.
Werner
-
RMAN control file backup and restore: help needed
Hello guys,.
I am new to RMAN and run RMAN for BACKUP scripts.
Run {}
CONFIGURE REDUNDANCY 1 RETENTION STRATEGY;
SET UP THE DEVICE TYPE DISK PARALLELISM 2 TYPE OF BACKUP BACKUPSET.
backup in compressed format additional effective backupset 0 database tag 'TEST_FULL_BACKUP' '$RMAN_BACKUP/datafiles_backup/bkp_${DD}/%d_%s_%p ';
Backup to compressed backupset archivelog all not saved both 1 FORMAT "$RMAN_BACKUP/arch_backup/bkp_${DD}/ARCH_%d_%s_%p".
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK to '$RMAN_BACKUP/controlfile_backup/bkp_${DD}/%F ';
delete noprompt obsolete;
delete noprompt archivelog all completed before ' sysdate-2';
}
I can see the data file and archieve files backup
$RMAN_BACKUP/datafiles_backup/bkp_${DD}/%d_%s_%p';
'$RMAN_BACKUP/arch_backup/bkp_${DD}/ARCH_%d_%s_%p ';
But control missing in "$RMAN_BACKUP/controlfile_backup/bkp_${DD}/%F";
What is the problem with my order... Help, please
S
RMAN > list backup of controlfile;
-
Only the unused blocks backup RMAN as well?
DB version: 11.2.0.4
OS: RHEL 6.6
If I remember correctly, RMAN backs up only used blocks. I created a tablespace of 20 GB, as shown below. When I backed up, the backup piece is only 4MB in size, as shown below.
SQL > create tablespace TEST_TS3 datafile '+ DATA_DG' size 20 G
autoextend on
MaxSize 32767 m
Local extended management
single 4 M size
Auto segment space management;
Created tablespace.
SQL >
SQL > select tablespace_name, bytes/1024/1024 of dba_Data_Files where nom_tablespace = 'TEST_TS3 ';
BYTES/1024/1024 NOM_TABLESPACE
------------------------------ ---------------
TEST_TS3 20480
Backup tablespace TEST_TS3 that is not used by all segments (empty)
RMAN > backup tablespace TEST_TS3 format='/u05/RMAN_BKP/TBS_%U_%T.rmbk' tag = TEST_TS3_BKP;
From 18 February 16 backup
using the control file of the target instead of recovery catalog database
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID = 4941 instance = HMAGPRD2 = DISK device type
channel ORA_DISK_1: starting full datafile from backup set
channel ORA_DISK_1: specifying datafile (s) in the backup set
Enter a number of file datafile = name=+DATA_DG/hmagprd2/datafile/test_ts3.413.904152141 00144
channel ORA_DISK_1: starting piece 1-18 February 16
channel ORA_DISK_1: finished piece 1-18 February 16
piece handle=/u05/RMAN_BKP/TBS_03qu8hg2_1_1_20160218.rmbk tag = TEST_TS3_BKP comment = NONE
channel ORA_DISK_1: complete set of backups, time: 00:00:01
Backup finished on 18 February 16
$
$ ls - lh /u05/RMAN_BKP/TBS_03qu8hg2_1_1_20160218.rmbk
-rw - r - 1 oracle oinstall 4.1 M 18 Feb 17:29 /u05/RMAN_BKP/TBS_03qu8hg2_1_1_20160218.rmbk
But in the world of real output, size of the RMAN backups seems to be much higher.
The following production DB is 27.5 terabytes in size as evidenced by the physical layer (DBA_DATA_FILES. Column of BYTES)
SQL > select sum(bytes/1024/1024/1024) bytesGB from dba_Data_Files;
BYTESGB
----------
27885.3252
But at the level of the logic layer, the used space is only 16.5 TB as evidenced by DBA_EXTENTS. BYTES column
SQL > select sum(bytes/1024/1024/1024) bytesGB from dba_extents.
BYTESGB
----------
16621.316
But the size of RMAN backup came to 20 terabytes , become almost 4TB that space consumed at the level of the logical layer (DBA_EXTENTS. BYTES).
Why is this?
RMAN jump blocks that have never been used. If a block has been used in the past, it will be included in the same backup if currently is not used:
https://docs.Oracle.com/CD/B28359_01/backup.111/b28270/rcmcncpt.htm
Compression for backup sets
When you back up the data files of backup sets, RMAN can use unused block compression to skip blocks of data file. RMAN always ignores blocks that have never been used. Under certain conditions, which are listed in the
BACKUP AS BACKUPSET
entry in reference Oracle database backup and recovery, RMAN also ignores the blocks that are not currently used. Data file backup sets are generally smaller than copies of data file and take less time to write. Compression of the unused block is fundamental to how RMAN writes files of data in backup items and cannot be disabled. -
What is the command to view the Configuration of RMAN
What is the command to view the Configuration of RMAN
in oracle 11g R2
Hello
You have to look in the documentation?
The SHOW ALL command will show you the configuration. Is that what you're looking for?
-
backup rman design database with phsical ensures
Hello
12 c database, after physical expectation is created, I need backup rman configuration,
The goal is: a) backup of database b) remove archivelogs that have been backed up, free up space FRA.
Design as below:
1:
in RMAN (primary and standby):
RMAN >
Configure controlfile autobackup on;
set the type of backup device type disk compressed backupset;
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
2: primary school:
RMAN > CONFIGURE RETENTION POLICY to the 5 DAY RECOVERY WINDOW;3: in priamry, turn on track changes to block
4: primary, implemented since rman level 0 (full backup) on Sunday.
5: in the primary, the installation program rman level 1 backup from Monday to Saturday.
6: primary, set up since rman "save archive backup delete them all obsolete" every hour;
questions here:
1. as in step 5, for the protection of the o and delete archivelog, the script using:
Run {}
allocate channel d1 type disk;
SQL 'alter system archive log current';
overlap archivelog all;
backup AS COMPRESSED BACKUPSET archivelog all delete them all input;
output channel d1;
}I wonder if ' archivelog all delete all entries "will delete archivelog which was not taken on the eve of the database and broken standby database
(hanging and out-of-sync with primary)... it is a concern, is that possible?
2. If the primary database crashed, failover to standby mode, then restore/recovery primary, switch back to the primary, this design is just? If you have any good suggestions, please let me know.
(to put it simply, I don't want to full/incremental backup to install standby, primary server CPU is good enough)
Thank you very much!
A few brief notes worth a visit:
Based on Oracle 11 g Data Guard for the backup database and restore
Standby database using RMAN
http://Arup.blogspot.com/2007/07/standby-database-using-RMAN.html
Best regards
mseberg
-
change the configuration of rman in Data Guard envrionemnt
Hello
can I change configuration rman on primary and standby without having to stop the replication or swtich?
the changes are replicated or I have to manually change the two sides? (and what does it matter if im using catlaog or not?)
v11g
Thank you
The changes apply only to primary and standby databases, do not need to change or stop.
So I highly recommend to read: https://docs.oracle.com/cd/E11882_01/server.112/e41134/rman.htm#SBYDB04700
Maybe you are looking for
-
Why bookmarks are not saved as a URL (?) simple
as a bookmark is essentially just a URL, I do not understand why firefox decided to record an additional agreement of information associated with each bookmark (it easily seen if the "export bookmarks as html" option is elected, and this file is insp
-
On Satellite S2800-200 HARD drive replacement
I have a Satellite S2800-200 and the hard drive just died.What can I replace the drive with?I looked at the Samsung MP0402H 40 GB hard drive, it will be ok or should it be a special player or some interface?Thank you
-
Custom storage profile-HDS.
Could someone explain the process to apply the profile storage custom volume to the compellent?.
-
Difference between Windows 7 Product Key and product I.D.
Bought the new laptop HP with Win7 Home Premium installed. During the initial install verified box to authenticate when online. Never entered my product key and now two weeks later, curious to know if my windows has been authenticated. Went to the co
-
Migration of selective users between servers in unit's network
Is there a good way to migrate subscribers to a server from the unit to the other, because they are related in the same directory and message store and are already "networked" in terms of seeing each and other subscribers? The application here is for