Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Courrupt SPFILE & no backup - what next?

Status
Not open for further replies.

danielrc15

Programmer
Sep 18, 2003
6
GB
Hi,

I am running 10G on Windows XP, I edited my SPFILE by mistake, and now I believe it is corrupt.

The DB will not startup, all I can do is SQLPLUS /NOLOG.

How can I start my DB back up?

Thanks

Daniel
 
The SPFILE is a binary and should not be edited. It must only be written to by the Oracle process.

It's probably toasted, and I would renamed to get it out of the way so you can create a new one.

When the database created the SPFILE, it should have left the source file in your Oracle directories. The name will be something like initSIDdatetimestamp where SID is the name of your database. Just rename the file to initSID.ora, again replacing SID with the name of your database, then use the SQL*Plus command STARTUP NOMOUNT PFILE='name of that file here'; Once the instance starts, use the command CREATE SPFILE FROM PFILE to create a new SPFILE.

-Mark

9i OCP
 
Thanks for the reply.

The only problem is I keep getting:

ORA-12560: TNS:protocol adapter error

When performing the:

SQL> startup nomount pfile='init.ora'

Could screwing up the spfile and then rebooting really start me getting TNS adaptor errors?

Daniel
 
Daniel,

Strangely, the error, "ORA-12560: TNS:protocol adapter error" usually comes from have an undefined or incorrect value for your ORACLE_HOME system variable. If you are running under XP, then as a temporary workaround, you can go to your Windows XP DOS prompt and issue these commands:
Code:
set ORACLE_HOME=d:\Oracle\Ora92 (or whatever your Oracle Home path is)
set ORACLE_SID=<your instance name>
...then re-connect to "sqlplus /nolog", "connect / as sysdba", and re-try your "startup...".

Let us know your findings.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 00:21 (25Nov04) UTC (aka "GMT" and "Zulu"),
@ 17:21 (24Nov04) Mountain Time
 
Hi,

Thanks for all your help.

I ended up solving my problem by using another XP machine, installing 10G again with exactly the same folders and set up as my problem machine, I then copied over the SPFILE to the problem machine and it started working again.

Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top