Chinaunix首页 | 论坛 | 博客
  • 博客访问: 34946
  • 博文数量: 10
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 100
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-18 14:53
文章分类
文章存档

2016年(10)

我的朋友

分类: Oracle

2016-06-23 23:35:00

我的数据库启用了自动内存管理,查看memory_target和memory_max_target值设置为804M,想要将其设置大一点,使用
SQL>alter  system set memory_target='1024M' scope=spfile;
系统已更改
SQL>alter  system set memory_max_target='1024M' scope=spfile;
系统已更改
SQL> startup
然后重启数据库抛错
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
查看报错message
[oracle@oracle ~]$ oerr ora 00845
00845, 00000, "MEMORY_TARGET not supported on this system"
// *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.
查看我的/dev/shm的大小
[oracle@oracle ~]$ df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda2              34G   14G   19G  42% /
/dev/sda1             190M   12M  169M   7% /boot
tmpfs                1004M     0 1004M   0% /dev/shm
因此我设置memory_target和memory_max_target为1000M,按照如下操作;

文件已创建。

SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
[oracle@oracle ~]$ pwd
/home/oracle
[oracle@oracle ~]$ vi initorcl.ora 

orcl.__db_cache_size=243269632
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=339738624
orcl.__sga_target=503316480
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=243269632
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/flash_recovery_area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4070572032
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.memory_max_target=1010612736
*.memory_target=1010612736
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'

[oracle@oracle ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期一 5月 30 23:00:41 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> startup  pfile='/home/oracle/initorcl.ora'
ORACLE 例程已经启动。

Total System Global Area 1006305280 bytes
Fixed Size                  2219592 bytes
Variable Size             658506168 bytes
Database Buffers          339738624 bytes
Redo Buffers                5840896 bytes
数据库装载完毕。
数据库已经打开。
SQL> create spfile from pfile='/home/oracle/initorcl.ora';

文件已创建。

SQL> 
SQL> show parameter memory

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address             integer     0
memory_max_target                    big integer 964M
memory_target                        big integer 964M
shared_memory_address                integer     0
问题解决。

阅读(1807) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~