In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
There are many articles on the Internet about this error, some of them citing instructions in the Oracle documentation.
Setting Memory Target at Instance Startup on Linux
Starting with Oracle Database 11g Release 1 (11.1), Oracle provides the option of automatically managing SGA and PGA with a combined MEMORY_TARGETparameter without having to set SGA_TARGET and PGA_AGGREGATE_TARGET explicitly. This is supported on Linux, Windows, Solaris, HPUX, and AIX (reference Bug 7258378).
If you see the ORA-00845 error reported on Linux machines at Oracle instance startup when using the MEMORY_TARGET parameter, then check the size of / dev/shm. If / dev/shm is not configured, then mount it sized to be at least the value of MEMORY_TARGET. If / dev/shm is configured but the amount of available space reported (through df-k / dev/shm) is less than MEMORY_TARGET, then free the space or mount a larger / dev/shm to satisfy the MEMORY_TARGET size. Note that if you set theMEMORY_MAX_TARGET parameter greater than MEMORY_TARGET, then ensure that / dev/shm is sized to be at least the value of MEMORY_MAX_TARGET.
Memory Target for Oracle Database InstancesRunning Database Configuration Assistant (DBCA) defaults to this Automatic Memory Management option. In the case of upgrade or manual database creation,MEMORY_TARGET can be specified in the initialization parameter file.
Most people understand that / dev/shm must be at least not less than the size of MEMORY_MAX_TARGET.
However, according to the actual situation of the test, the free space of / dev/shm must not be less than the size of MEMORY_MAX_TARGET.
For example
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 6336M
Memory_target big integer 6336M
Parallel_servers_target integer 16
Pga_aggregate_target big integer 0
Sga_target big integer 0
According to the parameter, the memory_max_target parameter is 6.18G
[root@oracledb] # mount-o remount,size=10G / dev/shm
[root@oracledb] # df-h
Filesystem Size Used Avail Use% Mounted on
/ dev/mapper/vg_centosdbo-lv_root 50G 42G 5.3G 89% /
Tmpfs 10G 9.9G 144m 99% / dev/shm
/ dev/sda2 485m 39m 421m 9% / boot
/ dev/sda1 200m 260K 200m 1% / boot/efi
/ dev/mapper/vg_centosdbo-lv_home 1.3T 504G 744G 41% / home
[root@oracledb ~] # su-oracle
Even though I set the size size to 10G here. But the available space is only 144m.
This is when I start the database:
SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 30 14:29:21 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL > conn / as sysdba
Connected to an idle instance.
SQL > startup
ORA-00845: MEMORY_TARGET not supported on this system
You still get the wrong report.
As shown below, if you ensure that the free space is greater than memory_max_target, the database starts normally.
[root@oracledb] # mount-o remount,size=16G / dev/shm
[root@oracledb] # df-h
Filesystem Size Used Avail Use% Mounted on
/ dev/mapper/vg_centosdbo-lv_root 50G 42G 5.3G 89% /
Tmpfs 16G 6.2G 9.9G 39% / dev/shm
/ dev/sda2 485m 39m 421m 9% / boot
/ dev/sda1 200m 260K 200m 1% / boot/efi
/ dev/mapper/vg_centosdbo-lv_home 1.3T 504G 744G 41% / home
[root@oracledb ~] # sqlplus / nolog
-bash: sqlplus: command not found
[root@oracledb ~] # su-oracle
[oracle@oracledb ~] $sqlplus / nolog
SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 30 14:30:41 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL > conn / as sysdba
Connected to an idle instance.
SQL > startup
ORACLE instance started.
Total System Global Area 6614106112 bytes
Fixed Size 2213896 bytes
Variable Size 3556771832 bytes
Database Buffers 3019898880 bytes
Redo Buffers 35221504 bytes
Database mounted.
Database opened.
SQL >
As a result, it is possible that / dev/ SHM defaults to half of the system memory, although in theory it may be larger than MEMORY_TARGET, but the database startup may still report an error.
For example, the test library I use, MEMORY_TARGET is 6.18G.
The default / dev/shm is half of memory, that is, about 7.7g. However, an error is still reported when the database is started.
[root@oracledb ~] # free-g
Total used free shared buffers cached
Mem: 15 11 4 0 0 10
-/ + buffers/cache: 0 14
Swap: 7 0 7
[root@oracledb ~] #
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.