TARGET not supported on this system问题处理

1,Oracle 11g设置归档重新登录启动报错 SQL> startup; ORA-00845: MEMORY_TARGET not supported on this system SQL> 2,看Oracle的官方解释是:

Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup.

就是说MEMORY_MAX_TARGET的设置不能超过/dev/shm的大小,在oracle11g中新增的内存自动管理的参数MEMORY_TARGET,它能自动调整SGA和PGA,这个特性需要用到/dev/shm共享文件系统,而且要求/dev/shm必须大于MEMORY_TARGET,如果/dev/shm比MEMORY_TARGET小就会报错。

3,解决方案

2个修改地方:
在/etc/fstab里面,一是swap后面修改成defaults,size=11G,二是tmpfs后面修改成defaults,size=11G,修改完,如下所示

[root@testoracle1 oracle]# vim /etc/fstab # # /etc/fstab # Created by anaconda on Tue Aug 18 16:46:25 2015 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/vg_testoracle1-lv_root / ext4 defaults 1 1 UUID=e10af7be-cb8b-4454-965d-0c2275fe75b9 /boot ext4 defaults 1 2 /dev/mapper/vg_testoracle1-lv_swap swap swap defaults,size=11G 0 0 tmpfs /dev/shm tmpfs defaults,size=11G 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 ~

修改完后,需要重新挂载一下,才能生效:

[root@testoracle1 oracle]# mount -o remount,size=11G /dev/shm [root@testoracle1 oracle]# 3,再次启动数据库,就不会报错了,正常启动: SQL> startup; ORACLE instance started. Total System Global Area 1.1358E+10 bytes Fixed Size 2216744 bytes Variable Size 8925482200 bytes Database Buffers 2415919104 bytes Redo Buffers 13946880 bytes Database mounted. Database opened. SQL> 4,标准的禁止归档模式:

SQL> alter system set log_archive_start=false scope=spfile; #禁用自归档

SQL> shutdown immediate;
SQL> startup mount; #重启数据库到mount模式
SQL> alter database noarchivelog; #修改为非归档模式
SQL> alter database open; #打数据文件
SQL> archive log list; #再次查看前归档模式

SQL> alter database noarchivelog;
alter database noarchivelog
*
ERROR at line 1:
ORA-38774: cannot disable media recovery - flashback database is enabled

SQL>

去查看闪回是否已经开启:

SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ YES SQL>

去关闭闪回功能:

SQL> alter database flashback off; Database altered. SQL> SQL> alter database flashback off; Database altered.

再关闭归档。

SQL> alter database noarchivelog; Database altered. SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination /oracle/app/oracle/flash_recovery_area/archivelog Oldest online log sequence 337 Current log sequence 339 SQL>

更多Oracle相关信息见Oracle 专题页面 ?tid=12

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/d6d0f38159065b47f85e08f994f02360.html