现象:
Getting errors like below when trying to create pfile from spfile:
SQL> create pfile from spfile;
create pfile from spfile
*
ERROR at line 1:
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Note that the errors as such may vary. With Oracle 11.2 on Linux, next errors may be encountered:
SQL> create pfile from spfile;
create pfile from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file '?/dbs/spfile@.ora'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
原因:
The database was not started with an spfile.
The following command shows the spfile parameter is unset:
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
If an spfile was used to start the database, the value of the spfile will be the path and filename of the spfile.
If the value is null, as above, then an spfile was not used to start the database.
处理方法:
-- To implement the solution, please execute the following steps:
Either:
1. Restart the database using the spfile
- OR -
2. specify the full paths for the pfile and spfile, as follows:
SQL> create pfile='full path and filename of the pfile>' from spfile = '<full path and filename of the spfile>';
|