Oracle 无法启动 - ORA-00845: 此系统不支持 MEMORY_TARGET - 但内存大小似乎没问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33366282/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle startup not possible - ORA-00845: MEMORY_TARGET not supported on this system - but memory size seems to be fine
提问by Ferenjito
We get an ORA-00845: MEMORY_TARGET not supported on this system
on startup.
我们得到一个ORA-00845: MEMORY_TARGET not supported on this system
启动。
However, df -h
shows
然而,df -h
显示
tmpfs 7,9G 4,0K 7,9G 1% /dev/shm.
Which indicates that there is more than enough memory availabe. Any ideas what could be the cause?
这表明有足够的可用内存。任何想法可能是什么原因?
回答by Lalit Kumar B
You might be using Automatic Memory Management (AMM).
您可能正在使用自动内存管理 (AMM)。
AMM uses two initialization parameters:
AMM 使用两个初始化参数:
- MEMORY_TARGET
- MEMORY_MAX_TARGET
- MEMORY_TARGET
- MEMORY_MAX_TARGET
The shared memory file system should have enough space to accommodate the MEMORY_TARGET and MEMORY_MAX_TARGET values.
共享内存文件系统应该有足够的空间来容纳 MEMORY_TARGET 和 MEMORY_MAX_TARGET 值。
To verify:
验证:
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 6096M
memory_target big integer 6096M
shared_memory_address integer 0
In UNIX/Linux, you will have to set the shared memory file systemaccordingly.
在UNIX/Linux 中,您必须相应地设置共享内存文件系统。
Verify:
核实:
df -h /dev/shm
Set:
放:
mount -t tmpfs shmfs -o size=<some_value_in_number_with_size> /dev/shm
For example,
例如,
mount -t tmpfs shmfs -o size=4096m /dev/shm
回答by Mohamed El-Touny
Error Cause: The new Automatic Memory Management functionality uses /dev/shm on Linux for SGA and PGA management. The errors occur if either MEMORY_TARGET or MEMORY_MAX_TARGET is configured larger than the configured /dev/shm size, or if /dev/shm is mounted incorrectly.
错误原因:新的自动内存管理功能在 Linux 上使用 /dev/shm 进行 SGA 和 PGA 管理。如果配置的 MEMORY_TARGET 或 MEMORY_MAX_TARGET 大于配置的 /dev/shm 大小,或者 /dev/shm 安装不正确,则会发生错误。
SOLUTION: Please confirm that ORACLE_HOME is set correctly. This error sometimes happens when it is not set correctly.
解决方案:请确认 ORACLE_HOME 设置正确。当设置不正确时,有时会发生此错误。
Make sure that the /dev/shm size is configured large enough, like in: mount -t tmpfs shmfs -o size=7g /dev/shm
确保 /dev/shm 的大小配置得足够大,例如: mount -t tmpfs shmfs -o size=7g /dev/shm
Note: You should check with your System Administrator what the "best" size for /dev/shm is, based on what has been reported in the alert file.
注意:您应该根据警报文件中报告的内容与您的系统管理员核对 /dev/shm 的“最佳”大小是多少。
Also, many best practices now suggest disabling AMM especially in Exa* Engineered boxes that have larger memory capability and can use Huge / Large pages. This is because AMM and Huge / Large pages are mutually exclusive and overall performance will be better using Huge pages
此外,许多最佳实践现在都建议禁用 AMM,尤其是在具有更大内存容量并可以使用巨大/大页面的 Exa* Engineered 机箱中。这是因为 AMM 和 Huge / Large pages 是相互排斥的,使用 Huge pages 整体性能会更好
Make sure that the df output shows the correct /dev/shm configuration when using Oracle on the system:
在系统上使用 Oracle 时,确保 df 输出显示正确的 /dev/shm 配置:
$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
...
shmfs 6291456 832356 5459100 14% /dev/shm
回答by Sapna
An easy solution is just to add space to /dev/shm fs
.
一个简单的解决方案是将空间添加到/dev/shm fs
.
# mount -t tmpfs shmfs -o size=5g /dev/shm
For more concepts and details, see the blog post ORA-00845: MEMORY_TARGET not supported on this system.
有关更多概念和详细信息,请参阅博客文章ORA-00845:此系统不支持 MEMORY_TARGET。
回答by Shiwangini
I was also getting the same error while starting the database. I # out memory_target parameter in my pfile and then tried again and it worked. Now, i was able to startup the database.
启动数据库时我也遇到同样的错误。我在我的 pfile 中 # out memory_target 参数,然后再试一次,它起作用了。现在,我能够启动数据库。
回答by Hakan KILI?
this error comes when memory setting of oracle is high for the tmpfs area for example
例如,当 tmpfs 区域的 oracle 内存设置较高时,就会出现此错误
if memory parameters like this:
如果内存参数是这样的:
*.memory_max_target=20G
*.memory_target=0
*.sga_max_size=20G
*.sga_target=15G
*.pga_aggregate_target=5G
and tmpfs size is 15G
并且 tmpfs 大小为 15G
when you issue startup you get the error ora-00845 you should set tmpfs size over the max memory value In this situtation max memory parameter is set to 20G so you set tmpfs size in /etc/fstab file for example 25G
当您启动时,您会收到错误 ora-00845 您应该将 tmpfs 大小设置为超过最大内存值在这种情况下,最大内存参数设置为 20G,因此您可以在 /etc/fstab 文件中设置 tmpfs 大小,例如 25G
...
...
tmpfs /dev/shm tmpfs defaults,size25G 0 0
...
...
and then remount the tmpfs file system
然后重新挂载tmpfs文件系统
#mount -o remount /dev/shm
then your database be able to startup
那么你的数据库就可以启动了
回答by Chetan Mali
Reduce the value for the memory_target parameter
Increase the temporary memory allocation on the server.
减少 memory_target 参数的值
增加服务器上的临时内存分配。
e.g
例如