Unable to start oracle database after trying to enable archive log mode on
-
11-10-2020 - |
سؤال
I am facing this unusual issue. I wanted to enable archive log mode from noarchivelog mode and used alter command for the same as ALTER SYSTEM SET log_archive_dest='LOCATION=D:\Oracle\Redo Log Archive\'
and then shutdown the database. When i tried to restart as SQL>STARTUP mount it is giving below error
ORA-16024: parameter LOG_ARCHIVE_DEST_1 cannot be parsed
. After searching the web i tried
sql>ALTER SYSTEM SET log_archive_dest_1='LOCATION=D:\Oracle\Redo Log Archive\' scope=both;
but getting
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
and for the other commands like SQL>archive log list
it showing above error i.e ORA-01034: ORACLE not available
.
P.S: In init.ora in pfile folder there isn't any log_file_dest_1 parameter. Is there any way i could add it manually and start the database or any other way as alter command from sql plus is not working.
المحلول
If there are a bad value in the spfile, you can create a temporary init file and use that.
Login using sqlplus:
C:\>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 14 09:31:21 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
Create a temporary pfile:
SQL> create pfile = 'c:\temp\init.ora' from spfile;
File created.
SQL>
Then you edit that file (c:\temp\init.ora) and remove/fix the parameter for archive destination. Then you do:
startup pfile=c:\temp\init.ora
to get your database started, and then issue:
create spfile from pfile = 'c:\temp\init.ora';
and you should be good to go.
نصائح أخرى
The error ORA-16024 must due to the fact that there are spaces in the provided path.
The init.ora file is a default file provided by the Oracle installer. I'm not sure if you were using it before this change, so it may be very different. However it is a text file that you edit using a notepad or wordpad, and you should be able to add this parameter manually. I suggest you to point this parameter to a directory path without spaces.
BTW, the ORA-1034 is expected since you shutdown the instance and didn´t started it yet.