on 07-29-2014 2:48 PM
Hello gurus,
Is it possible to restore Oracle to a Windows machine that has different disk structure than a source machine?
E.g. source machine had disks C:, D:, E: (on which Oracle data files were distributed), but a target machine has only disk C:
Database is backuped with brtools.
Hi
This should be possible by adapting the brbackup control file (.ffd or .afd)
Change all the drive (c, d, e) to c and restore with brrestore using that files.
brrestore -u / -b bebzrlkf.afd -d disk -c force -m full -e 5
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I did some mass changes using a script... to be honest I'm not sure if I did it to restore FROM a different location, or TO a different location.
You could also use Brrestore option -m|-mode to restore the datafiles to a new location.
Check online help -m|-mode - SAP Database Guide: Oracle (BC-DB-ORA-DBA) - SAP Library
For instance the here under command will restore datafiles #10 to #20 to the /tmp directory
brrestore -u / -b beokfyeu.pnd -c -m 10-20=/tmp
You could find datafile ID by querying view dba_data_files
select FILE_ID, FILE_NAME, TABLESPACE_NAME from DBA_DATA_FILES;
Regards
Hi Yerk,
You need to create new controlfiles with the new layout and then open the database.
From source database, generate a trace file using
SQL> alter database backup controlfile to trace;
Modify this trace file and adapt all the paths matching to your target environment,
Change "REUSE" to "SET" in trace file.
Rename this trace file to CONTROL.SQL
Then on target system copy this CONTROL.SQL under oracle home
SQL> @CONTROL.SQL
This will create new control file at desired location and open the database.
Regards,
Deepak Kori
Hi
Yes you will have to create new control files based on the new location.
Create a text backup of the control file on source server
alter database backup controlfile to trace as 'd:\arbitrary_path\CTL.sql';
and adapt it for creating new control files on the target server (change datafiles paths to the restored ones, change SID if needed... )
delete the control files on target, an run the script.
You can find more detail on how adapting the script
1889854 - Recreation of the Control file
Regards
Yves, Deepak, thank you, guys. Worked like a charm!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yerkebulan,
You can change the data files path using this SQL command in the old control file itself.
alter database rename file '<source_path>' to '<destination_path>';
Thanks,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.