9

Oracle内存占用过大

 2 years ago
source link: https://blog.yinaun.com/posts/21786.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Oracle内存占用过大

发表于

2020-08-23 分类于 数据库

安装Oracle时,为了均衡电脑性能和数据库性能,Oracle一个实例默认内存占用大小为物理内存的1/8。

如环境不需要分配那么大的内存来支撑Oracle,可通过修改 sga_max_size 的值来减少系统中内存占用过大问题。

cmd sqlplus system    --账户登录

show parameter sga; --显示内存分配情况

alter system set sga_max_size=200m scope=spfile; --修改占用内存的大小,根据需要设置

alter system set memory_target = 200M scope=spfile; --修改目标内存占用大小,根据需要设置

重启oracle服务

注意:
sga_target <= sga_max_size <= memory_target <= memory_max_target

如果误修改导致数据库无法启动,按以下步骤处理:

(解决SGA_MAX_SIZE 的大小比 MEMORY_TARGET 大导致数据无法启动的错误)

由于数据库无法启动,只能调整编辑启动参数文件:Oracle修改占用内存启动出错


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK