ORACLE AMM转换ASMM
1)查看当前memory_target,memory_max_target参数值 SQL> show parameter target NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ archive_lag_target integer 0 db_flashback_retention_target integer 1440 fast_start_io_target integer 0 fast_start_mttr_target integer 0 memory_max_target big integer 728M memory_target big integer 728M parallel_servers_target integer 16 pga_aggregate_target big integer 0 sga_target big integer 0 2)创建文本参数文件pfile SQL> create pfile='/home/oracle/orcl.ora' from spfile; File created. 3)把memory_target,memory_max_target从pfile删除 [oracle@oracle11g ~]$ vi orcl.ora orcl.__db_cache_size=318767104 orcl.__java_pool_size=4194304 orcl.__large_pool_size=8388608 orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment orcl.__pga_aggregate_target=306184192 orcl.__sga_target=457179136 orcl.__shared_io_pool_size=0 orcl.__shared_pool_size=117440512 orcl.__streams_pool_size=0 *.audit_file_dest='/u01/app/oracle/admin/orcl/adump' *.audit_trail='db' *.compatible='11.2.0.4.0' *.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl' *.db_block_size=8192 *.db_domain='' *.db_name='ORCL'#Reset to original value by RMAN *.db_recovery_file_dest_size=4385144832 *.db_recovery_file_dest='/home/oracle/archivelog' *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' *.open_cursors=300 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.undo_tablespace='UNDOTBS1' 4)关闭当前数据库,使用修改后的pfile创建spfile,并且用spfile启动数据库 SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> create spfile from pfile='/home/oracle/orcl.ora'; File created. SQL> startup ORACLE instance started. Total System Global Area 221331456 bytes Fixed Size 2251856 bytes Variable Size 163578800 bytes Database Buffers 50331648 bytes Redo Buffers 5169152 bytes Database mounted. Database opened. SQL> show parameter target NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ archive_lag_target integer 0 db_flashback_retention_target integer 1440 fast_start_io_target integer 0 fast_start_mttr_target integer 0 memory_max_target big integer 0 memory_target big integer 0 parallel_servers_target integer 4 pga_aggregate_target big integer 10M sga_target big integer 0 5)修改sga_target,sga_max_size,pga_aggregate_target参数 SQL> alter system set sga_target=580m scope=spfile; System altered. SQL> alter system set sga_max_size=580m scope=spfile; System altered. SQL> alter system set pga_aggregate_target=116m scope=spfile; System altered. 6)重启数据库使参数生效 SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 605450240 bytes Fixed Size 2255632 bytes Variable Size 230687984 bytes Database Buffers 369098752 bytes Redo Buffers 3407872 bytes Database mounted. Database opened. SQL> show parameter target NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ archive_lag_target integer 0 db_flashback_retention_target integer 1440 fast_start_io_target integer 0 fast_start_mttr_target integer 0 memory_max_target big integer 0 memory_target big integer 0 parallel_servers_target integer 16 pga_aggregate_target big integer 116M sga_target big integer 580M SQL> SQL> show parameter sga NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 580M sga_target big integer 580M SQL> show parameter pga NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ pga_aggregate_target big integer 116M