熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

如何在Linux上擴展SGA超過1.7G

2022-06-13   來源: Oracle 

  今天一台Linux服務器擴展了一下內存達到G開發的人自己修改了一下SGA結果數據庫無法啟動了
  
  啟動不了時出的錯誤是這個樣子的:
  [oracle@neirong oracle]$ sqlplus / as sysdba
  
  SQL*Plus: Release Production on Fri Nov ::
  
  Copyright (c) Oracle Corporation All rights reserved
  
  Connected to an idle instance
  
  SQL> startup
  ORA: unable to attach to shared memory segment
  Linux Error: : Invalid argument
  Additional information:
  Additional information:
  SQL> exit
  Disconnected
  
  在位平台上缺省的SGA最大只能擴展到G如果需要支持更大的內存就需要降低mapped_base重新Link Oracle軟件
  
  俺的平台為:
  [oracle@neirong bdump]$ cat /etc/redhatrelease
  Red Hat Enterprise Linux AS release (Taroon Update )
  
  簡單操作如下:
  cd $ORACLE_HOME/rdbms/lib
  cp ksmss ksmssbak
  genksms s x > ksmss
  make f ins_rdbmsmk ksmso
  make f ins_rdbmsmk ioracle
  
  此處先備份ksmss文件如果編譯過程中出現錯誤保證操作可以被恢復:
  
  恢復步驟大致如下:
  
  cd $ORACLE_HOME/rdbms/lib
  cp ksmssbak ksmss
  genksms > ksmss
  make f ins_rdbmsmk ksmso
  make f ins_rdbmsmk ioracle
  
  以下是操作日志:
  [oracle@neirong dbs]$ cd $ORACLE_HOME/rdbms/lib
  [oracle@neirong lib]$ genksms s x > ksmss
  [oracle@neirong lib]$ make f ins_rdbmsmk ksmso
  
  [oracle@neirong lib]$ make f ins_rdbmsmk ioracle
   Linking Oracle
  rm f /opt/oracle/product//rdbms/lib/oracle
  gcc o /opt/oracle/product//rdbms/lib/oracle L/opt/oracle/product//rdbms/lib/
  L/opt/oracle/product//lib/ L/opt/oracle/product//lib/stubs/
  WlE `test f /opt/oracle/product//rdbms/lib/skgaioio && echo
  /opt/oracle/product//rdbms/lib/skgaioio` /opt/oracle/product//rdbms/lib/opimaio
  /opt/oracle/product//rdbms/lib/ssoraedo /opt/oracle/product//rdbms/lib/ttcsoio
  /opt/oracle/product//lib/nautabo /opt/oracle/product//lib/naeeto
  /opt/oracle/product//lib/naecto /opt/oracle/product//lib/naedhso
  /opt/oracle/product//rdbms/lib/configo lserver lodm lskgxp lskgxn lclient
  lvsn lwtcserver lcommon lgeneric /opt/oracle/product//rdbms/lib/defopto
  lknlopt `if /usr/bin/ar tv /opt/oracle/product//rdbms/lib/libknlopta | grep
  xsyeolapo > /dev/null >& ; then echo loraolap ; fi`
  lslax lpls lplp lserver lclient lvsn lwtcserver lcommon lgeneric
  lknlopt lslax lpls lplp ljox lserver locijdbcst lwwg
  `cat /opt/oracle/product//lib/ldflags`  lnsslb lncrypt lnsgr lnzjs
  ln lnl lnro `cat /opt/oracle/product//lib/ldflags`  lnsslb lncrypt
  
  mv f /opt/oracle/product//bin/oracle /opt/oracle/product//bin/oracleO
  mv /opt/oracle/product//rdbms/lib/oracle /opt/oracle/product//bin/oracle
  chmod /opt/oracle/product//bin/oracle
  
  此後數據庫可以以超過G的SGA區設置啟動:
  SQL> startup
  ORACLE instance started
  
  Total System Global Area bytes
  Fixed Size          bytes
  Variable Size       bytes
  Database Buffers     bytes
  Redo Buffers         bytes
  Database mounted
  Database opened
From:http://tw.wingwit.com/Article/program/Oracle/201311/18967.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.