Create standby having offline dropped datafile .
Hi,
How to deal with offline dropped datafiles on source when creating standby .
I've 4 node rac, and one tablespace offline and related bigdatafile droped offline (because of corruption).
SQL> select tablespace_name , status from dba_tablespaces order by status ;
TABLESPACE_NAME STATUS
OLD_TBS OFFLINE
SQL> select TS#,STATUS,ENABLED from v$datafile order by status;
TS# STATUS ENABLED
16 OFFLINE DISABLED
Its 4 node RAC 10.2.0.3 and ASM .
select name,TS#,STATUS,ENABLED from v$datafile order by status
+DBG1/dbname/datafile/bigfile.279.615031073
Currently I'm doing something like that
rman target /
catalog backuppiece '/oarch/backup/bigfile.279.615031073';
run{
allocate channel ch1 type disk;
SET NEWNAME FOR DATAFILE 16 TO '+DBG1';
restore datafile 16 from tag='TAG20100209T124507';
SWITCH DATAFILE 16;
release channel ch1;
and then after duplicate is end
SQL> alter database datafile 16 offline drop;
SQL> recover automatic standby database;Please advice.
Regards
GregG
Hi GregG,
I think there is no requirement to file the request with Oracle. :-) Please check the below testcase where I tried to simulate the scenario this time by using RMAN.
Primary Database: oraprd
Physical Standby database: oraphy
SYS @ oraprd>select tablespace_name,file_id from dba_data_files;
TABLESPACE_NAME FILE_ID
SYSTEM 1
SYSAUX 2
UNDOTBS1 3
USERS 4
TEST 5
SYS @ oraprd>select TS#,file#,STATUS,ENABLED from v$datafile order by status;
TS# FILE# STATUS ENABLED
6 5 OFFLINE DISABLED
1 2 ONLINE READ WRITE
2 3 ONLINE READ WRITE
4 4 ONLINE READ WRITE
0 1 SYSTEM READ WRITEConfigure catalog (controlfile) to exclude an offline tablespace TEST and perform the full database backup with standby control file
C:\>rman target sys/abc123@oraprd
connected to target database: ORAPRD (DBID=2633932676)
RMAN> configure exclude for tablespace 'TEST';
using target database control file instead of recovery catalog
Tablespace TEST will be excluded from future whole database backups
new RMAN configuration parameters are successfully storedprimary database backup with standby control file
RMAN> run{
2> allocate channel d1 type disk;
3> allocate channel d2 type disk;
4> backup database format 'c:\temp\rman_oraprd_%U.bkp';
5> backup archivelog all format 'c:\temp\rman_arch_%U.bkp';
6> backup current controlfile for standby format 'c:\temp\rman_standby_%U.bkp';
7> }
released channel: ORA_DISK_1
allocated channel: d1
channel d1: SID=9 device type=DISK
allocated channel: d2
channel d2: SID=143 device type=DISK
Starting backup at 15-JUN-12
file 5 is excluded from whole database backup <===
channel d1: starting full datafile backup set
channel d1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\APP\XYZ\ORADATA\ORAPRD\ORAPRD\DATAFILE\O1_MF_SYSTEM_DATA_D-ORA11PRD_I-2924940358_TS-SYSTEM_FNO-1_07NDBK6A_.DBF
input datafile file number=00003 name=C:\APP\XYZ\ORADATA\ORAPRD\ORAPRD\DATAFILE\O1_MF_UNDOTBS1_DATA_D-ORA11PRD_I-2924940358_TS-UNDOTBS1_FNO-3_0ANDBK7H_.DBF
channel d1: starting piece 1 at 15-JUN-12
channel d2: starting full datafile backup set
channel d2: specifying datafile(s) in backup set
input datafile file number=00002 name=C:\APP\XYZ\ORADATA\ORAPRD\ORAPRD\DATAFILE\O1_MF_SYSAUX_DATA_D-ORA11PRD_I-2924940358_TS-SYSAUX_FNO-2_08NDBK6A_.DBF
input datafile file number=00004 name=C:\APP\XYZ\ORADATA\ORAPRD\ORAPRD\DATAFILE\O1_MF_USERS_DATA_D-ORA11PRD_I-2924940358_TS-USERS_FNO-4_09NDBK6B_.DBF
channel d1: specifying datafile(s) in backup set
including standby control file in backup set
channel d1: starting piece 1 at 15-JUN-12
channel d1: finished piece 1 at 15-JUN-12
piece handle=C:\TEMP\RMAN_STANDBY_0VNDJJR2_1_1.BKP tag=TAG20120615T123858 commen
t=NONE
channel d1: backup set complete, elapsed time: 00:00:03
Finished backup at 15-JUN-12
released channel: d1
released channel: d2
RMAN> exitBuild the physical standby database using RMAN
C:\>rman target sys/abc123@oraprd auxiliary sys/abc123@oraphy
connected to target database: ORAPRD (DBID=2633932676)
connected to auxiliary database: ORAPRD (not mounted)
RMAN>
RMAN> run{
2> allocate auxiliary channel a1 type disk;
3> allocate auxiliary channel a2 type disk;
4> duplicate target database for standby nofilenamecheck;
5> }
using target database control file instead of recovery catalog
allocated channel: a1
channel a1: SID=134 device type=DISK
allocated channel: a2
channel a2: SID=10 device type=DISK
Starting Duplicate Db at 15-JUN-12
contents of Memory Script:
restore clone standby controlfile;
executing command: SET NEWNAME
Starting restore at 15-JUN-12
file 5 is excluded from whole database backup <==
channel a1: starting datafile backup set restore
channel a1: specifying datafile(s) to restore from backup set
channel a1: restoring datafile 00002 to C:\APP\XYZ\ORADATA\ORAPRD\ORAPHY\DATAFILE\O1_MF_SYSAUX_DATA_D-ORA11PRD_I-2924940358_TS-SYSAUX_FNO-2_08NDBK6A_.DBF
channel a1: restoring datafile 00004 to C:\APP\XYZ\ORADATA\ORAPRD\ORAPHY\DATAFILE\O1_MF_USERS_DATA_D-ORA11PRD_I-2924940358_TS-USERS_FNO-4_09NDBK6B_.DBF
channel a1: reading from backup piece C:\TEMP\RMAN_ORAPRD_0PNDJJN7_1_1.BKP
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=786026596 file name=C:\APP\XYZ\ORADATA\ORAPHY\ORAPHY\DATAFILE\O1_MF_UNDOTBS1_7XPWYO19_.DBF
datafile 4 switched to datafile copy
input datafile copy RECID=11 STAMP=786026596 file name=C:\APP\XYZ\ORADATA\ORAPHY\ORAPHY\DATAFILE\O1_MF_USERS_7XPWYN8N_.DBF
Finished Duplicate Db at 15-JUN-12
released channel: a1
released channel: a2
RMAN>start the managed recovery
SYS @ oraphy>recover managed standby database disconnect;
Media recovery complete.
SYS @ oraphy>select TS#,file#,STATUS,ENABLED from v$datafile order by status;
TS# FILE# STATUS ENABLED
6 5 OFFLINE DISABLED
1 2 ONLINE READ WRITE
2 3 ONLINE READ WRITE
4 4 ONLINE READ WRITE
0 1 SYSTEM READ WRITE
SYS @ oraphy>select thread#,sequence#,process,status from v$managed_standby;
THREAD# SEQUENCE# PROCESS STATUS
1 24 RFS IDLE
1 22 MRP0 WAIT_FOR_GAP <---------------
....archive the current log on the primary database
SYS @ oraprd>select thread#,sequence#,status from v$log;
THREAD# SEQUENCE# STATUS
1 22 INACTIVE
1 23 ACTIVE
1 24 CURRENT
SYS @ oraprd>alter system archive log current;
System altered.
SYS @ oraphy>select thread#,sequence#,process,status from v$managed_standby;
THREAD# SEQUENCE# PROCESS STATUS
1 25 RFS IDLE
1 25 MRP0 WAIT_FOR_LOG <-------- the recovery is in progress on the standby database.
....Regards,
Vaibhav
Similar Messages
-
After offline drop datafile, v$datafile.status='RECOVER'
OS version:
[oracle@base ~]$ uname -a
Linux base.no.sohu.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
DB version:
SQL> select version from v$instance;
VERSION
9.2.0.1.0Here is my steps,
SQL>alter database datafile '/usr/oradata/bill/soq05.dbf' offline;
Database altered.
SQL>alter database datafile '/usr/oradata/bill/soq05.dbf' offline drop;
Database altered.Cause there is nothing errors generated, I thought the commands executed sucessfully. But it's not.
SQL> SELECT NAME,STATUS FROM v$datafile WHERE NAME='/usr/oradata/bill/soq05.dbf';
NAME STATUS
/usr/oradata/bill/soq05.dbf RECOVER
SQL> SELECT FILE#, STATUS, ERROR, RECOVER, TABLESPACE_NAME, NAME
2 FROM V$DATAFILE_HEADER
3 WHERE RECOVER = 'YES' OR (RECOVER IS NULL AND ERROR IS NOT NULL);
FILE# STATUS ERROR RECOVER TABLESPACE_NAME NAME
18 OFFLINE YES SOQ /usr/oradata/bill/soq05.dbf
[oracle@base ~]$ ll /usr/oradata/bill/soq05.dbf
-rw-r----- 1 oracle oinstall 1073750016 Aug 28 17:39 /usr/oradata/bill/soq05.dbfThe datafile haven't been droped successfully and its status changed to 'RECOVER'. Also, I can't online it now.
What should I do to make this datafile droped or at least make it online/offline? What I am worry is the database will be failed to restart because of this 'RECOVER' datafile.
Thanks very much!
SatineHey Werner,
Thanks very much for your help.
The reason I tried to drop the datafile is after I add the datafile to tablespace, I found the datafile failed to be created on the standby side because the parameter "db_file_name_convert"'s value were incorrect. When I created the datafile on primary side, the value of "db_file_name_convert" was,
SQL> select name,value from v$parameter where name='db_file_name_convert';
NAME VALUE
db_file_name_convert /home/oracle/bill/oradata/bill, /U02/bill/oradata/billIt should be VALUE='/usr/oradata/bill','/U02/bill/oradata/bill'. For now the datafile's status on standby side is,
SQL> SELECT name,status FROM V$DATAFILE where file#=18;
NAME STATUS
/U02/bill/product/9.2.0.1/dbs/UNNAMED00018 RECOVERIf the datafile on primary side could been recovered successfully, is there a way to make the datafile on standby side also correct?
Thanks
Satine -
Datafile Offline dropped.
I have added a datafile to a tablespace and did the offline drop immediately since it was not adhering to the naming convention.
Is their a way I can get rid off that file since the controlfile still has that entry.
I can't drop and recreate the tablespace bec. of the size constraint (250GB).
DB version: 9.2.0.7
Any help would be really appreciable.Hi
Have a look at Note:111316.1.
Hope this Helps
Regards -
Dear all,
In my DB, one datafile got corrupted. DB running in noarchive log mode. I took a complete export of the DB. now I took the datafile offline by
alter database datafile 7 offline drop;
now I can able to open the database, now what should I do ?.. still in dba_data_files, this corrupted file is shown..shall I drop this file alone ?.. how ?..I have already 2 other datafiles in the same tablespace ..
KaiIn my DB, one datafile got corruptedHOW??
alter database datafile 7 offline drop; It seems you are using version lower than 10g.This will offline the datafile with the intention of dropping the tablespace.Oracle no longer attempts to access it, but it is still considered part of that tablespace.The datafile is marked offline in the controlfile.So, you will see the datafile in the dba_data_files.The data in the offline datafile won't be available to the users.
But from 10g and higher version, you can finally drop the datafile
alter tablespace tbs_name drop datafile 'datafile_name';
10g link [http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/dfiles.htm#sthref1396]
now I can able to open the database, now what should I do ?What actually you want to do. what do you want to do.
HTH
Anand -
Add temporary datafiles after creating standby database
I used data guard manager to create standby database and it went fine. Before finish, system pop up a window and says,
"The data guard configuration has been created in a disabled state. It must be enabled using the Enable option in the configuration menu. Pior to ebaling the configuration, please verify the following:
The Primary database contains temporary datafiles. The files will not be duplicated in the new standby database. You must manually recreate the temporary files on the standby node by adding them to their respective tablespaces in the standby database after creation process in complete."
The problem is, in the standby database, how do I add tempfile without open the standby database? the documentation is very unclear...Thanks for the reply and the useful link. I had followed the instructions when creating the standby database, although under database options there is a difference between the OEM version we are using and the version shown, whereby the 'RMAN backup location' option has been replaced with 'working directory location'.
Just found the following and am guessing this is the issue.
NFS mounts established within a zone are local to that zone. The mounts cannot be accessed from other zones, including the global zone.
I suspect I will need to copy the backup pieces onto the local server in order to create the standby database using OEM. Not something I was expecting to have to do as copying will take a long time due to the size of the backup, but unless anyone else can shed any light on the reason for the initial error
RMAN Backup Location - The specified RMAN backup is invalid. Could not identify controlfile from the backup
then I guess this is the only way forward.
Regards,
JP -
How to drop datafiles in oracle 10g r2
Hi all,
Db :oracle 10.2.0.3
os:solaris 10
tablespace name: jllp_tabs01
datafile:
/ora/data001/jllp/jllp_tbs01_tbl_1.dbf
/ora/data001/jllp/jllp_tbs01_tbl_2.dbf
/ora/data001/jllp/jllp_tbs01_tbl_3.dbf
/ora/data001/jllp/jllp_tbs01_tbl_4.dbf
its has consisting of 4 datafiles, I need to drop the 2 of them perminently.
the datafile are having data.
how to drop the datafiles.
please suggest me.There is no way to drop the datafiles once they are added to the tablespace. The command given by Asif , offline drop won't actually drop the datafile but would be an indication only to Oracle that you would be dropping the entire tablespace after issuing this command. In 11g, there is a command to drop the datafile but only if it's completely empty.
HTH
Aman.... -
DROP DATAFILE in Oracle 10g Rel2
Hi,
I have dropped my test tablespace and forgot to include:
'INCLUDING CONTENTS AND DATAFILES;'
Now the tablespace is gone but the data file is ofcourse there.
If I do following:
ALTER DATABASE DATAFILE 'C:\ORACLE\ORADATA\ORABASE\TOOLS02.TOM'
OFFLINE DROP;
I get the error message:
ORA-01516: nonexistent log file, datafile, or tempfile "C:\temp\ts_test.dbf"
I checked the dba_data_files view and can not see the file.
Can I just delete the file manually or do I need to
to create a new tablespace and move the datafile to the new tablespace.
And than drop the new tablespace including datafile and contents?
ThanksHi,
>>Can I just delete the file manually ...
Yes, you can
Cheers -
Hi mates,
I dropped a newly created datafile in a tablespace that has two datafiles.
The syntax used is : startup mount;
alter database datafile 'c\oradata\ooo.df01' offline drop;
DATABASE ALTERED.
Now the datafile still shows as available in the DBA_DATA_FILES and the OEM..
What could be going wrong?
Do i need to do an os delete?
Is it not possible to drop a datafile atall?
Appreciate any response...
Cheers!!!!Hello All,
Our database is in archive log mode and we are running oracle 9i.
We had to release disk space occupied by a tablespace which is used for temporary contents. (Used as temp tablespace).
For this we have made a few datafiles in that as offline drop. As explained in the forum, the datafiles are still showing up in dba_data_files in recover state.
Hence, we decided to make the datafiles online again but now we are getting error that the file needs media recovery. We can keep the files offline.
My concern is if the database is shutdown for backup purposes, will it give error during restart? Also do we need to recover the database in that case? If yes then will only recover database command work?
Regards,
Anup -
Hi,
I have accidently dropped SYSAUX datafile... How can I recover it?
I used " ALTER DATABASE DATAFILE ‘<datafile name with complete path>’ OFFLINE DROP;" to drop the datafile...
Please suggest me...
Thanks
KSGThe first question I would like to have been answerred is the fact if the datafile still exists on the filesystem ? The second question would be if you are running in archive log mode ? If so you could try the following approach, if no archive logs are there and no backup:
- The alter database command has only removed the entry from the controlfile, so the datafile is only missing there as an administrative problem.
- alter database backup controlfile to trace; (trace file containing the controlfile create script)
- add in the script the dropped datafile.
- Bring down the database with an shutdown immediate
- make a backup from the whole database (just to have your start position always there !!)
- run the create controlfile script.
You could end up with a database which will not open due to recovery issues, but probably this is fixable.
Regards, Gerwin -
ORA-19505: failed to identify file - RMAN in creating standby DR database.
I got this error when creating standby database at remote target server.
ORA-19505: failed to identify file "/backup/dxp1p/online/DXP1P_CF_c-2027711285-20131204-01"
Here is what I did:
1. started the listener and created corresponding tnsnames entry at remote standyb server
2. startup nomount to the standby database at remote server for an empty instance (instance name dxp1p).
3. All rman backups are in the /backup mount point at primary and the mount point is shared on the remote server as nfs. So, whatever have in the backup we should be able to see and read from the remote as well.
4. Run the following at primary rman:
sql 'alter system archive log current';
backup current controlfile for standby;
sql 'alter system archive log current';
crosscheck backup;
crosscheck archivelog all;
exit
5. Start the rman command from primary after connected to the standby server, as the primary DB uses ASM and the standby DB uses file system for the database files:
RUN
SET NEWNAME FOR DATAFILE 1 to '/u01/dxp1p/data/system01.dbf';
SET NEWNAME FOR DATAFILE 2 to '/u01/dxp1p/data/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 to '/u01/dxp1p/data/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 to '/u01/dxp1p/data/users01.dbf';
SET NEWNAME FOR DATAFILE 5 to '/u01/dxp1p/data/fxtntdata.dbf';
SET NEWNAME FOR DATAFILE 6 to '/u01/dxp1p/data/fxtntindex.dbf';
SET NEWNAME FOR DATAFILE 7 to '/u01/dxp1p/data/mlogs.dbf';
SET NEWNAME FOR DATAFILE 8 to '/u01/dxp1p/data/dts.dbf';
SET NEWNAME FOR DATAFILE 9 to '/u01/dxp1p/data/dxpsoa.dbf';
SET NEWNAME FOR DATAFILE 10 to '/u01/dxp1p/data/expresso_ts.dbf';
SET NEWNAME FOR DATAFILE 11 to '/u01/dxp1p/data/jms_ts.dbf';
SET NEWNAME FOR DATAFILE 12 to '/u01/dxp1p/data/uup_ts.dbf';
SET NEWNAME FOR DATAFILE 13 to '/u01/dxp1p/data/newpage_ts.dbf';
ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
DUPLICATE TARGET DATABASE for standby
nofilenamecheck
dorecover;
========================================================================
But I got this error from the rman log:
contents of Memory Script:
set until scn 12245784375453;
restore clone standby controlfile;
executing Memory Script
executing command: SET until clause
Starting restore at 04-DEC-13
channel aux1: starting datafile backup set restore
channel aux1: restoring control file
channel aux1: reading from backup piece /backup/dxp1p/online/DXP1P_CF_c-2027711285-20131204-01
channel aux1: ORA-19870: error while restoring backup piece /backup/dxp1p/online/DXP1P_CF_c-2027711285-20131204-01
ORA-19505: failed to identify file "/backup/dxp1p/online/DXP1P_CF_c-2027711285-20131204-01"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel aux1: starting datafile backup set restore
channel aux1: restoring control file
channel aux1: reading from backup piece /backup/dxp1p/online/DXP1P_20131204_833310136_464
channel aux1: ORA-19870: error while restoring backup piece /backup/dxp1p/online/DXP1P_20131204_833310136_464
ORA-19505: failed to identify file "/backup/dxp1p/online/DXP1P_20131204_833310136_464"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
failover to previous backup
channel aux1: starting datafile backup set restore
channel aux1: restoring control file
channel aux1: reading from backup piece /backup/dxp1p/online/DXP1P_CF_c-2027711285-20131204-00
channel aux1: ORA-19504: failed to create file "/oracle/product/11g/dbs/u02/dxp1p/control/control02.ctl"
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 1
ORA-19600: input file is control file (/u01/dxp1p/control/control01.ctl)
ORA-19601: output file is control file (/oracle/product/11g/dbs/u02/dxp1p/control/control02.ctl)
Finished restore at 04-DEC-13
contents of Memory Script:
sql clone 'alter database mount standby database';
executing Memory Script
sql statement: alter database mount standby database
released channel: aux1
released channel: aux2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/04/2013 19:06:13
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 12/04/2013 19:06:13
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
ORA-00205: error in identifying control file, check alert log for more info
=========================================
Not sure why, can somebody help? Appreciated!I used company regular script to login to standby instance as sys user from primary DB RMAN as oracle OS user and sys DB user. We normally run this way for years.
Like this:
$ORACLE_HOME/bin/rman target=/ auxiliary 'sys/sys0rapr321!'@dxp1p_s11 CMDFILE=${HOME}/dba/scripts/rman_cr_dr.cmd
rman_cr_dr.cmd:
RUN
SET NEWNAME FOR DATAFILE 1 to '/u01/dxp1p/data/system01.dbf';
SET NEWNAME FOR DATAFILE 2 to '/u01/dxp1p/data/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 to '/u01/dxp1p/data/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 to '/u01/dxp1p/data/users01.dbf';
SET NEWNAME FOR DATAFILE 5 to '/u01/dxp1p/data/fxtntdata.dbf';
SET NEWNAME FOR DATAFILE 6 to '/u01/dxp1p/data/fxtntindex.dbf';
SET NEWNAME FOR DATAFILE 7 to '/u01/dxp1p/data/mlogs.dbf';
SET NEWNAME FOR DATAFILE 8 to '/u01/dxp1p/data/dts.dbf';
SET NEWNAME FOR DATAFILE 9 to '/u01/dxp1p/data/dxpsoa.dbf';
SET NEWNAME FOR DATAFILE 10 to '/u01/dxp1p/data/expresso_ts.dbf';
SET NEWNAME FOR DATAFILE 11 to '/u01/dxp1p/data/jms_ts.dbf';
SET NEWNAME FOR DATAFILE 12 to '/u01/dxp1p/data/uup_ts.dbf';
SET NEWNAME FOR DATAFILE 13 to '/u01/dxp1p/data/newpage_ts.dbf';
ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
DUPLICATE TARGET DATABASE for standby
nofilenamecheck
dorecover;
exit
==========================
Oinstall is a group. I am not sure to use oinstall as a user? -
How to create standby controlfile from restored backup
Hi Techies,
I am re-building one of my DR server, Source and target DB is oracle 10g.
I have taken the source backup which is going to be restored on target, But I forgot to take a standby controlfile from source DB at the time (Pre/Post) backup.
Now the issue is I can create a standby controlfile on primary and copy the same to target, But so many datafiles are added after the backup which I have taken to restore and medias are already shipped.
I can send the other set of backup to DR site, but it takes a week time and I don't want to do that If I can regenerate it.
So any clue to create standby controlfile on target with restored datafiles?
Regards,
Nick LoyHmm... sounds like you perform this in a rather manual fashion...
Do you use RMAN for taking the backups?
Or maybe the BR*TOOLS?
With these tools you are usually safe from such mistakes - I can only recommend to use them!
However, since you don't have a control file at all on the target side, the only thing left to do would be to
ALTER DATABASE BACKUP CONTROLFILE TO TRACE NORESETLOGS;
on the primary side and manually remove the files that have been added since you took the backup from the control file script,
Afterwards you use the script on the standby side to create the control files.
regards,
Lars -
Problem when create standby database
hello,
I have two server(NT4.0,SP6) installed Oracle 8i(8.1.6 Enterprise) at the same directory.I want one as the primary database,another one as the standby database.
The two database have the same SID,use SQL*Plus it can access each other.
My operating steps as below:
1.on primary server:
1)connect internal;
2)shutdown immediate;
3)copy all datafiles(*.DBF) to a backup directory;
4)startup
5)alter database create standby controlfile as 'd:\oracle\ora81\ILLDB\standby.ctl'
6)alter system archive log current
2.on standby server:
1)copy all backuped datafile,standby.ctl,all redo log files from primary server to standby server,overwrite all same name files;
2)modify the init.ora,add this parameter:
"standby_archive_dest = "location=D:\Oracle\oradata\ILLDB\archive" ";
3)statup oracle service in Service control manel;
4)run svrmgrl.exe;
5)startup nomount;
6)alter database mount standby database;
then a error message appear:
"ORA-01665 controlfile is not a standby controlfile".
I don't know which step is mistake.Please tell me correct steps.
ThanksI did face the similar problem while trying to create and startup a clone database for Point in Time Recovery (PITR). The error message is
ORA-01696 controlfile is not a clone controlfile
Are you folks have any idea how do I resolve this problem?? Is there any way to create clone control file?? -
Creating Standby Database / Steps might be missing..
I have created standby database..
The archives are copied except one archived log and those copied archived are not applied at Standby database.
Besides this issue, I just checked the alert log file and pasting its contents here.
Do check it and let me know If I m missing any paramter[s].
Dump file c:\oracle\product\10.2.0\admin\rockstd\bdump\alert_rockstd.log
Mon May 12 15:23:42 2008
ORACLE V10.2.0.1.0 - Production vsnsta=0
vsnsql=14 vsnxtr=3
Windows XP Version V5.1 Service Pack 2
CPU : 2 - type 586
Process Affinity : 0x00000000
Memory (Avail/Total): Ph:1194M/2038M, Ph+PgF:1368M/2641M, VA:1940M/2047M
Mon May 12 15:23:42 2008
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Autotune of undo retention is turned on.
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.1.0.
System parameters with non-default values:
processes = 150
sga_target = 167772160
control_files = C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\ROCKSTD.CTL
db_block_size = 8192
compatible = 10.2.0.1.0
log_archive_dest_1 = location=C:\oracle\product\10.2.0\oradata\rockstd\Archive_rock
log_archive_dest_state_1 = ENABLE
log_archive_format = arc_%s_%t_%r.arc
fal_client = ROCKSTD
fal_server = ROCK
db_file_multiblock_read_count= 16
db_recovery_file_dest = C:\oracle\product\10.2.0\flash_recovery_area\rockstd
db_recovery_file_dest_size= 2147483648
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain =
dispatchers = (PROTOCOL=TCP) (SERVICE=rockXDB)
job_queue_processes = 10
audit_file_dest = C:\ORACLE\PRODUCT\10.2.0\ADMIN\ROCKSTD\ADUMP
background_dump_dest = C:\ORACLE\PRODUCT\10.2.0\ADMIN\ROCKSTD\BDUMP
user_dump_dest = C:\ORACLE\PRODUCT\10.2.0\ADMIN\ROCKSTD\UDUMP
core_dump_dest = C:\ORACLE\PRODUCT\10.2.0\ADMIN\ROCKSTD\CDUMP
db_name = rock
db_unique_name = rockstd
open_cursors = 300
pga_aggregate_target = 16777216
PMON started with pid=2, OS id=3656
PSP0 started with pid=3, OS id=504
MMAN started with pid=4, OS id=2544
DBW0 started with pid=5, OS id=3652
LGWR started with pid=6, OS id=552
CKPT started with pid=7, OS id=2688
SMON started with pid=8, OS id=3436
RECO started with pid=9, OS id=3696
CJQ0 started with pid=10, OS id=1636
MMON started with pid=11, OS id=2072
MMNL started with pid=12, OS id=3812
Mon May 12 15:23:43 2008
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
Mon May 12 15:24:06 2008
alter database mount standby database
Mon May 12 15:24:11 2008
Setting recovery target incarnation to 14
ARCH: STARTING ARCH PROCESSES
ARC0 started with pid=16, OS id=3536
Mon May 12 15:24:11 2008
ARC0: Archival started
ARC1 started with pid=17, OS id=4084
Mon May 12 15:24:12 2008
ARC1: Archival started
ARCH: STARTING ARCH PROCESSES COMPLETE
Mon May 12 15:24:12 2008
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
ARC1: Thread not mounted
Mon May 12 15:24:12 2008
Successful mount of redo thread 1, with mount id 3275426006
Mon May 12 15:24:12 2008
Physical Standby Database mounted.
Mon May 12 15:24:13 2008
ARC0: Becoming the heartbeat ARCH
Completed: alter database mount standby database
Mon May 12 15:25:02 2008
Using STANDBY_ARCHIVE_DEST parameter default value as C:\oracle\product\10.2.0\oradata\rockstd\Archive_rock
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 3444
RFS[1]: Identified database type as 'physical standby'
Mon May 12 15:25:02 2008
RFS LogMiner: Client disabled from further notification
Mon May 12 15:25:21 2008
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Mon May 12 15:26:19 2008
alter database add standby logfile 'C:\oracle\product\10.2.0\oradata\rockstd\redo04.log' size 50m
Mon May 12 15:26:20 2008
Completed: alter database add standby logfile 'C:\oracle\product\10.2.0\oradata\rockstd\redo04.log' size 50m
Mon May 12 15:26:27 2008
alter database add standby logfile 'C:\oracle\product\10.2.0\oradata\rockstd\redo05.log' size 50m
Completed: alter database add standby logfile 'C:\oracle\product\10.2.0\oradata\rockstd\redo05.log' size 50m
Mon May 12 15:26:33 2008
alter database add standby logfile 'C:\oracle\product\10.2.0\oradata\rockstd\redo06.log' size 50m
Mon May 12 15:26:34 2008
Completed: alter database add standby logfile 'C:\oracle\product\10.2.0\oradata\rockstd\redo06.log' size 50m
Mon May 12 15:27:20 2008
alter database recover managed standby database disconnect from session
MRP0 started with pid=19, OS id=596
Managed Standby Recovery not using Real Time Apply
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_dbw0_3652.trc:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM01.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_dbw0_3652.trc:
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\UNDOTBS01.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_dbw0_3652.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSAUX01.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_dbw0_3652.trc:
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\TESTING1.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_dbw0_3652.trc:
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM03.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_dbw0_3652.trc:
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\ABAMCO_TEST01.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
MRP0: Background Media Recovery terminated with error 1110
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_mrp0_596.trc:
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM01.DBF'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM01.DBF'
Mon May 12 15:27:26 2008
Errors in file c:\oracle\product\10.2.0\admin\rockstd\bdump\rockstd_mrp0_596.trc:
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM01.DBF'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM01.DBF'
Mon May 12 15:27:27 2008
Completed: alter database recover managed standby database disconnect from session
Mon May 12 15:30:18 2008
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[2]: Assigned to RFS process 2456
RFS[2]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Mon May 12 15:30:22 2008
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[3]: Assigned to RFS process 3124
RFS[3]: Identified database type as 'physical standby'
RFS[3]: Successfully opened standby log 5: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO05.LOG'
Mon May 12 15:53:45 2008
RFS[3]: Successfully opened standby log 5: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO05.LOG'
Mon May 12 15:53:46 2008
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Mon May 12 15:53:58 2008
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Mon May 12 16:00:06 2008
RFS[3]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Mon May 12 16:00:09 2008
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Mon May 12 16:00:14 2008
RFS[3]: Successfully opened standby log 5: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO05.LOG'
Mon May 12 16:00:18 2008
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCKSTD\REDO04.LOG'
Regards,
Rakesh Soni.Done, I've given the same path in Standby Database [datafiles, controlfiles] as it has been given in the Primary Database.
MoreOver, I m manually switching logfiles at primary database [alter system switch logfile] they are copied and applied sucessfully at standby database. But the archived files that I have copied with cold backup are not applied yet. Infact they are not retrieved executing the below query.
select name, applied from v$archived_log;
How can I apply those archived logs? [archives that copied with cold backup]
Regards. -
Can I drop datafiles individually, or do I need to drop the entire tablespace? The ALTER TABLESPACE command doesn't appear to have a drop datafile clause. I've dropped enough objects in the tablespace to reduce the amount of space used to 1%, but there are still a dozen objects including tables and indexes. There are also references to and from these objects to objects in other tablespaces.
Kevin TysonALTER DATABASE dbname
DATAFILE filename OFFLINE DROP;
Does not actually drop datafiles. It only takes them offline if the database is in noarchivelog mode.
However, that section in the SQL reference goes on to say...
"However, the DROP clause does not remove the datafile from the database. To do that, you must drop the tablespace in which the datafile resides. "
Which answers my question. -
DROP DATAFILE FROM A TABLESPACE
What is the difference between "ALTER TABLESPACE DROP DATAFILE ..." and "ALTER DATABASE DATAFILE ... OFFLINE DROP"?
I read the Oracle document before, it tolds me that the "ALTER DATABASE DATAFILE ... OFFLINE DROP" is not really drop data file. But, does the "ALTER TABLESPACE DROP DATAFILE ..." really drop data file?"ALTER DATABASE DATAFILE ... OFFLINE DROP"
will take datafile offline to drop it later. In this case your control file will need to be recreated to de-link the datafile from database.
From 10g onwards you can ALTER TABLESPACE DROP DATAFILE... but in this case datafile should not contain any data in it.
Maybe you are looking for
-
How do I open a pdf document and comment with others in real time?
I would like to use the same tools available for whiteboard during a 'meeting' but draw on an existing file.
-
ITunes cannot find album artworks
Hello, I imported some purchased Cd's I have at home to iTunes and the album artwork does not appear. I tried all the ways to make iTunes get the artwork as the iTunes help says and still, "artwork could not be found". Is there a way I can make iTune
-
Cancellation of time sheet data
Hi, Functionality exists in SAP to remove recorded time records in CATS. The standard program that picks up data from the infotype tables and uploads to the infotypes reads the STOKZ field in the interface table PTEX2000 and removes records with STOK
-
Need query to find out standby database sync information
Hi All, Please provide me query which give me information about how many standby database configured .I need to generate report hourly sync information of database in our project. I have more than 120 production db and some db having more than one st
-
Will BIOS update help wtih sound problem?
I have a problem getting sound working with linux on a 3000 (an N200 0769 in my case) that many other people have reported: sound only works with ACPI off. I asked for help on the Mandriva forums and was told to check if there are any relevant BIOS u