recovery scenario [message #314449] |
Wed, 16 April 2008 14:13 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1247900 bytes
Variable Size 75498852 bytes
Database Buffers 88080384 bytes
Redo Buffers 2945024 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: 'K:\ORAREP92\ORADATA\ORCL10G\USERS01.DBF'
SQL> 1 alter database create datafile 'K:\orarep92\oradata\orcl10g\users01.dbf'
2 as 'k:\orarep92\oradata\orcl10g\users.dbf'
SQL> /
alter database create datafile 'K:\orarep92\oradata\orcl10g\users01.dbf'
*
ERROR at line 1:
ORA-01178: file 4 created before last CREATE CONTROLFILE, cannot recreate
ORA-01110: data file 4: 'K:\ORAREP92\ORADATA\ORCL10G\USERS01.DBF'
If file 4 is not created before last create controlfile then how would control file know about file 4?
Why the error?
EDIT:sorry for posting again in wrong forum as i visit server adminsitration more.
[Updated on: Wed, 16 April 2008 14:14] Report message to a moderator
|
|
|
|
|
|
Re: recovery scenario [message #314528 is a reply to message #314449] |
Thu, 17 April 2008 01:33 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
I did not create any new controlfile.
I did create this tablespace later on.
Quote: | That's the problem, the file was created BEFORE the last CREATE CONTROLFILE.
|
So is for all the tablespaces.
Let me understand it:
1)If a database is created with 4 tablespace and later on if itry to recover any datafile by the empty datafile way,there is no problem
because the controlfile has sufficient information about all the files
2)if i create a database with 4 tablespaces and later on issue create controlfile statement,then neither of the datafiles can be recovered with empty datafile way.
3)if I create a database with 4 tablespaces and issue create controlfile statement and after that create another tablepsace "xyz",then only "xyz" can be recovered with create empty file way.
Is this the way it has to be?
|
|
|
|
Re: recovery scenario [message #314764 is a reply to message #314449] |
Thu, 17 April 2008 13:27 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
SQL> select controlfile_created from v$database;
CONTROLFI
---------
12-FEB-08
SQL> select creation_time from v$datafile
2 where name = 'K:\ORAREP92\ORADATA\ORCL10G\USERS01.DBF';
CREATION_
---------
30-AUG-05
SQL> select created from v$database;
CREATED
---------
12-FEB-08
I don't believe this time .
I don't remember exactly but 12-feb-08 might be when i created the database and hence controlfile.
But 30-AUG-05 is impossible.This database is not that much old.
There is some anomaly with the time.
I shall test some scenarios and see what happens.
[Updated on: Thu, 17 April 2008 13:50] Report message to a moderator
|
|
|