[oracle@h1 ~]$ sqlplus "/as SYSDBA"
ORA-00845: MEMORY_TARGET not supported on this system
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup pfile=/app/oracle/admin/orcl/pfile/init.ora.103201271612 force
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected
#------------查看oracle错误号
// *Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux.
// *Action: Refer to documentation for a list of supported operating systems. Or, size /dev/shm to be at least the SGA_MAX_SIZE on each Oracle instance running on the system.
ORACLE instance started.
Fixed Size 2212856 bytes
Variable Size 738200584 bytes
Database Buffers 469762048 bytes
Redo Buffers 9084928 bytes
Database mounted.
Database opened.
SQL> alter system set memory_max_target=1258200M scope=both;
alter system set memory_max_target=1258200M scope=both
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL> alter system set memory_max_target=1258200M scope=spfile;
alter system set memory_max_target=1258200M scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE is in use//spfile文件可能不存在
hc_orcl.dat init.ora lkORCL orapworcl
Database closed.
Database dismounted.
ORACLE instance shut down
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/app/oracle/product/11.2.0/dbhome_2/dbs/initorcl.ora'
[oracle@h1 pfile]$ ls
init.ora.103201271612
ORACLE instance started.
Fixed Size 2212856 bytes
Variable Size 738200584 bytes
Database Buffers 469762048 bytes
Redo Buffers 9084928 bytes
Database mounted.
SQL>
------------------------------------ ----------- ------------------------------
memory_target big integer 1168M
SQL> show parameter memory_max_target;
------------------------------------ ----------- ------------------------------
memory_max_target big integer 1168M
SQL>
SQL> alter system set memory_max_target=1G scope=spfile;
alter system set memory_max_target=1G scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE is in use
SQL> show parameter spfile;
------------------------------------ ----------- ------------------------------
spfile string
SQL> create spfile from pfile;
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Fixed Size 2212856 bytes
Variable Size 738200584 bytes
Database Buffers 469762048 bytes
Redo Buffers 9084928 bytes
Database mounted.
Database opened.
SQL> show parameter spfile;
------------------------------------ ----------- ------------------------------
spfile string /app/oracle/product/11.2.0/dbh
ome_2/dbs/spfileorcl.ora
alter system set memory_max_target=1332M scope=both
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Fixed Size 2213296 bytes
Variable Size 922749520 bytes
Database Buffers 469762048 bytes
Redo Buffers 8257536 bytes
Database mounted.
Database opened.
SQL> show parameter memory_max_target;
------------------------------------ ----------- ------------------------------
memory_max_target big integer 1344M
SQL> show parameter memory_target;
------------------------------------ ----------- ------------------------------
memory_target big integer 1G
SQL>