SPFile Corruption [message #221093] |
Fri, 23 February 2007 16:03 |
jinesh_s4u
Messages: 8 Registered: February 2007
|
Junior Member |
|
|
It is said that you never edit the spfile directly as it corrupts it, but i have done the mistake of editing it directly by opening it in pico editor.
Can anybody help me out about how i fix this error.
As a step towards rectification, i am trying to start the database with these commands
$ SQLPLUS /NOLOG
SQL> CONNECT sys/password as SYSDBA
SQL> STARTUP PFILE = ' /u01/app/oracle/product/10.1.0/db_1/dbs/initedobe.ora'
and it is giving following messages ,
ORACLE instance started.
Total System Global Area 159383552 bytes
Fixed Size 777856 bytes
Variable Size 158343552 bytes
Database Buffers 0 bytes
Redo Buffers 262144 bytes
Database mounted.
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/app/oracle/oradata/edobe/system01.dbf'
ORA-01207: file is more recent than controlfile - old controlfile
On going through the description of the error at
http://ora-01207.ora-code.com/ , it says that repeating the startup and shutdown sequence will eliminate the error. But this has not helped me.
I have also tried to create a new spfile with CREATE SPFILE command, but it has not helped me as it gives the same error when i start the database.
Any help will be appreciated
Thanks
-Jinesh
|
|
|
|
Re: SPFile Corruption [message #221106 is a reply to message #221095] |
Fri, 23 February 2007 22:23 |
jinesh_s4u
Messages: 8 Registered: February 2007
|
Junior Member |
|
|
I have not done the backup earlier. All i had done was copied the control files, and data files to a different location.
Since i have not done the backup with rman or other utility, i don't know how do i do point in time recovery. It will be great if you can tell me how i do that.
And the other thing its difficult to digest for me is that, since i had unintentionally corrupted the spfile, and had not edited the control files or datafiles why after recreating the spfile with the CREATE SPFILE, it is throwing the errors when i start the databse with the new spfile.
-Jinesh.
|
|
|
Re: SPFile Corruption [message #221110 is a reply to message #221106] |
Fri, 23 February 2007 22:51 |
Mohammad Taj
Messages: 2412 Registered: September 2006 Location: Dubai, UAE
|
Senior Member |
|
|
Hi,
SQL> STARTUP PFILE = ' /u01/app/oracle/product/10.1.0/db_1/dbs/initedobe.ora'
Now your database is started with PFILE.
If you already edit SPFILE directly then just create new SPILE from PFILE.
"create spfile from pfile"
or
ORA-01207: file is more recent than controlfile - old controlfile
It is error because of your control file is not recant with your datafile.. really say what you did with your control file ?
regards
Taj
[Updated on: Fri, 23 February 2007 22:51] Report message to a moderator
|
|
|
|
Re: SPFile Corruption [message #221241 is a reply to message #221110] |
Sun, 25 February 2007 23:10 |
jinesh_s4u
Messages: 8 Registered: February 2007
|
Junior Member |
|
|
Hi Taj,
I have already tried to start the databse with
STARTUP PFILE = '$ORACLE_HOME/dbs/initedobe.ora' but still gave me that error.
Also i tried to create a SPFILE from PFILE named initedobe.ora.
and tried to start the databse with these sequence of commands.
1. CREATE SPFLE FROM PFILE = $ORACLE_HOME/dbs/initedobe.ora and this created the binary file spfileedobe.ora
2. STARTUP
and this also gave me the same ORA-01207 error.
The only thing i did in the past was editing the spfileedobe.ora. I have never done anything with controlfiles.
Also according the ORA error code explanation, it says that you keep on trying to start the databse and eventually the sequence number in control file will become higher that that in datafile, but i have tried almost 60-70 times but that has not worked.
Plz help me and take me out of this situation.
Thanks for your help
Jinesh
|
|
|
|
|
Re: SPFile Corruption [message #221389 is a reply to message #221243] |
Mon, 26 February 2007 09:33 |
jinesh_s4u
Messages: 8 Registered: February 2007
|
Junior Member |
|
|
Hi Taj,
i will like to tell couple of things as per your previous reply.
1. I have only one databse on my machine.
2. I have 3 copies of control file and my pfile points to all of them. While create a new spfile from this pfile, it generates a new binary spfile without any errors.
3. when i start the databse with the default STARTUP command, it reads the new spfile created and then throws the ORA-01207 error.
As per your suggestion,
1. I did start the databse with
STARTUP PFILE = $ORACLE_HOME/dbs/init.ora and it points to the latest control files that i have, then it stills throws the same error.
2. With new control file creation, i want to ask couple of things :
a. if i specify all the current datafiles aswell as SYSTEM01.dbf, then is it going to overwrite these datafiles. I don't want these datafiles be over-written as i will loose my data and schema.
b. while specifying the datafiles eg, SYSTEM01.dbf , USER01.dbf and my own datafiles, what SIZE should i specify ?
Thanks Taj,
Jinesh
|
|
|
|
Re: SPFile Corruption [message #221411 is a reply to message #221393] |
Mon, 26 February 2007 10:49 |
jinesh_s4u
Messages: 8 Registered: February 2007
|
Junior Member |
|
|
Hi Taj,
Thanks for your instant reply.
I am getting a error while executing the following query
select bytes/1024/1024 from dba_data_files;
The Error is
select bytes/1024/1024 from dba_data_files
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
I ran the following sequence of Commands
$ sqlplus /NOLOG
SQL> connect sys/oracle as SYSDBA
SQL> STARTUP NOMOUNT
SQL> select bytes/1024/1024 from dba_data_files
and it gave me the error,
so i don't know how to figure out the size of the datafiles.
Let me know so i can create a new control file.
Thank Taj,
-Jinesh
|
|
|
|
|
|
Re: SPFile Corruption [message #221813 is a reply to message #221577] |
Wed, 28 February 2007 09:36 |
jinesh_s4u
Messages: 8 Registered: February 2007
|
Junior Member |
|
|
Hi Taj,
I tried the create control file statement that you had mentioned earlier, but i was unable to specify the size of each Database file. I cannot run the query
select bytes/1024/1024 from dba_data_files;
as my database is not open. It is throwing some error stating that queries can be executed on fixed tables only.
So can you plz mention how do i compute the size of my each datafile in the create control file statement. I tried specifying the actual datafile size but that didn't work. It gave me the following error
ORA-01163: SIZE clause indicates [string] (blocks), but should match header [string] .
Is it fine if i don't specify the datafile size and by doing that the create control file statement computes the datafile size itself ?
Thanks Taj,
- Jinesh
|
|
|
|
Re: SPFile Corruption [message #222822 is a reply to message #222648] |
Tue, 06 March 2007 09:27 |
jinesh_s4u
Messages: 8 Registered: February 2007
|
Junior Member |
|
|
Thank you Vitoshan,
I will try the solution you suggested. As far as I am able to retrieve my database with all the updates saved in the datafile, then i am fine. Since this is my test database its fine if i loose the data in online redo logs.
I will let you know once i am done.
-Jinesh
|
|
|