日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

oracle11g memory_target,oracle11g MEMORY_MAX_TARGET设置成0 问题处理

發(fā)布時(shí)間:2025/3/19 编程问答 59 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oracle11g memory_target,oracle11g MEMORY_MAX_TARGET设置成0 问题处理 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

linux 下 oracle11g MEMORY_MAX_TARGET設(shè)置成0 問題處理

yope(2017_08_08)

問題起因:

數(shù)據(jù)庫服務(wù)器由于業(yè)務(wù)原有內(nèi)存不能夠滿足,所以增加了內(nèi)存、CUP和硬盤,這就有了下面的oracle 性能調(diào)優(yōu)的事。 在plsql中執(zhí)行如下的調(diào)優(yōu)方案,具體參數(shù)不做詳述

Alter system set memory_target=0 SCOPE=SPFILE;

Alter system set memory_max_target=0 SCOPE=SPFILE;

ALTER SYSTEM SET PGA_AGGREGATE_TARGET=10G SCOPE=SPFILE;

ALTER SYSTEM SET SGA_TARGET=32G SCOPE=SPFILE;

alter system set sga_max_size=36G scope=spfile;

重啟oracle 數(shù)據(jù)庫

報(bào)錯(cuò)如下:

[root@ETLDB ~]# su - oracle

[oracle@ETLDB ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 8 15:36:56 2017

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

SQL> connect /as sysdba

Connected to an idle instance.

SQL> startup

ORA-00843: Parameter not taking MEMORY_MAX_TARGET into account

ORA-00849: SGA_TARGET 38654705664 cannot be set to more than MEMORY_MAX_TARGET 0.

……

經(jīng)過漫長(zhǎng)的查找,實(shí)際操作,記錄下來。

解決步驟如下:

本人采用xshell 開啟兩個(gè)終端登錄,目的是不用頻繁切換oracle用戶

1.終端1登錄系統(tǒng)創(chuàng)建pfile

[root@ETLDB ~]# su - oracle

[oracle@ETLDB ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 8 15:36:56 2017

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

SQL> connect /as sysdba

Connected to an idle instance.

SQL> shutdown immediate;

ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux-x86_64 Error: 2: No such file or directory

SQL> create pfile from spfile;

File created.

SQL>

2.終端2登錄系統(tǒng)修改initorcl.ora文件

[root@ETLDB ~]# su - oracle

[oracle@ETLDB ~]$ echo $ORACLE_HOME

/home/oracle/app/oracle/product/11.2.0/db_1

[oracle@ETLDB ~]$ cd /home/oracle/app/oracle/product/11.2.0/db_1

[oracle@ETLDB db_1]$ cd dbs/

[oracle@ETLDB dbs]$ ll

total 36

-rw-rw----. 1 oracle dba 1544 Aug 8 16:46 hc_orcl.dat

-rw-r--r--. 1 oracle dba 2851 May 15 2009 init.ora

-rw-r--r--. 1 oracle dba 2851 Apr 19 14:25 init.ora_bak

-rw-r--r--. 1 oracle dba 1136 Aug 8 16:45 initorcl.ora

-rw-r-----. 1 oracle dba 24 Sep 23 2016 lkORCL

-rw-r-----. 1 oracle dba 1536 Sep 23 2016 orapworcl

-rw-r-----. 1 oracle dba 3584 Aug 8 16:47 spfileorcl.ora

-rw-r-----. 1 oracle dba 3584 Aug 8 16:16 spfileorcl.ora-bak0808

發(fā)現(xiàn)這個(gè)目錄下多了這個(gè)文件 initorcl.ora 用vi編輯器編輯這個(gè)文件(initorcl.ora),編輯前先建議備份spfileorcl.ora下。

刪除如下兩行

*.memory_max_target=0

*.memory_target=0

保存退出

3.回到終端1重新創(chuàng)建spfile并重啟數(shù)據(jù)庫

SQL> create spfile from pfile;

File created.

SQL> startup

ORACLE instance started.

Total System Global Area 2.1379E+10 bytes

Fixed Size 2262656 bytes

Variable Size 3825207680 bytes

Database Buffers 1.7515E+10 bytes

Redo Buffers 36073472 bytes

Database mounted.

Database opened.

SQL>

4.回到終端2啟動(dòng)監(jiān)聽

lsnrctl start

好了,這個(gè)時(shí)候整個(gè)數(shù)據(jù)庫服務(wù)器就啟動(dòng)完畢了,你可以繼續(xù)happy的使用了。

遇到問題,歡迎一同探討。

END

總結(jié)

以上是生活随笔為你收集整理的oracle11g memory_target,oracle11g MEMORY_MAX_TARGET设置成0 问题处理的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。