Slow Restore of a Compressed Backup
All,
I am seeing a strange behavior when restoring a compressed backup for standby duplication.
The target and auzillary database version is 11.1.0.6 Enterprise Edition
The size of the database uncompressed is 131.41G
The Size of the compressed Full Backup is 58.21G
The Duplication script is as follows:
run {
SET NEWNAME FOR DATAFILE 1 TO '+DGROUPDATA1';
SET NEWNAME FOR DATAFILE 10 TO '+DGROUPDATA1';
SET NEWNAME FOR DATAFILE 100 TO '+DGROUPS1V1';
SET NEWNAME FOR DATAFILE 101 TO '+DGROUPS1V1';
SET NEWNAME FOR DATAFILE 102 TO '+DGROUPS1V1';
DUPLICATE TARGET DATABASE FOR STANDBY
NOFILENAMECHECK;
From the alert log on the standby during the recovery process I see that a 4GB file recovery takes a little more than an hour:
Full restore complete of datafile 66 to datafile copy +DGROUPRPRTRDATA1/mpstndby/datafile/reporter_data1.269.676544573. Elapsed time: 1:03:45
Is there anyway to speed up the recovery process from a compressed backup?
Thanks,
Robert
It would seem that i have plenty of resources, but i think that i may have a bigger issue.
I am using defaults for filesperset and using just one channel.
The restore process is also failing to execute the final step of the duplication.
contents of Memory Script:
switch clone datafile all;
executing Memory Script
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN> **end-of-file**
RMAN>
so now not only do i have a slow restore but i have a restore that hasnt switched the files. So the database is in a very angry and confused state becasue it obviously doesnt know what the new names of the files are.
Thanks for your help to date
Similar Messages
-
Restoring from RMAN tablespace backup ; Few questions
11.2.0.3/RHEL 5.8
We have a RAC DB which is used by more than 20 applications. One schema for each application and one tablespace for each schema.
We have a schema with 130gb in size. All Objects in this schema use a single tablespace MCS_DATA.
This weekend we are applying some changes involving DDL, Code and Data .Usually we take an expdp backup of the schema before the activity starts and later if something goes wrong with script deployment we'll revert to old state by dropping the schema and doing an impdp from the expdp backup.
Question1.
Can we do an RMAN tablespace only backup and if something goes wrong with script deployment can we drop the schema and the tablespace and then create an empty schema and then restore from the tablespace backup ?
Question2.
If the above is possible , can you explain how it is going to work out because we are essentially plugging (restore,recover) in a tablespace to the database. Any potential problems ?
Question3. If the above (Question1) is possible, will restore/recover of this tablespace require a downtime for the entire DB ?Tom;
If you are talking about RMAN TSPITR then yes you can. See - Purpose of RMAN TSPTIR in Backup and Recovery User's Guide E10642-03.
The problem with TSPTIR is bulk. You need a lot of disk space to create a copy and then data pump the information out and back in. I just tested this on 11.2.0.3 and its slow. RMAN created a script which produced an AUX instance and did the data pump, but I had clean up afterwards. If it errors out you can have an AUX instance hanging out in the background.
For TSPTIR you will need an area on the disk to server as an auxiliary destination large enough to hold what you are recovering plus the SYSTEM, UNDO and TEMP tablespaces.
I would probably look at Transportable tablespaces as a possible option too.
http://docs.oracle.com/cd/E25054_01/backup.1111/e10642/rcmttbsb.htm
E10642-03 has a section for recovering a tablespace in chapter 2. The Tablespace must be offline, but the database can be up.
This uses "restore tablespace" and "recover tablespace" commands. You would perform this type of recovery when you are say missing a datafile. You can recover any tablespace except SYSTEM and UNDO with this.
Data Pump might be an option too, but given your tablespace size I would have worries about recovery time. Oracle lets you set compression
and a limit to each file produced.
expdp TABLESPACES=YOUR_DATA dumpfile=DATA_PUMP_DIR:ts_dumps_%U.dmp LOGFILE=DATA_PUMP_DIR:ts_dumps_log.log parallel=2 filesize=10G compression=ALL
Given the size of your database a better option might be something like Data Guard as your recovery time would be brutal.
Best Regards
mseberg -
Can not restore data files from backup set
I am trying to restore Server A's backup data to Server B (they are all oracle11g) using rman. The restore commands is below:
rman target /;
shutdown immediate;
startup nomount;
restore controlfile from '/usr/local/oracle/backup/20100418/ctl_xxx'
alter database mount;
catalog start with '/usr/local/oracle/backup/20100418/';
restore database;
recover database;
alter database open resetlogs;
For the first time, it works. But when i tried to restore another backup data by the same way:
rman target /;
shutdown immediate;
startup nomount;
restore controlfile from '/usr/local/oracle/backup/20100425/ctl_xxx'
alter database mount;
catalog start with '/usr/local/oracle/backup/20100425/';
restore database;
recover database;
alter database open resetlogs;
The second time, i found that rman restore the old backup data, which means that it restore the data file under '/usr/local/oracle/backup/20100418/' instead of '/usr/local/oracle/backup/20100425/'.
So I run 'list backup of database summary' to see the backup set lists in control file.
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
910 B 0 A DISK 18-APR-10 1 1 NO TAG20100418T020007
945 B 0 A DISK 25-APR-10 1 1 NO TAG20100425T020007
But when i run ‘restore database preview summary’ to see the backup set list to restore
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
910 B 0 A DISK 18-APR-10 1 1 NO TAG20100418T020007
there's no backup set 945 at all. that's why i could not restore data file under '/usr/local/oracle/backup/20100425/' at the second time.
So, why two backup list is different ? how can i restore datafile under '/usr/local/oracle/backup/20100425/' ?
My backup script is below:
run{
allocate channel c1 type disk;
backup incremental level 0 as backupset format '$DIR/`date +%Y%m%d`/data_%d_c0_%T_%u' database;
sql 'alter system archive log current';
backup archivelog from time 'sysdate-14' format '$DIR/`date +%Y%m%d`/log_%d_%T_%u';
backup current controlfile format '$DIR/`date +%Y%m%d`/ctl_%d_%T_%I_%u';
release channel c1;
Thanks
Edited by: user13055376 on 2010-4-29 上午1:20yeah, I am sure Tag: TAG20100425T020007 exists
RMAN> list backupset 945;
List of Backup Sets
BS Key Type LV Size Device Type Elapsed Time Completion Time
945 Incr 0 6.40G DISK 00:05:46 25-APR-10
BP Key: 945 Status: AVAILABLE Compressed: NO Tag: TAG20100425T020007
Piece Name: /usr/local/oracle/backup/20100425/data_QIANGL_c0_20100425_thlbvjt7
List of Datafiles in backup set 945
File LV Type Ckp SCN Ckp Time Name
1 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/system01.dbf
2 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/sysaux01.dbf
3 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/undotbs01.dbf
4 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/users01.dbf
5 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/dict01.dbf
6 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/support01.dbf
7 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/supportindex01.dbf
8 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/log01.dbf
9 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/logindex01.dbf
10 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/lobindex01.dbf
11 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/data01.dbf
12 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/indexes01.dbf
13 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/image001.dbf
14 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/tongbuimage001.dbf
15 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/imagebackup001.dbf
My purpose is to use the newest backupset of Server A to update Server B. So if Server A crush, Server B will be useful. Is there any other way to do that ?
retention policy :'configure retention policy to redundancy 4'
And Server A do LV0 backup every 7 day, and do LV1 backup ervery other day.
Edited by: user13055376 on 2010-4-29 上午3:45 -
Restore spfile from rman backup ---- error.
Hi,
I am trying to execute recovery on new machine ...
I have done the following steps..
I have one database as ora10g2 as peroduction database on one machine as hosta
I have created a catalog on another machine cora10g2 (hostb)
I have taken a full backup from hosta as per following ...
the following command execute from hosta machine.
$ rman target sys/<passwd>@ora10g2 catalog rman/rman@cora10g2 ...
Backup completed ...
Now I am trying to restore this backup on hostb machine where i have already rman catlog database ..
I have done the following setting ...on host b
set oracle_sid=DUP
and execute following command ...
rman target / catalog rman/rman@cora10g2
RMAN> set dbid 2760732370
executing command: SET DBID
database name is "BAAN10G2" and DBID is 2760732370
RMAN>
RMAN>
RMAN> startup force nomount ;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/dbs/baan10g2/dbs/initbaan10g2.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1977112 bytes
Variable Size 67114216 bytes
Database Buffers 83886080 bytes
Redo Buffers 6406144 bytes
RMAN>
RMAN>
RMAN>
RMAN> show all ;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rman/backup/control/cntrl_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/baanora3/rman/ora10g2/bkup_db_%d_s%s_P%p_t%t' MAXPIECESIZE 1024;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
RMAN>
RMAN>
RMAN> list backup of spfile ;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
2420 Full 7.33M DISK 00:00:01 14-JUN-07
BP Key: 2426 Status: AVAILABLE Compressed: NO Tag: TAG20070614T182935
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070614-00
SPFILE Included: Modification time: 14-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2509 Full 7.33M DISK 00:00:01 15-JUN-07
BP Key: 2515 Status: AVAILABLE Compressed: NO Tag: TAG20070615T130416
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070615-00
SPFILE Included: Modification time: 15-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2694 Full 7.33M DISK 00:00:01 15-JUN-07
BP Key: 2739 Status: AVAILABLE Compressed: NO Tag: TAG20070615T131703
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070615-01
SPFILE Included: Modification time: 15-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2760 Full 80.00K DISK 00:00:01 15-JUN-07
BP Key: 2763 Status: AVAILABLE Compressed: NO Tag: TAG20070615T163437
Piece Name: /rman/spfile/spfile.ora
SPFILE Included: Modification time: 15-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2769 Full 7.33M DISK 00:00:02 15-JUN-07
BP Key: 2771 Status: AVAILABLE Compressed: NO Tag: TAG20070615T163441
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070615-02
SPFILE Included: Modification time: 15-JUN-07
RMAN>
RMAN>
RMAN> restore spfile from autobackup ;
Starting restore at 19-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=35 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=34 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=33 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20070619
channel ORA_DISK_1: looking for autobackup on day: 20070618
channel ORA_DISK_1: looking for autobackup on day: 20070617
channel ORA_DISK_1: looking for autobackup on day: 20070616
channel ORA_DISK_1: looking for autobackup on day: 20070615
channel ORA_DISK_1: looking for autobackup on day: 20070614
channel ORA_DISK_1: looking for autobackup on day: 20070613
channel ORA_DISK_1: no autobackup in 7 days found
channel ORA_DISK_2: looking for autobackup on day: 20070619
channel ORA_DISK_2: looking for autobackup on day: 20070618
channel ORA_DISK_2: looking for autobackup on day: 20070617
channel ORA_DISK_2: looking for autobackup on day: 20070616
channel ORA_DISK_2: looking for autobackup on day: 20070615
channel ORA_DISK_2: looking for autobackup on day: 20070614
channel ORA_DISK_2: looking for autobackup on day: 20070613
channel ORA_DISK_2: no autobackup in 7 days found
channel ORA_DISK_3: looking for autobackup on day: 20070619
channel ORA_DISK_3: looking for autobackup on day: 20070618
channel ORA_DISK_3: looking for autobackup on day: 20070617
channel ORA_DISK_3: looking for autobackup on day: 20070616
channel ORA_DISK_3: looking for autobackup on day: 20070615
channel ORA_DISK_3: looking for autobackup on day: 20070614
channel ORA_DISK_3: looking for autobackup on day: 20070613
channel ORA_DISK_3: no autobackup in 7 days found
channel ORA_DISK_4: looking for autobackup on day: 20070619
channel ORA_DISK_4: looking for autobackup on day: 20070618
channel ORA_DISK_4: looking for autobackup on day: 20070617
channel ORA_DISK_4: looking for autobackup on day: 20070616
channel ORA_DISK_4: looking for autobackup on day: 20070615
channel ORA_DISK_4: looking for autobackup on day: 20070614
channel ORA_DISK_4: looking for autobackup on day: 20070613
channel ORA_DISK_4: no autobackup in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/19/2007 18:00:13
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
RMAN>
I am not able to restore spfile from rman backup ;;;Hi,
I would like to know few things
1. How are you setting the db_name ? you can set db_id at RMAN, how are you setting the db_name ?
2. Do you have any default init file at default location ? if yes, is the db_name parameter set correctly in that file ?
Since spfile is yet to be restored, you must set the db_name parameter correctly before you start spfile restore.This can be done with init file at default location which can even contain just one paremeter i.e db_name. -
How to restore SAP Business One Backup?
Hi all,
When I schedule SAP Business One Backup using Server tools, it creating compressed backup file. This contest of compressed file having .BU extension.
Now my qeestion is how do I restore this backup file?
Thanks in advance
B Ravi ShankarHello,
Open SQL Server Management Studio (SQL 2005) or Enterprise Manager (SQL 2000). You could directly restore the backup of the database but you must create new database first where its mdf and log files are located in the certain folder or data folder of SQL server and then restore the BU database by right click on the new database name > Tasks > Restore..Database and select your backup file from its location. On the Restore Database Screen. Check the Restore box and in the Options check "Overwrite the existing database". you must also check if the location is correct.
If you have had olde database and just want to restore the new database from other server to old one, you could directly restore.
Rgds, -
How to restore a database from backup taken in standby database
Its our environment standard to run backup in standby database.
Now we have to perform refresh production database to UAT database.
I have performed normal refresh/duplicate. Is there any additional procedures need to be followed to perform refresh from standby database backupRMAN Restoration to New Server with Different Directory and New Database Name
In this case, I have an existing production database with RMAN Level 0 backup:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\flash_recovery_area\galaxy\backupsets\autobackup\SAMSUNG-ctl_%F';
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'C:\flash_recovery_area\galaxy\backupsets\level0\level0-%d-%T-%U' MAXPIECESIZE 4G;
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE - 7';
SHOW ALL;
REPORT SCHEMA;
LIST BACKUP OF DATABASE;
REPORT NEED BACKUP;
REPORT UNRECOVERABLE;
LIST EXPIRED BACKUP BY FILE;
LIST ARCHIVELOG ALL;
REPORT OBSOLETE;
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK COPY OF ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
RUN {
sql 'alter system archive log current';
BACKUP INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG DELETE INPUT;
LIST BACKUP OF DATABASE;
REPORT NEED BACKUP;
REPORT UNRECOVERABLE;
LIST EXPIRED BACKUP BY FILE;
LIST ARCHIVELOG ALL;
REPORT OBSOLETE;
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK COPY OF ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
The backupsets will be restored into a new server with different file structure. The database will also be different. In the new server, I have created a blank database (SID or CUSTOM database with the name DBGRID). This is easier so I won't have to create any directories, user ORADIM or create new PWFile.
This document assumes that a blank (starter) database has been created in the new server. The RDBMS version is the same as the source database.
In this example, the source database name is GALAXY and the target database name is DBGRID.
Let me know if you have any feedback or comments. All I want is to share these steps with you and make it better so we can help other DBA's as well.
Steps start here
-->
ORIGINAL DATABASE: GALAXY
DUPLICATE DATABASE: DBGRID
FROM THE SOURCE DATABASE (GALAXY)
1. Backup the database using RMAN incremental backups.
2. Check the RMAN logs generated and look for the result of the command:
C:\Users\Administrator>set ORACLE_SID=GALAXY
C:\Users\Administrator>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 06:55:08 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: GALAXY (DBID=3578870300)
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name GALAXY
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
1 680 SYSTEM *** C:\ORACLE\ORADATA\GALAXY\SYSTEM01.DBF
2 510 SYSAUX *** C:\ORACLE\ORADATA\GALAXY\SYSAUX01.DBF
3 140 UNDOTBS1 *** C:\ORACLE\ORADATA\GALAXY\UNDOTBS01.DBF
4 5 USERS *** C:\ORACLE\ORADATA\GALAXY\USERS01.DBF
5 106 EXAMPLE *** C:\ORACLE\ORADATA\GALAXY\EXAMPLE01.DBF
6 2048 ALLINDEX *** C:\ORACLE\ORADATA\GALAXY\ALLINDEX01.DBF
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
1 29 TEMP 32767 C:\ORACLE\ORADATA\GALAXY\TEMP01.DBF
This command shows all the physical database files that will be backed-up by the current RMAN job.
List the online redolog files:
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
3 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG NO
3 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG NO
2 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG NO
2 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG NO
1 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG NO
1 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG NO
6 rows selected.
3. Since the target server has different structure, it is easier to use a pfile to startup the database rather than restoring the spfile from backup.
C:\Users\Administrator>set ORACLE_SID=GALAXY
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 06:56:14 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create pfile='C:\TEMP\initGALAXYrman.ora' from spfile;
File created.
4. Edit the pfile to have the following parameters:
(These parameters has been edited to fit the target database requirements)
galaxy entries has been changed to dbgrid. Directories has been corrected as well.
dbgrid.__db_cache_size=192937984
dbgrid.__java_pool_size=4194304
dbgrid.__large_pool_size=4194304
dbgrid.__oracle_base='D:\app\Administrator'#ORACLE_BASE set from environment
dbgrid.__pga_aggregate_target=281018368
dbgrid.__sga_target=524288000
dbgrid.__shared_io_pool_size=0
dbgrid.__shared_pool_size=301989888
dbgrid.__streams_pool_size=4194304
*.audit_file_dest='D:\app\Administrator\admin\DBGRID\adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='D:\oradata\DBGRID\control01.ctl','D:\oradata\DBGRID\control02.ctl'
*.db_block_size=8192
*.db_domain=''
Leave as it is for now --> *.db_name='GALAXY'
*.db_recovery_file_dest='D:\fra\backupsets\duplicate'
*.DB_RECOVERY_FILE_DEST_SIZE=4G
*.diagnostic_dest='D:\app\Administrator'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DBGRIDXDB)'
*.job_queue_processes=1000
*.log_archive_dest_1='location=D:\fra\backupsets\archs'
*.log_buffer=10485760
*.memory_target=805306368
*.open_cursors=300
*.processes=800
*.remote_login_passwordfile='EXCLUSIVE'
*.session_cached_cursors=300
*.sessions=885
*.undo_tablespace='UNDOTBS1'
Make sure that all the directory values in this edited pfile are existing in the target server.
5. Copy all the RMAN backup pieces generated in the source database. Transfer the edited pfile as well. Make sure that all directories presented in the pfile exists in the target server.
In this example, RMAN backupsets are located at:
Backupsets:
Level0 and Level1 = D:\fra\backupsets\duplicate\level0 , D:\fra\backupsets\duplicate\level1
Controlfile and Spfile Autobackup = D:\fra\backupsets\duplicate\autobackup
Edited pfile initGALAXYrman= C:\TEMP\initDBGRIDnew.ora
FROM THE TARGET DATABASE (DBGRID)
6. Connect to RMAN and perform database duplication using RMAN backup restoration
C:\Users\Administrator>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 07:26:45 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> set dbid = 3578870300; --> THIS IS THE DBID OF THE SOURCE DATABASE!
executing command: SET DBID
RMAN> startup nomount pfile='C:\TEMP\initDBGRIDnew.ora'; -->restore the edited pfile
Oracle instance started
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 327156176 bytes
Database Buffers 192937984 bytes
Redo Buffers 14192640 bytes
RMAN> restore controlfile from 'D:\fra\backupsets\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00'; -->restore the correct controlfile
Starting restore at 01-AUG-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output file name=D:\ORADATA\DBGRID\CONTROL01.CTL
output file name=D:\ORADATA\DBGRID\CONTROL02.CTL
Finished restore at 01-AUG-12
RMAN> alter database mount; -->mount the database
database mounted
released channel: ORA_DISK_1
RMAN> catalog start with "D:\fra\backupsets\duplicate";
--> catalog the location of the backup pieces to make it known to the control file
Starting implicit crosscheck backup at 01-AUG-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
Crosschecked 3 objects
Finished implicit crosscheck backup at 01-AUG-12
Starting implicit crosscheck copy at 01-AUG-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 01-AUG-12
searching for all files in the recovery area
cataloging files...
no files cataloged
searching for all files that match the pattern D:\fra\backupsets\duplicate
List of Files Unknown to the Database
=====================================
File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
RMAN> list backup summary; -->check your backup they are now known
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
1 B A A DISK 01-AUG-12 1 2 NO TAG20120801T011054
2 B 0 A DISK 01-AUG-12 1 2 NO TAG20120801T011137
3 B A A DISK 01-AUG-12 1 2 NO TAG20120801T011405
RMAN> list archivelog all; -->list you archivelog for point in time recovery
List of Archived Log Copies for database with db_unique_name GALAXY
=====================================================================
Key Thrd Seq S Low Time
26 1 29 A 01-AUG-12
Name: D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
Perform database restoration and recovery. The sequence number is Seq+1 for complete recovery, so that will be 29 + 1 = 30. You can also do recovery via SCN or time based recovery.
Remember in the previous step: RMAN> REPORT SCHEMA;
Each datafile has a corresponding datafile number.
Follow the format to convert them into their respective new restoration directory in the target server.
SET NEWNAME has the format:
SET NEWNAME FOR DATAFILE [FILE NUMBER IN THE REPORT SCHEMA COMMAND] TO
‘[NEW LOCATION AND FILENAME OF THE DATAFILES]’;
RMAN> run {
2> SET UNTIL SEQUENCE 30 THREAD 1;
3> set newname for datafile 1 to 'D:\oradbgrid\oradata\SYSTEM01.DBF';
4> set newname for datafile 2 to 'D:\oradbgrid\oradata\SYSAUX01.DBF';
5> set newname for datafile 3 to 'D:\oradbgrid\oradata\UNDOTBS01.DBF';
6> set newname for datafile 4 to 'D:\oradbgrid\oradata\USERS01.DBF';
7> set newname for datafile 5 to 'D:\oradbgrid\oradata\EXAMPLE01.DBF';
8> set newname for datafile 6 to 'D:\oradbgrid\oradata\ALLINDEX01.DBF';
9> restore database;
10> switch datafile all;
11> recover database;
12> }
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
Starting restore at 01-AUG-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
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 D:\oradbgrid\oradata\SYSTEM01.DBF
channel ORA_DISK_1: restoring datafile 00002 to D:\oradbgrid\oradata\SYSAUX01.DBF
channel ORA_DISK_1: restoring datafile 00003 to D:\oradbgrid\oradata\UNDOTBS01.DBF
channel ORA_DISK_1: restoring datafile 00004 to D:\oradbgrid\oradata\USERS01.DBF
channel ORA_DISK_1: restoring datafile 00005 to D:\oradbgrid\oradata\EXAMPLE01.DBF
channel ORA_DISK_1: restoring datafile 00006 to D:\oradbgrid\oradata\ALLINDEX01.DBF
channel ORA_DISK_1: reading from backup piece D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
channel ORA_DISK_1: piece handle=D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1 tag=TAG20120801T011137
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:06
Finished restore at 01-AUG-12
Starting recover at 01-AUG-12
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 29 is already on disk as file D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
archived log file name=D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001 thread=1 sequence=29
media recovery complete, elapsed time: 00:00:01
Finished recover at 01-AUG-12
Log in to SQL*Plus to recreate the redolog files.
Format:
ALTER DATABASE RENAME FILE ‘[OLD REDOLOG LOCATION]’ TO ‘[NEW REDOLOG LOCATION]’;
C:\Users\Administrator>sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 08:54:27 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
dbgrid MOUNTED
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03B.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02B.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01B.LOG';
Database altered.
Open the database in resetlogs option. Create spfile from the edited pfile then bounce the database.
RMAN> alter database open resetlogs;
database opened
SQL> create spfile from pfile='C:\TEMP\initDBGRIDnew.ora';
File created.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 327156176 bytes
Database Buffers 192937984 bytes
Redo Buffers 14192640 bytes
Database mounted.
Database opened.
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
dbgrid OPEN
Create a new TEMP tablespace, make this as the new default temporary tablespace. Drop the old TEMP tablespace. Restart the database.
SQL> CREATE TEMPORARY TABLESPACE TEMP01 TEMPFILE 'D:\oradbgrid\oradata\TEMP0101.dbf' SIZE 200M;
Tablespace created.
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP01;
Database altered.
SQL> drop tablespace TEMP including contents and datafiles;
Tablespace dropped.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance sta -
Creating Standby From RMAN Compressed backup taken on Primary ....
I am creating a Standby from RMAN Compressed backup taken on Primary.
On Primary, I have taken Compressed backup as follows:
RMAN> run
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG format '/dboracle/orbit_pr_bkp/primary_%U';
backup current controlfile for standby format '/dboracle/orbit_pr_bkp/primary_cntl.bkp';
oracle@apl06635orbvu1:/dboracle/orbit_pr_bkp>ls -ltr
total 51652
-rw-r----- 1 oracle dba 11972608 Jan 7 13:45 primary_0tm1h32n_1_1
-rw-r----- 1 oracle dba 15762432 Jan 7 13:45 primary_0sm1h32n_1_1
-rw-r----- 1 oracle dba 16785920 Jan 7 13:45 primary_0rm1h32n_1_1
-rw-r----- 1 oracle dba 1088000 Jan 7 13:45 primary_0um1h32v_1_1
-rw-r----- 1 oracle dba 32768 Jan 7 13:45 primary_12m1h33r_1_1
-rw-r----- 1 oracle dba 7143424 Jan 7 13:47 primary_cntl.bkp
On Standby, I restored the control file as below:
RMAN> restore standby controlfile from '/dboracle/orbit_pr_bkp/primary_cntl.bkp';
Starting restore at 10-JAN-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output filename=/dboracle/orbit_dr/oradata/ORBIT_DR/controlfile/o1_mf_6lo6nwfr_.ctl
output filename=/dboracle/orbit_dr/flash_recovery_area/ORBIT_DR/controlfile/o1_mf_6lo6nwky_.ctl
Finished restore at 10-JAN-11
But, When I am trying to restore the datafiles, RMAN is throwing error:
RMAN> run {
allocate channel d1 type disk format '/dboracle/orbit_pr_bkp/primary_%U';
allocate channel d2 type disk format '/dboracle/orbit_pr_bkp/primary_%U';
restore database;
2> 3> 4> 5>
released channel: ORA_DISK_1
allocated channel: d1
channel d1: sid=155 devtype=DISK
allocated channel: d2
channel d2: sid=151 devtype=DISK
Starting restore at 10-JAN-11
released channel: d1
released channel: d2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/10/2011 05:38:56
RMAN-06026: some targets not found - aborting 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
What would be the correct RMAN command?
Regards, AnirbanAfter your RESTORE the (standby) controlfile, you must MOUNT the database instance with "ALTER DATABASE MOUNT".
You can also then query the controlfile with a "LIST BACKUP" or "LIST BACKUP SUMMARY" in RMAN to see if the deseired backups have been cataloged in the controlfile.
Don't specify the format for the ALLOCATE CHANNEL when you RESTORE DATABASE. In fact, you don't need to ALLOCATE CHANNEL at all when the device type is the default value of DISK if your are on 10gR2 or above.
Hemant K Chitale -
Restore Validate Database vs Backup Validate Database
Hi,
I want to add the following sentence after taking the backup using following command (backup as compressed backupset database plus archivelog;)
restore database validate;
or
backup validate database;
which one is best?It depends on what you are trying to accomplish, as per documentation:
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#sthref141BACKUP .. VALIDATE: Causes RMAN to scan the specified files and verify their contents, testing whether this file can be backed up. RMAN creates no output files. Use this command periodically to check for physical and logical errors in database files.
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta051.htm#sthref796
RESTORE... VALIDATE causes RMAN to select existing backups that it would use to perform a RESTORE operation, and scan them all to ensure that they are present and free of corruption.>
Guessing what you're trying to do, I recommend:
backup check logical as compressed backupset database plus archivelog;
restore validate database;
CHECK LOGICAL. Tests data and index blocks that pass physical corruption checks for logical corruption, for example, corruption of a row piece or index entry. If RMAN finds logical corruption, then it logs the block in the alert.log and server session trace file. HTH
Enrique
PS If you have access to Metalink see Note:388422.1 Top 10 Backup and Recovery best practices.
Edited by: Enrique Orbegozo on Dec 17, 2008 4:21 PM -
Restoring iCloud's iPhone Backup to an iPod Touch
Hi there.
My last birthday wasn't precisely the best, as I got my iPhone 4 stolen.
Had to deal with an Android device which isn't nearly as good as what I was used to have, so I decided to buy this fancy iPod Touch 4G 64 gb until the new iPhone arrives and see how it fares. My idea is to leave the Android phone only to make/answer calls and tether internet to the iTouch.
Problem is, I was thinking about restoring the stolen iPhone's iCloud backup to the iPod Touch so I didn't have to fiddle around with settings and stuff (and to not loose all my Chrono Trigger's advance ), but can't seem to be able to do that. I'm aware that those two are different devices and some things wouldn't work (like whatsapp without a proper mobile number), but it seems like a nonsense to me if you can't transfer the backup between two devices that are more or less the same.
I hope someone knows if there's a way to restore my iPhone's backup to the iTouch.
Thanks in advance.Well, I finally managed to do that, weird thing is I had to wipe and restore the iPod Touch's and sync it with iCloud at the very beggining of the setup, obviously whatsapp doesn't work with the iTouch so it got automatically deleted, but for everything is Ok, I find the iTouch to be a tad slower than the iPhone though and miss the flash, but that's how it goes by now.
-
I was upgrading to latest software on my iphone 5 when the connection crashed - I had to do a factory reset and am now restoring from my latest backup however, it seems to be taking ages - any suggestions?
In case you had a lot of photos inside the camera roll, this could be reason, if you're restoring from iCloud a slow Wi-Fi connection could also prolong this process.
-
I am using Java Swing as Front end and Visual FoxPro as Database.
In an application, i need to back up the database files. I need the compressed back up ie the files to be compressed as Winzip by the Java itself and can be stored in Floppy. Later during Restore, the application should automatically UnZip that and copy files into the Respective folder in HardDisc.
Please give me a solution asap.Hi Gopinath,
I am not sure whether you found your answer for a solution in Java for Compressed Backup and Restore. I was hoping you did and if you did, would you be kind enough to share that information. U can send me an email @ [email protected]
TIA,
Raj. -
I just had to reformat the external hard drive that houses my iPhoto library, then restore it from a backup. Now Time Machine is telling me my backup hard drive suddenly does not have the space to complete a backup. I also noticed when I go in to Time Machine, there are only about 5 backups recorded on the ext. hard drive. There were many more before. Any idea what happened and if I have to buy a new back up hard drive?
Hallo Kieth ,
I am not quite ready to restore the full iphoto library , as I have days of work re - imputting titles,descriptions and enhancement . I hope that your suggestion works , as I use my Macbook basically to work with digital photography. Through time , I will need to delete my library to recover more disc space and I would hate to have to spend more time re - imputting titles and descriptions all over again .
Thanks for your interest and advice.
regards - Alan -
Unable to restore from my icloud backup
I backed up my 3gs via iCloud and purchased a new 4s. I was expecting to be able to restore from my iCloud backup, but when i tried, it said there was no backup information. I did reset the 3gs before attempting to get the restore started on the 4s. Could that have deleted my backup? I don't think it should have, but I'm not sure why else my iCloud backup is gone. It's screwed me pretty bad. I lost a lot of information!
Help!I had the same problem, too (but when switching from 4 to 4S).
Reason: The iPhone 4S had firmware 5.0.1, whereas the older iPhone 4 was updated to 5.1 already. The backups are incompatible and hence not shown!!
Solution: First update the 4S to the same (or newer) software version, then restore from the backup.
The update is possible without using iTunes, just update "OTA" ("over the air") from within the iPhone (General -> Settings -> Software update) -
Restored it from a backup and now there's no music on it. In the music tab it iTunes says: Thomas iPhone has access to music on iCloud. Songs can be fetched via WIFI or a mobile network. The pnly thing I can chose to sync are voice memos.
What can I do?If you want all the songs from an artist on your phone you can to to the artist view, tap on the artist, scroll to the bottom of the list and you will see a Download All button. This works for playlists and albums too (scroll to the bottom and tap the Download All button). I suppose if you wanted all your music on your phone you could create a smart playlist in iTunes on your computer that would contain all your music, upload it to iTunes match (Store>Update iTunes Match), and then you would get a Download All button at the bottom of this playlist on your phone to download all your songs.
-
I'm trying to recover a file and the app company said to restore from an earlier backup. My iPhone only shows the most recent backup. I've been searching the net for answers - I found the back up file and date sorted them (over 6mb of files). How can I get my iPhone to restore from an earlier backup?
I am on Windows Vista so I don't have Time Machine.
I have backed up the backup folder so if I mess it up, I have it in a separate place.
Can I just delete all the files with todays date in that backup folder and have it forced to the next oldest date?
Why doesn't the iPhone show a list of the least several backups.
Info:
iPhone 4S
Software version 5.1.1
Backed up to computer through iTunes (not iCloud)As you backup the iPhone in iTunes, it overwrites the last backup. Files are kept as they are changed, so that would explain how you get different dates in your backup folder. The only backups that are saved and not overwritten are the ones done just prior to a restore. You do have the option to go back in time on a Windows computer, however depending on the last time you set a restore point in Windows, it could be back further than you are willing to go.
Maybe you are looking for
-
Is there a limit to number of SNASW links?
We have an IBM 3745 with T/R which we disconected and attached a router with SNASW instead. Same macaddress as the 3745. It went fine first but when a lot of people started to logon they hit the wall and the SNASW stopped to respond to new connection
-
ExtendScript CS6 doesn't handle GPS data properly
I prefer to work in Photoshop and Bridge, rather than Lightroom. I am currently using version CS6 on Windows 7 x64. I occasionally need to update the title, description and/or GPS information of a photograph. (I have many photographs that predate G
-
HI I need a drop down in web UI pop up so the user will select a value from the drop down and post it for the respective event message . how can i configure this drop down in event message pop up Regards ravi
-
How sensitive is the retina macbook pro to, say, pressing on the top of the screen. When putting on a case you have to press kinda hard on the lid, could this damage it?
-
I am not able to download RAW files into my Photoshop Elements 6 program.