Today experiment, change a few system parameters, the results of the database can not be started, error:
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/opt/oracle/product/19c/dbhome_1/dbs/initORCLCDB.ora'
In $ORACLE_HOME/dbs
not find spfile directory, could not find pfile.
But controlfile also:
$ ls -l $ORACLE_BASE/oradata/ORCLCDB/*.ctl
-rw-r-----. 1 oracle oinstall 18759680 Feb 20 17:40 /opt/oracle/oradata/ORCLCDB/control01.ctl
-rw-r-----. 1 oracle oinstall 18759680 Feb 20 17:40 /opt/oracle/oradata/ORCLCDB/control02.ctl
In controlfile is better. Because the location of data files are here.
Thinking about recovery, refer to the article: How to Recover Lost or Missing the From the Parameter Database Files (PFILE or SPFILE .
Select restore spfile from the alert log. alert log location $ORACLE_BASE/diag/rdbms/<sid>/<sid>/trace
:
$ cat /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/trace/alert_ORCLCDB.log
...
processes = 300
sga_max_size = 2000M
nls_language = "AMERICAN"
nls_territory = "AMERICA"
filesystemio_options = "setall"
resource_manager_plan = "low_prio_apps"
_exadata_feature_on = TRUE
sga_target = 1500M
control_files = "/opt/oracle/oradata/ORCLCDB/control01.ctl"
control_files = "/opt/oracle/oradata/ORCLCDB/control02.ctl"
db_block_size = 8192
compatible = "19.0.0"
db_create_file_dest = "/opt/oracle/oradata"
undo_tablespace = "UNDOTBS1"
heat_map = "OFF"
inmemory_size = 700M
inmemory_automatic_level = "OFF"
remote_login_passwordfile= "EXCLUSIVE"
audit_sys_operations = FALSE
dispatchers = "(PROTOCOL=TCP) (SERVICE=ORCLCDBXDB)"
local_listener = "LISTENER_ORCLCDB"
audit_file_dest = "/opt/oracle/admin/ORCLCDB/adump"
commit_wait = "nowait"
commit_logging = "batch"
audit_trail = "NONE"
db_name = "ORCLCDB"
open_cursors = 300
pga_aggregate_target = 384M
diagnostic_dest = "/opt/oracle"
enable_pluggable_database= TRUE
...
The above portion stored in a file / tmp / pfile.
then:
$ sqlplus / as sysdba
SQL> create spfile from pfile='/tmp/pfile'
SQL> startup
or:
$ sqlplus / as sysdba
SQL> startup pfile='/tmp/pfile'
SQL> create spfile from memory