Oracle memory usage is too high and improper modifications can not start the instance of Oracle solutions

1. Enter the following command cmd command start sqlplus:

sqlplus /nolog

2. sql After starting, connect to the database, the following command:

conn / as sysdba;

3. If it is later oracle 11g version, you can modify the value of MEMORY_MAX_TARGET you want to set memory values, set me to 1024M.

alter system set memory_max_target=1204M scope=SPFILE;

4. Close the database instance

shutdown immediate

5. Start Oracle instance, arranged inside case based spfile.

startup

Precautions:

1) MEMORY_MAX_TARGET MEMORY_TARGET is the maximum threshold, MEMORY_TARGET Oracle is to use the total amount of machine memory, the default value is 0, i.e., automatically allocated by the oracle machine according to the memory, MEMORY_TARGET = SGA_TARGET + PGA_AGGREGATE_TARGET, and when SGA_TARGET PGA_AGGREGATE_TARGET are set to 0, Oracle will automatically allocate memory for both according to MEMORY_TARGET.

2) If the value of SGA_TARGET and PGA_AGGREGATE_TARGET changed, please use the following statement to restore it to zero. Remember very clearly, it is possible to view the situation through the show parameter memory command.

ALTER SYSTEM SET SGA_TARGET =0 SCOPE = SPFILE;

ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0 SCOPE = SPFILE;

the following examples show parameter command, the following commands may note sga into memory or to see the target value of memory_max_target and memory_target.

show parameter sga;

3) If oracle 10g, and does not support MEMORY_MAX_TARGET MEMORY_TARGET these two parameters, the memory adjustments can be set manually or implemented by sga_target sga_max_size, sga_target attention must be less than or equal sga_max_size, otherwise oracle database will not up and running.

alter system set sga_max_size=1024m scope=spfile;

alter system set sga_target=1024m scope=spfile;

Sometimes confused set wrong, resulting in the database instance not up and running, you can create pfile from spfile binary configuration file text file, manually modify solve, in a file pfile reconstruction spfile. For example, I will sga_max_size and sga_target are set to 512M, will not start up, start with error ORA-00821: Specified value of sga_target 512M is too small, needs to be at least 636M, this time, by the following four solved .

. (1) created by the sqlplus inside spfile pfile file, for convenience, custom pfile storage directory is "e: \\ ini.ora.temp", do not specify the same directory will default spfile, I 12c on the windows directory "{oracle installation directory} \ product \ 12.2.0 \ dbhome_1 \ database" SPFILEORCL.ORA, the file name in the directory follows the format spfile $ {SID} .ora.

create pfile='e:\\ini.ora.temp' from spfile;

(2) Because the pfile is a text file, open the path you specify file with a text application to edit and modify sga_max_size sga_target 0, save the file.

(3). Pfile from the spfile file to rebuild

create spfile from pfile='e:\\ini.ora.temp';

(4) The default based on the new spfile, start the Oracle instance.

startup

Other commands may be used:

Display spfile file storage path:

show parameter spfile;

Pfile display of file storage path:

show parameter pfile;

Guess you like

Origin www.linuxidc.com/Linux/2019-11/161584.htm