Move datafile from asm datafile database to non asm database
Hi Nice morning all DBA Guys, I want move datafile from asm database datafile to non asm configurated database. Hoe to move this?
Datafiles like this
+DATA/saico/datafile/users.259.631612183
+DATA/saico/datafile/DBA.XXX.XXXXXXXXX
Regards
S.Azar
The all files movement of asm to non-asm and vice-versa is given in document id 252219.1 on metalink. Please look at the same. In nut shell you have to do the following:
1. Start your database with ASM.
2. Create pfile from spfile.
3. Edit pfile to reflect controlfile name in file system location.
4. SQL> Startup nomount.
5. Use RMAN to copy the control file from ASM to NON-ASM.
RMAN> RESTORE CONTROLFILE FROM '<filename_of_old_control_file>';
6. SQL> alter database mount;
7. Use RMAN to copy the database from ASM to NON-ASM.
RMAN> BACKUP AS COPY DATABASE format '/u01/oradata/nonasmdb/datafile/%U';
8. From RMAN
RMAN> SWITCH DATABASE TO COPY;
Regards.
Similar Messages
-
Restore Database to non-ASM Storage - Issue with Bigfile Tablespace
I have been testing a restore of my prod database that uses ASM (and oracle managed files) for storage to a different server and non-ASM storage. Oracle version is 10g EE. My database has one bigfile tablespace and it's datafile is about 250GB. The restore fails and it has something to do with the bigfile tablespace.
Here is the rman restore script:
run
set newname for datafile 1 to '/ora01/db/ehr/system01.dbf';
set newname for datafile 2 to '/ora01/db/ehr/undotbs01.dbf';
set newname for datafile 3 to '/ora01/db/ehr/sysaux01.dbf';
set newname for datafile 4 to '/ora01/db/ehr/undotbs02.dbf';
set newname for datafile 5 to '/ora01/db/ehr/users01.dbf';
set newname for datafile 6 to '/ora01/db/ehr/apolloaud01.dbf';
set newname for datafile 7 to '/ora01/db/ehr/apollohist01.dbf';
set newname for datafile 8 to '/ora01/db/ehr/apolloidx01.dbf';
set newname for datafile 9 to '/ora01/db/ehr/apollotab01.dbf';
set newname for datafile 10 to '/ora01/db/ehr/apollotab02.dbf';
set newname for datafile 11 to '/ora02/db/ehr/apollolob01.dbf';
set newname for datafile 12 to '/ora01/db/ehr/apollofdb01.dbf';
set newname for datafile 13 to '/ora01/db/ehr/apolloidx02.dbf';
set newname for datafile 14 to '/ora01/db/ehr/apolloidx03.dbf';
set newname for datafile 15 to '/ora01/db/ehr/apolloaud02.dbf';
set newname for datafile 16 to '/ora01/db/ehr/apollotab03.dbf';
set until sequence 60298 thread 2;
restore database;
switch datafile all;
recover database;
Datafile 11 is the datafile in the bigfile tablespace. Here are the weird things about the restore:
1. The restore output shows this:
creating datafile fno=11 name=/ora02/db/ehr/apollolob01.dbf
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /ora01/db/ehr/system01.dbf
restoring datafile 00002 to /ora01/db/ehr/undotbs01.dbf
restoring datafile 00003 to /ora01/db/ehr/sysaux01.dbf
restoring datafile 00004 to /ora01/db/ehr/undotbs02.dbf
restoring datafile 00005 to /ora01/db/ehr/users01.dbf
restoring datafile 00006 to /ora01/db/ehr/apolloaud01.dbf
restoring datafile 00007 to /ora01/db/ehr/apollohist01.dbf
restoring datafile 00008 to /ora01/db/ehr/apolloidx01.dbf
restoring datafile 00009 to /ora01/db/ehr/apollotab01.dbf
restoring datafile 00010 to /ora01/db/ehr/apollotab02.dbf
restoring datafile 00012 to /ora01/db/ehr/apollofdb01.dbf
restoring datafile 00013 to /ora01/db/ehr/apolloidx02.dbf
restoring datafile 00014 to /ora01/db/ehr/apolloidx03.dbf
restoring datafile 00015 to /ora01/db/ehr/apolloaud02.dbf
restoring datafile 00016 to /ora01/db/ehr/apollotab03.dbf
Why at the beginning is it "creating" datafile 11? Then it doesnt even say it is "restoring" that datafile. Only restoring datafiles 1,2,3,4,5,6,7,8,9,10,12,13,14,15, and 16.
When it creates datafile 11 it is only 26GB, that is much smaller than it should be according to v$datafile view on source prod database. Also even though it says it is creating datafile 11 as /ora02/db/ehr/apollolob01.dbf it actually creates it as an oracle managed file at /ora02/db/ehr/EHR/datafile/o1_mf_apollolo_6crxyqs2_.dbf
After the datafiles are restored the "switch datafile all" command fails:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of switch command at 10/18/2010 13:58:37
ORA-19625: error identifying file /ora02/db/ehr/apollolob01.dbf
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
So my question is how do I get this database restored to non-ASM (and non omf)?So I tried using a different scn with my "set until scn #####" then the restore created 2 datafiles. The datafile for apollolob and apollotab02.dbf. So I think I have narrowed the problem to be that I am not using the correct scn number so RMAN can successfully restore those datafiles and recreates them instead. How do I find the correct scn to use to do a successful restore of the entire database? I have seen different methods on the web, but cant figure it out. Ive used "select archivelog_change#-1 from v$database;" and I also did "list backup of archivelog all" and used the latest sequence number. How can I find the correct scn to use so the entire database will restore?
Here is the output of "list backup":
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
19724 41.12M DISK 00:00:10 14-OCT-10
BP Key: 65840 Status: AVAILABLE Compressed: YES Tag: TAG20101014T210022
Piece Name: /mnt/migrate/rman/EHR_dbid3632734257_set113195_piece1_copy1_20101014
List of Archived Logs in backup set 19724
Thrd Seq Low SCN Low Time Next SCN Next Time
1 50439 3230234843 14-OCT-10 3230268282 14-OCT-10
1 50440 3230268282 14-OCT-10 3230286806 14-OCT-10
2 60280 3230234852 14-OCT-10 3230251419 14-OCT-10
2 60281 3230251419 14-OCT-10 3230268263 14-OCT-10
2 60282 3230268263 14-OCT-10 3230286809 14-OCT-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
19725 Full 126.40G DISK 09:11:51 15-OCT-10
List of Datafiles in backup set 19725
File LV Type Ckp SCN Ckp Time Name
1 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/system.625.609259453
2 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/undotbs1.620.609259461
3 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/sysaux.768.609259463
4 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/undotbs2.632.609259467
5 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/users.257.609259471
6 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apolloaud.316.619537285
7 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apollohist.629.619538155
8 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apolloidx.312.619538169
9 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apollotab.276.619538487
10 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apollotab.576.619539331
11 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apollolob.570.619539593
12 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apollofdb.750.645974339
13 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apolloidx.429.651171265
14 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apolloidx.705.688680793
15 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apolloaud.747.699632315
16 Full 3230287009 14-OCT-10 +DATA/ehr/datafile/apollotab.330.715622123
Backup Set Copy #1 of backup set 19725
Device Type Elapsed Time Completion Time Compressed Tag
DISK 09:11:51 20-OCT-10 YES TAG20101014T210039
List of Backup Pieces for backup set 19725 Copy #1
BP Key Pc# Status Piece Name
65851 1 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece1_copy1_20101014
65862 2 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece2_copy1_20101014
65873 3 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece3_copy1_20101014
65884 4 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece4_copy1_20101014
65895 5 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece5_copy1_20101014
65901 6 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece6_copy1_20101014
65902 7 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece7_copy1_20101014
65903 8 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece8_copy1_20101014
65904 9 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece9_copy1_20101014
65841 10 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece10_copy1_20101014
65842 11 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece11_copy1_20101014
65843 12 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece12_copy1_20101014
65844 13 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece13_copy1_20101014
65845 14 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece14_copy1_20101014
65846 15 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece15_copy1_20101014
65847 16 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece16_copy1_20101014
65848 17 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece17_copy1_20101014
65849 18 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece18_copy1_20101014
65850 19 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece19_copy1_20101014
65852 20 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece20_copy1_20101014
65853 21 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece21_copy1_20101014
65854 22 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece22_copy1_20101015
65855 23 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece23_copy1_20101015
65856 24 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece24_copy1_20101015
65857 25 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece25_copy1_20101015
65858 26 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece26_copy1_20101015
65859 27 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece27_copy1_20101015
65860 28 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece28_copy1_20101015
65861 29 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece29_copy1_20101015
65863 30 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece30_copy1_20101015
65864 31 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece31_copy1_20101015
65865 32 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece32_copy1_20101015
65866 33 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece33_copy1_20101015
65867 34 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece34_copy1_20101015
65868 35 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece35_copy1_20101015
65869 36 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece36_copy1_20101015
65870 37 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece37_copy1_20101015
65871 38 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece38_copy1_20101015
65872 39 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece39_copy1_20101015
65874 40 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece40_copy1_20101015
65875 41 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece41_copy1_20101015
65876 42 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece42_copy1_20101015
65877 43 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece43_copy1_20101015
65878 44 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece44_copy1_20101015
65879 45 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece45_copy1_20101015
65880 46 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece46_copy1_20101015
65881 47 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece47_copy1_20101015
65882 48 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece48_copy1_20101015
65883 49 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece49_copy1_20101015
65885 50 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece50_copy1_20101015
65886 51 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece51_copy1_20101015
65887 52 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece52_copy1_20101015
65888 53 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece53_copy1_20101015
65889 54 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece54_copy1_20101015
65890 55 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece55_copy1_20101015
65891 56 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece56_copy1_20101015
65892 57 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece57_copy1_20101015
65893 58 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece58_copy1_20101015
65894 59 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece59_copy1_20101015
65896 60 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece60_copy1_20101015
65897 61 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece61_copy1_20101015
65898 62 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece62_copy1_20101015
65899 63 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece63_copy1_20101015
65900 64 AVAILABLE /mnt/migrate/rman/EHR_dbid3632734257_set113196_piece64_copy1_20101015
BS Key Size Device Type Elapsed Time Completion Time
19726 228.10M DISK 00:00:49 15-OCT-10
BP Key: 65905 Status: AVAILABLE Compressed: YES Tag: TAG20101015T061242
Piece Name: /mnt/migrate/rman/EHR_dbid3632734257_set113197_piece1_copy1_20101015
List of Archived Logs in backup set 19726
Thrd Seq Low SCN Low Time Next SCN Next Time
1 50441 3230286806 14-OCT-10 3230331993 14-OCT-10
1 50442 3230331993 14-OCT-10 3230401945 14-OCT-10
1 50443 3230401945 14-OCT-10 3230469794 15-OCT-10
1 50444 3230469794 15-OCT-10 3230555010 15-OCT-10
1 50445 3230555010 15-OCT-10 3230618396 15-OCT-10
1 50446 3230618396 15-OCT-10 3230695020 15-OCT-10
2 60283 3230286809 14-OCT-10 3230304858 14-OCT-10
2 60284 3230304858 14-OCT-10 3230330891 14-OCT-10
2 60285 3230330891 14-OCT-10 3230354275 14-OCT-10
2 60286 3230354275 14-OCT-10 3230366292 14-OCT-10
2 60287 3230366292 14-OCT-10 3230399805 14-OCT-10
2 60288 3230399805 14-OCT-10 3230423577 14-OCT-10
2 60289 3230423577 14-OCT-10 3230446176 15-OCT-10
2 60290 3230446176 15-OCT-10 3230469756 15-OCT-10
2 60291 3230469756 15-OCT-10 3230496786 15-OCT-10
2 60292 3230496786 15-OCT-10 3230524710 15-OCT-10
2 60293 3230524710 15-OCT-10 3230554981 15-OCT-10
2 60294 3230554981 15-OCT-10 3230583802 15-OCT-10
2 60295 3230583802 15-OCT-10 3230610465 15-OCT-10
2 60296 3230610465 15-OCT-10 3230617887 15-OCT-10
2 60297 3230617887 15-OCT-10 3230673207 15-OCT-10
2 60298 3230673207 15-OCT-10 3230695022 15-OCT-10 -
Hello All,
I take a compressed backup of my ASM (apps) database with the following command
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL = 0 TAG = 'WEEKLY_DATABASE'
FORMAT '/backup/rman_weekly_%d_%T.%t_s%s_p%p' DATABASE;
I now need to clone this to an non-asm instance. When I try to restore the backup it creates the diskgroup path on the target instance for ex if the disk group is called DG1 it creates the patch '/u02/DG1/datafile/' and copies the files there with file names as 'o1_mf_apps_ts__65zyr174_.dbf'. It is not able to complete the restore as one of the datafiles cannot be restored as it keeps looking for the diskgroup path and errors out with
'Cannot restore +DG1/datafile/xxx.dbf' no ASM instance available, cannot connect to cluster manager.
Any pointers/help/steps would be appreciated.
RegardsYou should rename files before restoring. Try something like the following (change paths/names with yours) :
run {
allocate channel d1 type disk;
set newname for datafile 1 to '/oradata/ORCL/system.dbf';
set newname for datafile 2 to '/oradata/ORCL/undotbs1.dbf';
set newname for datafile 3 to '/oradata/ORCL/sysaux.dbf';
set newname for datafile 4 to '/oradata/ORCL/users.dbf';
restore database;
switch datafile all;
release channel d1;
} -
Restoring RMAN Backup from ASM RAC env to Non ASM standalone environment
Hi,
Can anyone please tell me how to restore database using RMAN in a Non ASM environment as my backup file with ASM RAC environment.
i was also looking for some documentation which provides clear explanation about RMAN backup and Restore in ASM and Non ASM environment.
ThanksYou can set the parameter db_file_name_convert in init.ora in you new database with [ID 47325.1]
or
you can set parameter "set newname" in your script rman. [ID 549972.1]
if you have one or two destinations of dbfiles in ASM I seggest to you set parameter db_file_name_convert in init.
example:
db_file_name_convert=('+DGDATA','/u01/oradata/');
remenber you need set log_file_name_convert to.
log_file_name_convert=('+DGREDO','/u01/redo/');
if you use "set newname" commands you need set this lines in your script rman.
set newname for datafile 1 to '/u01/oradata/system01.dbf';
set newname for datafile 2 to '/u01/oradata/undotbs01.dbf';
set newname for datafile 3 to '/u01/oradata/sysaux01.dbf';
set newname for datafile 4 to '/u01/oradata/users01.dbf';
and every datafiles you need set!
Edited by: user1107977 on 21/07/2011 13:47 -
Move data from a select box to table in database.
Hi,
a. I have one dual selection box and for that the is div id =' id '
b.In dual selection box there is two box ie. one is Available and other is Selected. So a user can select one or all using two button.
c. My requirements is like :
onclick of a radio button all datas from available side will move to database and that dual box will be hidden.Java != Javascript. Please go to some web development board.
-
Planning to move my datafile from windows server 2003 to windows XP
planning to move my datafiles from windows server 2003 to windows XP
database 10g
Is it possible to follow below the steps for above migration
=====================================-
This is my steps( migrated from windows Xp to windows XP)
Moving oracle Datafile from one server A to B (instance not running) (cold backup)
In server a (cold backup of datafile)
SQL> alter database backup controlfile to trace
Go to udump check the trace file copy these lines
CREATE CONTROLFILE REUSE DATABASE "O10G1" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 454
LOGFILE
GROUP 1 'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\REDO01.LOG' SIZE 10M,
GROUP 2 'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\REDO02.LOG' SIZE 10M,
GROUP 3 'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\REDO03.LOG' SIZE 10M
-- STANDBY LOGFILE
DATAFILE
'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\SYSTEM01.DBF',
'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\UNDOTBS01.DBF',
'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\SYSAUX01.DBF',
'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\USERS01.DBF'
CHARACTER SET WE8MSWIN1252
Change the new database name jee and REUSE replaced by SET and NORESTLOGS replaced by RESTLOGS above lines.
Save as C1.sql
Stop the oracle instance service in source ( server A)
Copy all the datafile and redlog file put into server B( any folder)
Copy the init.ora file from source and edit
Change the db_name and location of the controlfile
SERVER B
Create the oracle instance using ORADIM
Start the service
C:\ set oracle_sid=instance name
C:\>set oracle_sid=jeeno1
C:\>sqlplus /nolog
SQL*Plus: Release 10.1.0.2.0 - Production on Tue Apr
11 06:44:28 2006
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> connect / as sysdba;
Connected to an idle instance.
SQL> startup nomount
pfile='C:\oracle\product\10.1.0\admin\jeeno\pfile\jeenoinit.ora'
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145750508 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
SQL> CREATE CONTROLFILE set DATABASE "jeeno1"
RESETLOGS NOARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 454
7 LOGFILE
8 GROUP 1
'C:\ORACLE\PRODUCT\10.1.0\ORADATA\jeeno\REDO01.LOG'
SIZE 10M,
9 GROUP 2
'C:\ORACLE\PRODUCT\10.1.0\ORADATA\jeeno\REDO02.LOG'
SIZE 10M,
10 GROUP 3
'C:\ORACLE\PRODUCT\10.1.0\ORADATA\jeeno\REDO03.LOG'
SIZE 10M
11 -- STANDBY LOGFILE
12 DATAFILE
13
'C:\ORACLE\PRODUCT\10.1.0\ORADATA\jeeno\SYSTEM01.DBF',
14
'C:\ORACLE\PRODUCT\10.1.0\ORADATA\jeeno\UNDOTBS01.DBF',
15
'C:\ORACLE\PRODUCT\10.1.0\ORADATA\jeeno\SYSAUX01.DBF',
16
'C:\ORACLE\PRODUCT\10.1.0\ORADATA\jeeno\USERS01.DBF'
17 CHARACTER SET WE8MSWIN1252
18 ;
Control file created.
SQL> alter database open resetlogs;
Database alteredone more thing u can also rename ur database by using nid utility ,So u have no need to recreate the controlfile for changing the name of ur database.just restore all files from primary to new server ,create new service by oradim ,start the instance and then use NID utility.
Thanks
Kuljeet -
Drop a datafile from physical standby's control file
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database...
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
Regards,
JibuJibu wrote:
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database..
Hi,
What is your version?
If you added new datafile or created new tablespace, take backup again for restore new created standby database.
If your standby database running well, DG configuration success, then this datafile will create on standby side, too.
Set STANDBY_FILE_MANAGEMENT=AUTO best practice.
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
Not need any delete datafile from standby side, you must recreate standby database, or you can take RMAN backup and restore to standby side again.
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
It is not logical, Physical standby must be bit-for-bit same with Primary database.
Regards
Mahir M. Quluzade -
ASM to non-ASM database duplicate-ORA17503:ksfdopn:2 Failed to open file
Hi,
I am trying to duplicate an ASM database in to non-ASM database.
Having trouble when trying to start the duplicate database, it is looking for the redologs which are there in the ASM diskgroup in the production database, but the duplication database is non-ASM,
The database version is 10.2.0.4 on HP-UX 11.31
ORA-00313: open failed for members of log group 11 of thread 1
ORA-00312: online log 11 thread 1: '+DATADG/orcl/onlinelog/group_11.302.670427231'
ORA-17503: ksfdopn:2 Failed to open file +DATADG/orcl/onlinelog/group_11.302.670427231
ORA-15001: diskgroup "DATADG" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
Sun Aug 21 14:20:14 2011
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_12482.trc:
ORA-00367: checksum error in log file header
ORA-00305: log 12 of thread 2 inconsistent; belongs to another database
ORA-00312: online log 12 thread 2: '/oradbstg/oradata/orcl/redo01.log'
Sun Aug 21 14:20:14 2011
RESETLOGS after incomplete recovery UNTIL CHANGE 3632387878
Resetting resetlogs activation ID 1179611173 (0x464f7025)
Sun Aug 21 14:20:14 2011
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_12482.trc:
ORA-00313: open failed for members of log group 7 of thread 1
ORA-00312: online log 7 thread 1: '+DATADG/orcl/onlinelog/group_7.298.670427121'
ORA-17503: ksfdopn:2 Failed to open file +DATADG/orcl/onlinelog/group_7.298.670427121
ORA-15001: diskgroup "DATADG" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
Sun Aug 21 14:20:14 2011
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_12482.trc:
ORA-00600: internal error code, arguments: [kgeade_is_0], [], [], [], [], [], [], []
ORA-600 signalled during: alter database open RESETLOGS...Any help would be appreciated.When you are performing this task , is the ASM diskgroup "DATADG" mounted or existed.. try to figure out that first whether the diskgroup is mounted/existed or not .. And also when incomplete recovery is performed oracle creates the online redolog files when you start the db with resetlogs..
you can go through the following link :
http://oracleinstance.blogspot.com/2010/08/duplicatecloneconvert-asm-file-system.html
Cheers! -
Configuring Standby Database from non ASM to ASM
Hi All,
i am trying to configure a standby database from non ASM file system to ASM file system.
my primary database having datafiles in /u02,/u03,/u04 etc, and my Standby database having filesystem in ASM diskgroup DATA.
can anyone of you help me in setting up of parameters db_file_name_convert and log_file_name_convert etc,;
thanks in Advance,
TEJASHi,
You can check this. May it help you
http://gavinsoorma.com/2010/04/creating-an-asm-duplicate-database-from-a-non-asm-database/ -
Restore single datafile from source database to target database.
Here's my issue:
Database Release : 11.2.0.3 across both the source and targets. (ARCHIVELOG mode)
O/S: RHEL 5 (Tikanga)
Database Storage: Using ASM on a stand-alone server (NOT RAC)
Using Oracle GG to replicate changes on the Source to the Targets.
My scenario:
We utilize sequences to keep the primary key in tact and these are replicated utilizing GG. All of my schema tables are located in one tablespace and datafile and all of my indexes are in seperate tablespace (nothing is being partitioned).
In the event of media failure on the Target or my target schema being completely out of whack, is there a method where I can copy the datafile/tablespace from my source (which is intact) to my target?
I know there are possibilites of
1) restore/recover the tablespace to a SCN or timestamp in the past and then I could use GoldenGate to run the transactions in (but this could take time depending on how far back I need to recover the tablespace and how many transactions have processed with GG) (This is not fool-proof).
2) Could use DataPump to move the data from the Source schema to the Target schema (but the sequences are usually out of order if they haven't fired on the source, get that 'sequence is defined for this session message'). I've tried this scenario.
3) I could alter the sequences to get them to proper number using the start and increment by feature (again this could take time depending on how many sequences are out of order).
I would think you could
1) back up the datafile/tablespace on the source,
2)then copy the datafile to the target.
3) startup mount;
4) Newname the new file copied from the source (this is ASM)
5) Restore the datafile/tablespace
6) Recover the datafile/tablespace
7) alter database open;
Question 1: Do I need to also copy the backup piece from the source when I execute the backup tablespace on the source as indicated in my step 1?
Question 2: Do I need to include "plus archivelog" when I execute the backup tablespace on the source as indicated in my step 1?
Question 3: Do I need to execute an 'alter system switch logfile' on the Target when the recover in step 6 is completed?
My scenario sounds like a Cold Backup but running with Archivelog mode, so the source could be online while the database is running.
Just looking for alternate methods of recovery.
Thanks,
JasonLet me take another stab at sticking a fork into this myth about separating tables and indexes.
Let's assume you have a production Oracle database environment with multiple users making multiple requests and the exact same time. This assumption mirrors reality everywhere except in a classroom where a student is running a simple demo.
Let's further assume that the system looks anything like a real Oracle database system where the operating system has caching, the SAN has caching, and the blocks you are trying to read are split between memory and disk.
Now you want to do some simple piece of work and assume there is an index on the ename column...
SELECT * FROM emp WHERE ename = 'KING';The myth is that Oracle is going to, in parallel, read the index and read the table segments better, faster, whatever, if they are in separate physical files mapped by separate logical tablespaces somehow to separate physical spindles.
Apply some synapses to this myth and it falls apart.
You issue your SQL statement and Oracle does what? It looks for those index blocks where? In memory. If it finds them it never goes to disk. If it does not it goes to disk.
While all this is happening the hundreds or thousands of other users on the database are also making requests. Oracle is not going to stop doing work while it tries to find your index blocks.
Now it finds the index block and decides to use the ROWID value to read the block containing the row with KING's data. Did it freeze the system? Did it lock out everyone else while it did this? Of course not. It puts your read request into the queue and, again, first checks memory to see if it needs to go to disk.
Where in here is there anything that indicates an advantage to having separate physical files?
And even if there was some theoretical reason why separate files might be better ... are they separate in the SAN's cache? No. Are they definitely located on separate stripes or separate physical disks? Of course not.
Oracle uses logical mappings (tables and tablespaces) and SANS use logical mappings so you, the DBA or developer, have no clue as to where anything physically is located.
PS: Ouija Boards don't work either. -
Migrate datafiles from Veritas Filesystem (SFRAC) to ASM
Hello,
I'm gathering details how to migrate datafiles from Veritas Filesystem(SFRAC) to ASM. Please feed in your suggestions. The show stopper is DB SIZE which is 56 TB and addition of 1 TB each month.
ENV Details
OS : Solsris 10
RDBMS : 9.2.0.8 (to be upgraded to 11.2.0)
STORAGE : Propsed to use ASM, but need datafiles migration strategy.
DB SIZE = 56 TB
Kind Regards,
KamHi,
First of all you need to upgrade the database to 11.2
After ...
It is often used the strategy RMAN Online Backup with Image Copies to migrate to ASM
Check this out... This a litte example
You can move pieces (i.e Tablespaces, Controlfile, etc..) database as you want.
http://uhesse.wordpress.com/2010/12/01/database-migration-to-asm-with-short-downtime/
Regards,
Levi Pereira -
Duplicate database from ASM to Non-ASM problem
Friends,
I am unable to duplicate the database from ASM TO Non-ASM,
OS: Linux AS4
Oracle version: 10.2.0.1
initAUXDB.ora parameters:
background_dump_dest=/u01/oracle/product/10.2.0/admin/auxdb/adump
core_dump_dest=/u01/oracle/product/10.2.0/admin/auxdb/cdump
background_dump_dest=/u01/oracle/product/10.2.0/admin/auxdb/bdump
user_dump_dest=/u01/oracle/product/10.2.0/admin/auxdb/udump
db_name=auxdb
undo_tablespace=undotbs1
undo_management=auto
undo_retention=900
db_block_size=8192
compatible=10.2.0.1
control_files='/u01/oracle/product/10.2.0/oradata/auxdb/control01.ctl'
db_file_name_convert=('+DATA','/u01/oracle/product/10.2.0/oradata/auxdb')
log_file_name_convert=('+DATA','/u01/oracle/product/10.2.0/oradata/auxdb')
db_create_file_dest='/u01/oracle/product/10.2.0/oradata/auxdb'
db_create_online_log_dest_1='/u01/oracle/product/10.2.0/oradata/auxdb'
My target database diskgroup info:
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE STATE
1 DATA 512 4096 MOUNTED N
2 FLASH 512 4096 MOUNTED E
Please could you have look the following error:
type1:
Note: when I configure The log_file_name_convert=('+DATA') in initAUXDB.ora parameter file, the following error are occurring:
RMAN> run {
2> allocate auxiliary channel C1 device type disk;
3> duplicate target database to auxdb;
4> }
Starting Duplicate Db at 03-MAR-13
released channel: C1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/03/2013 14:43:05
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename +FLASH/prod/onlinelog/group_3.259.809008171 conflicts with a file used by the target database
RMAN-05001: auxiliary filename +FLASH/prod/onlinelog/group_2.258.809008167 conflicts with a file used by the target database
RMAN-05001: auxiliary filename +FLASH/prod/onlinelog/group_1.257.809008165 conflicts with a file used by the target database
type2:
when I configure The log_file_name_convert=('+FLASH') in initAUXDB.ora, again I am getting the following error:
RMAN> run {
2> allocate auxiliary channel C1 device type disk;
3> duplicate target database to auxdb;
4> }
allocated channel: C1
channel C1: sid=36 devtype=DISK
Starting Duplicate Db at 04-MAR-13
released channel: C1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/04/2013 08:37:10
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename +DATA/prod/onlinelog/group_3.263.809008169 conflicts with a file used by the target database
RMAN-05001: auxiliary filename +DATA/prod/onlinelog/group_2.262.809008165 conflicts with a file used by the target database
RMAN-05001: auxiliary filename +DATA/prod/onlinelog/group_1.261.809008163 conflicts with a file used by the target database
Please suggest me to overcome the above errors.Hi Mr.Rao,
Thank you for your reply..
I follwed as per as your query, but I am getting different error:
channel C1: starting datafile backupset restore
channel C1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/system.256.809008077 <---------here the directory structure is "/u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/" but I mention in initauxdb.ora parameter only "/u01/oracle/product/10.2.0/odata/auxdb/".
restoring datafile 00002 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/undotbs1.258.809008077
restoring datafile 00003 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/sysaux.257.809008077
restoring datafile 00004 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/users.259.809008077
channel C1: reading from backup piece +FLASH/prod/backupset/2013_03_04/nnndf0_tag20130304t072249_0.265.809162569
ORA-19870: error reading backup piece +FLASH/prod/backupset/2013_03_04/nnndf0_tag20130304t072249_0.265.809162569
ORA-19505: failed to identify file "+FLASH/prod/backupset/2013_03_04/nnndf0_tag20130304t072249_0.265.809162569"
ORA-17503: ksfdopn:2 Failed to open file +FLASH/prod/backupset/2013_03_04/nnndf0_tag20130304t072249_0.265.809162569
ORA-15001: diskgroup "FLASH" does not exist or is not mounte
failover to previous backup
channel C1: starting datafile backupset restore
channel C1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/system.256.809008077
restoring datafile 00002 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/undotbs1.258.809008077
restoring datafile 00003 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/sysaux.257.809008077
restoring datafile 00004 to /u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/users.259.809008077
channel C1: reading from backup piece /u01/backup/prod/df_t809162421_s24_p1
channel C1: restored backup piece 1
piece handle=/u01/backup/prod/df_t809162421_s24_p1 tag=TAG20130304T072021
channel C1: restore complete, elapsed time: 00:01:17
Finished restore at 04-MAR-13
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUXDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/oracle/product/10.2.0/oradata/auxdb/prod/onlinelog/group_1.261.809008163',
'/u01/oracle/product/10.2.0/oradata/auxdb/prod/onlinelog/group_1.257.809008165' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/oracle/product/10.2.0/oradata/auxdb/prod/onlinelog/group_2.262.809008165',
'/u01/oracle/product/10.2.0/oradata/auxdb/prod/onlinelog/group_2.258.809008167' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/oracle/product/10.2.0/oradata/auxdb/prod/onlinelog/group_3.263.809008169',
'/u01/oracle/product/10.2.0/oradata/auxdb/prod/onlinelog/group_3.259.809008171' ) SIZE 50 M REUSE
DATAFILE
'/u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/system.256.809008077'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
switch clone datafile all;
executing Memory Script
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=809171578 filename=/u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/undotbs1.258.809008077
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=809171578 filename=/u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/sysaux.257.809008077
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=809171578 filename=/u01/oracle/product/10.2.0/oradata/auxdb/prod/datafile/users.259.809008077
channel C1: starting archive log restore to default destination
channel C1: restoring archive log
archive log thread=1 sequence=12
channel C1: restoring archive log
archive log thread=1 sequence=13
channel C1: reading from backup piece /u01/backup/prod/al_t809162496_s26_p1
channel C1: restored backup piece 1
piece handle=/u01/backup/prod/al_t809162496_s26_p1 tag=TAG20130304T072136
channel C1: restore complete, elapsed time: 00:00:04
archive log filename=/u01/oracle/product/10.2.0/db_1/dbs/arch1_12_809008161.dbf thread=1 sequence=12
channel clone_default: deleting archive log(s)
archive log filename=/u01/oracle/product/10.2.0/db_1/dbs/arch1_12_809008161.dbf recid=2 stamp=809171585
archive log filename=/u01/oracle/product/10.2.0/db_1/dbs/arch1_13_809008161.dbf thread=1 sequence=13
channel clone_default: deleting archive log(s)
archive log filename=/u01/oracle/product/10.2.0/db_1/dbs/arch1_13_809008161.dbf recid=1 stamp=809171583
channel C1: starting archive log restore to default destination
channel C1: restoring archive log
archive log thread=1 sequence=14
channel C1: reading from backup piece +FLASH/prod/backupset/2013_03_04/annnf0_tag20130304t072246_0.264.809162567
ORA-19870: error reading backup piece +FLASH/prod/backupset/2013_03_04/annnf0_tag20130304t072246_0.264.809162567
ORA-19505: failed to identify file "+FLASH/prod/backupset/2013_03_04/annnf0_tag20130304t072246_0.264.809162567"
ORA-17503: ksfdopn:2 Failed to open file +FLASH/prod/backupset/2013_03_04/annnf0_tag20130304t072246_0.264.809162567
ORA-15001: diskgroup "FLASH" does not exist or is not mounte
released channel: C1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/04/2013 09:53:11
RMAN-03015: error occurred in stored script Memory Script
RMAN-20506: no backup of archivelog found
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 14 lowscn 542329 found to restore -
HOW TO - move a datafile from one disk to another ?
How can we move a datafile which is part of the big tablespace to another disk.
We have added new Disk to our server - OS windows 2000 / Oracle 9i - 9.2.0.5
We want to move a datafile from D drive to F drive.
Shutdown of the database is possible.
Thanks
SSI want to do the same thing but i have a BW database (SAP) and i want to move the datafile form one mount poitn to another due to space constraint, but i want to use BR*TOOLS utility to do this, so can anyone help me out on this on how to do this, what are the precaution need to be undertaken.
Jafar -
Rebuild ASM Disk - Copying multiple datafiles from one disk to another
Hi,
I have an environment of four 11GR2 Oracle databases on a Linux server. Each database has its own ASM disk.
DB1 -> ASM_DISK1
DB2 -> ASM_DISK2
DB3 -> ASM_DISK3
DB4 -> ASM_DISK4
I need to rebuild one of the ASM disks (ASM_DISK1), but first I need to copy all of the datafiles to another disk (ASM_DISK2). I tried backing up the database using RMAN, but it was taking too long (nearly two days when I cancelled it). So now I am going to copy the files using ASMCMD CP command.
Basically my task is as follows:
1. Shutdown database.
2. Copy all data from ASM_DISK1 to ASM_DISK2.
3. Drop ASM_DISK1.
4. Re-create ASM_DISK1.
5. Copy all data back to ASM_DISK1.
6. Start database.
Database size is 700GB.
I am using the below script to copy the files.
Copy Script
================
asmcmd ls +ASM_DISK1/DB1/DATAFILE >> asm_list.txt
for FILENAME in `cat asm_list.txt`
do
asmcmd >> asm_LOG.log <<EOF
cp ASM_DISK1/DB1/DATAFILE/$FILENAME ASM_DISK2/DB1_BACKUP/DATAFILE/$FILENAME.dbf
EOF
done
================
I will then rename each file in the database like so:
alter database rename file '+ASM_DISK1/DB1/DATAFILE/filename' to '+ASM_DISK1/DB1/DATAFILE/filename.dbf'
My questions are as follows.
Is this approach a valid solution?
Will renaming the files during copy corrupt the files?
When I copy the files back to the original disk after rebuild, then rename them, will the database be able to start?
Rgs,
Robrgilligan_tnf wrote:
Hi,
I have an environment of four 11GR2 Oracle databases on a Linux server. Each database has its own ASM disk.
DB1 -> ASM_DISK1
DB2 -> ASM_DISK2
DB3 -> ASM_DISK3
DB4 -> ASM_DISK4
I need to rebuild one of the ASM disks (ASM_DISK1), but first I need to copy all of the datafiles to another disk (ASM_DISK2). I tried backing up the database using RMAN, but it was taking too long (nearly two days when I cancelled it). So now I am going to copy the files using ASMCMD CP command.
And how do you propose to update the controlfile to point to the new location?
unless your datafiles are offline and/or the database is down, you will corrupt them and have an unusable database when you finish.
how were you doing this with RMAN? Depending on the size of your database(700G), it very well could take some time. I have restored databases at a rate of >300G/hr from scratch. You will need to shutdown at some point to relocate the controlfiles and system and redo logfiles.
Just curious, what is the problem with diskgroup ASM_DISK1 that you want to rebuild it?
Basically my task is as follows:
1. Shutdown database.
2. Copy all data from ASM_DISK1 to ASM_DISK2.
3. Drop ASM_DISK1.
4. Re-create ASM_DISK1.
5. Copy all data back to ASM_DISK1.
6. Start database.
Database size is 700GB.
I am using the below script to copy the files.
Copy Script
================
asmcmd ls +ASM_DISK1/DB1/DATAFILE >> asm_list.txt
for FILENAME in `cat asm_list.txt`
do
asmcmd >> asm_LOG.log <<EOF
cp ASM_DISK1/DB1/DATAFILE/$FILENAME ASM_DISK2/DB1_BACKUP/DATAFILE/$FILENAME.dbf
EOF
done
================
I will then rename each file in the database like so:
alter database rename file '+ASM_DISK1/DB1/DATAFILE/filename' to '+ASM_DISK1/DB1/DATAFILE/filename.dbf'
My questions are as follows.
Is this approach a valid solution?
Will renaming the files during copy corrupt the files?
When I copy the files back to the original disk after rebuild, then rename them, will the database be able to start?
Rgs,
Rob -
How to move a specific tablespace datafile from one directory to another
Database: 10.2.0.1
OS : Generic
Problem Description : How to move a specific tablespace datafile from one directory to another considering that the database is on Oracle Dataguard setup
** Oracle is working on this issue, but in parallel is opening the topic to the Community so that Community members can add their perspective, experience or knowledge. This will further enhance all knowledge bases including My Oracle Support and My Oracle Support Communities **
Edited by: ram_orcl on 16-Aug-2010 21:21Dear ram_orcl,
Please follow the procedures here;
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1034172
8.3.4 Renaming a Datafile in the Primary Database
When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
1.
To rename the datafile in the primary database, take the tablespace offline:
SQL> ALTER TABLESPACE tbs_4 OFFLINE;
2.
Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
% mv /disk1/oracle/oradata/payroll/tbs_4.dbf
/disk1/oracle/oradata/payroll/tbs_x.dbf
3.
Rename the datafile in the primary database and bring the tablespace back online:
SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE 2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
3> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
SQL> ALTER TABLESPACE tbs_4 ONLINE;
4.
Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# APP
8 YES
9 YES
10 YES
11 YES
4 rows selected.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
5.
Shut down the standby database:
SQL> SHUTDOWN;
6.
Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
% mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
7.
Start and mount the standby database:
SQL> STARTUP MOUNT;
8.
Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
9.
On the standby database, restart Redo Apply:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
2> DISCONNECT FROM SESSION;
If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf'Hope That Helps.
Ogan
Maybe you are looking for
-
I have an ipod nano 4gb and use pc with windows XP. since last year my ipod suddenly didnt want to sync any new songs saying " the ipod "MOAMEN" cannot be synced. the required folder couldnt be found" and when i try to update the itunes version anoth
-
Create two logical columns with same LTS mapping but diff filter conditions
Hi, Problem: How to create two logical columns within same logical table mapped to same physical column but different filter conditions? I have a scenario where in, Physical layer columns - table1.employee - table1.emp_city I need a columns
-
How do I delete log-in items?
In System Profiler I see a log-in item that I don't want: MissingSync Mounting (I no longer use Missing Sync). How can I delete this from Log-in?
-
Eudora Spell Check Doesn't Work in SL 10.6.1
Eudora's spell checking function stopped working after installing SL 10.6.1. It worked OK in 10.6. All the Eudora files seem to be in place. The spell check works when using a backup copy of Eudora that was made before converting from OS 10.5.8 to 10
-
After updates to newer vision iOS 7.0.4 my iPhone 4 is become slow, so please tell me what to do.