遇到这个报错,就使用asmm
一般先装库,再opatch到最新补丁,最后dbca建库,物理内存大于4g不能用amm只能用asmm
内存越大,全自动管理就越费劲,出错概率就越高,内存抖动
oracle的内存管理:
9i pga自动管理sga手动管理,10g pga自动管理 sga自动管理(asmm 自动共享内存管理),11g pga sga统一自动管理(amm,自动内存管理),12c 18c 19c和11g一样没有变化
11g concepts有如下描述
memory management involves maintaining optimal sizes for the oracle instance memory structures as demands on the database change. oracle database manages memory based on the settings of memory-related initialization parameters. the basic options for memory management are as follows:
-
automatic memory management
you specify the target size for instance memory. the database instance automatically tunes to the target memory size, redistributing memory as needed between the sga and the instance pga.
-
automatic shared memory management
this management mode is partially automated. you set a target size for the sga and then have the option of setting an aggregate target size for the pga or managing pga work areas individually.
-
manual memory management
instead of setting the total memory size, you set many initialization parameters to manage components of the sga and instance pga individually.
if you create a database with database configuration assistant (dbca) and choose the basic installation option, then automatic memory management is the default.
asmm是10g引入的技术,实现sga的自动管理,启用后不再需要为每个内存组件设定值,如果同时启用sga_target为0表示禁用asmm,非0值表示启用asmm,但是在10gr1等早期版本,asmm不够成熟有较多bug
amm自动化内存管理是11g引入的技术,实现了pga和sga的统一自动管理
由此在11g后,就组合出来5种内存管理形式
自动内存管理(amm):memory_target=非0,是自动内存管理,如果初始化参数lock_sga=true,则amm是不可用的
自动共享内存管理(asmm):memory_target=0 且 sga_target=非0的情形下是自动内存管理
手工共享内存管理:memory_target=0 且 sga_target=0 指定share_pool_size、db_cache_size等sga参数
自动pga管理:memory_target=0 且 workarea_size_policy=auto and pga_aggregate_target=值
手工pga管理:memory_target=0 且 workarea_size_policy=manal 然后指定sort_area_size等pga参数,一般不使用手动管理pga