【正文】
目前懷疑與下面這個Bug相關(guān)。216。5。 altergroup1024M。droplogfile。管理員在反復(fù)關(guān)閉并重開報盤系統(tǒng)3分鐘左右后,系統(tǒng)正常運行。否則則可能需要測試索引。重開AS及迪斯杰備份后,利用率下降到30%,文件標志復(fù)位也很快了,在清算過程中利用率也一直在下降,一直到19%點多??捎靡韵路椒▽崿F(xiàn)把僵死的連接清除。 上載整個實例imp hs_user/handsome file= log= full=y buffer=4096000 mit=y ignore=y feedback=10000216。N39。 and = and = 39。BACKGROUND39。Shr Row Excl39。TX Trans Enqueue39。sorts (disk)39。 db file scattered read,216。ORDER BY , 。雖然這個規(guī)則不是總是正確,但如果這個值一直都是不變的,則這個索引也就不需重建。 查看數(shù)據(jù)庫的創(chuàng)建日期和歸檔方式Select Created, Log_Mode, Log_Mode From V$Database。Oracle39。 查詢表空間使用情況select 表空間名稱, 100 round((nvl(, 0) / ) * 100, 2) 占用率(%), round( / 1024 / 1024, 2) 容量(M), round(nvl(, 0) / 1024 / 1024, 2) 空閑(M), round(( nvl(, 0)) / 1024 / 1024, 2) 使用(M), to_char(sysdate, 39。 Oracle 出錯信息,通過$grep ORA 216。關(guān)閉 oracle 數(shù)據(jù)庫命令:$ sqlplus /nologSQL*Plus: Release Production on 星期一 7月 16 16:08:10 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL conn / as sysdba已連接。用戶名/密碼 退出SQL*PlusSQLexit 在sqlplus下得到幫助信息列出全部SQL命令和SQL*Plus命令SQLhelp列出某個特定的命令的信息SQLhelptestSQLtest 關(guān)于偵聽新建/修改/刪除偵聽 以oracle用戶登錄,運行netca,會跳出圖形配置界面。 關(guān)閉CRS$CRS_HOME/crs/bin/crsctl stop crs216。 每天檢查數(shù)據(jù)庫的主要性能指標216。alter table name deallocate unused。 查看回滾段名稱及大小select segment_name, tablespace_name, , (initial_extent / 1024) InitialExtent, (next_extent / 1024) NextExtent, max_extents, CurExtent From dba_rollback_segs r, v$rollstat v Where = (+) order by segment_name。 group by tablespace_name, segment_name。$sqlplus / as sysdba216。%SQL*Net%39。SQL%39。 回滾段的爭用情況 select name, waits, gets, waits / gets Ratio from v$rollstat a, v$rollname b where = 。redo copy39。select , , , , , decode(, 39。, 2, 39。, 4, 39。WHERE table_name = :tname AND table_owner = :towner ORDER BY partition_position,partition_name。USER39。 以多個固定大小文件方式下載某張表exp hs_user/handsome file=,… filesize=1000m tables=emp buffer=4096000 feedback=10000這種做法通常用在:表數(shù)據(jù)量較大,單個dump文件可能會超出文件系統(tǒng)的限制216。2205sga_max_size內(nèi)存的一半,如果存儲使用的是裸設(shè)備,可以提高到60%10Gsga_target同上;若設(shè)置為小于等sga_max_size,可動態(tài)修改;否則則需要先設(shè)置sga_max_size10Gshared_pool_size不超過800M,一般300M到500M就足夠了800M注意:基于Linux平安的RAC不可設(shè)sga太大,否則可能會有問題。216。命令topas可以用來查看文件型內(nèi)存占用內(nèi)存情況,在MEMORY一欄中的%Nonp顯示的是文件型內(nèi)存的占用百分比。216。216。_gc_affinity_time=0 defines the frequency in minutes to check if remastering is needed._gc_undo_affinity=FALSE defines the number of times a node must access an object for it to be a DRM candidate216。 切換當前日志到新的日志組 alterdatabaselogfile)systemgroupcontrolfile 現(xiàn)象:查詢語句結(jié)果集返回不全,只返回一條或其中幾條。l Mon Jun 11 16:54:38 2007Error: unexpected error (6) from the Cluster Service (LCK0)Mon Jun 11 16:54:38 2007Errors in file /u01/app/oracle/admin/rac/bdump/:ORA29702: error occurred in Cluster Group Service operationMon Jun 11 16:54:38 2007Errors in file /u01/app/oracle/admin/rac/bdump/:ORA29702: error occurred in Cluster Group Service operationMon Jun 11 16:54:38 2007Errors in file /u01/app/oracle/admin/rac/bdump/:ORA29702: error occurred in Cluster Grou。則語句就是:SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF 查詢委托返回記錄不對216。databasedrop 216。(39。database1。) size 1024M。再者,從Oracle的trace文件里可以看出在兩次交易故障發(fā)生時,oracle rac的DRM 正在做大量的數(shù)據(jù)同步信息。, cascade = true, degree = 7)。因為參數(shù)maxperm充當?shù)氖擒浵拗?,所以文件型?nèi)存的占用率依舊可以超過maxperm的設(shè)定值。如果按照系統(tǒng)缺省的配置,文件型內(nèi)存最多會占用到內(nèi)存總量的80%,由于文件型內(nèi)存占用并不主動釋放,從而可能造成內(nèi)存資源的短缺及Paging Space使用率過高。 一般情況可以解決數(shù)據(jù)庫存在的死鎖了,或通過session id 查到對應(yīng)的操作系統(tǒng)進程,在unix中殺掉操作系統(tǒng)的進程。一般1G ~ 3G3Gprocesses進程數(shù),即可以對外提供服務(wù)的數(shù)據(jù)。 下載一張或幾張表exp hs_user/handsome file= log= tables=table1,table2 buffer=4096000 feedback=10000216。Action Code 39。 AND table_name = 39。, 3, 39。) LOCKTYPE, substr(, 1, 10) OBJECT, owner, , , decode(, 1, 39。 查看Lockredo allocation39。) group by v$, v$。 AND =AND =AND =ORDER BY ,。alter system set cluster_database=true scope =spfile sid=’*’。 and segment_type = 39。SYSTEM39。 查詢表空間的碎片程度select tablespace_name, count(tablespace_name) from dba_free_space group by tablespace_namehaving count(tablespace_name) 10。性能監(jiān)測216。 啟動CRS$CRS_HOME/crs/bin/crsctl start crs216。 使用INPUT命令可以在SQL緩沖區(qū)中增加一行或多行SQLiSQL輸入內(nèi)容 調(diào)用外部系統(tǒng)編輯器SQLedit表名 SQL*Plus中的編輯命令216。已經(jīng)卸載數(shù)據(jù)庫。 相應(yīng)的TRACE文件 環(huán)境確認數(shù)據(jù)庫實例是否正常工作SQL select status from v$instance。) 采樣時間 from (select , sum() bytes_alloc, sum(decode(, 39。NLS_CHARACTERSET39。 設(shè)置RAC為歸檔模式?步驟:1. 以SYSDBA身份登陸2個節(jié)點,執(zhí)行alter system set cluster_database=false scope =spfile sid=’*’。怎樣查詢某進程正在運行的SQL?答:可以執(zhí)行以下的查詢語句:select from v$session se,v$sql sq,v$process prwhere =(+)and =(+)and =and =39。LOB字段名39。 log file parallel write,216。 監(jiān)控 SGA 的命中率 select + logical_reads, phys_reads, round(100 * (( + ) ) / ( + )) BUFFER HIT RATIO from v$sysstat a, v$sysstat b, v$sysstat c where = 38 physical read total multi block requests and = 39 physical read total bytes and = 40。 監(jiān)控當前數(shù)據(jù)庫誰在運行什么SQL語句 SELECT osuser, username, sql_text from v$session a, v$sqltext b where = order by address, piece。UL39。Exclusive39。 捕捉運行很久的SQLselect username, sid, opname, round(sofar * 100 / totalwork, 0) || 39。 order by , 。sid)。 上載一張或幾張表imp dbuser2/oracle file= log= tables=table1,table2 fromuser=dbuser touser=dbuser2 buffer=2048000 mit=y ignore=y feedback=10000216。 查詢數(shù)據(jù)庫死鎖select distinct * from (select , , , from v$locked_object t1, v$session t2 where = ) order by logon_time。216。 統(tǒng)計信息失效導(dǎo)致執(zhí)行計劃走全表掃瞄216。查看了oracle 的相關(guān)日志,發(fā)現(xiàn)里面有大量的關(guān)于DRM 的信息,根據(jù)里面的信息,我猜測可能是由于數(shù)據(jù)庫的對象資源動態(tài)管理過于頻繁,在兩個實例之間來回“震蕩”時出現(xiàn)異常的緣故。 創(chuàng)建2個新的日志組 alter database add logfil