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

ORA-xxxxxx/RMAN-xxxxx

2013-11-13 22:15:34  來源: Oracle 

  ORA: ORACLE initialization or shutdown in progress
ORACLE error from recovery catalog database: RMAN: database in carnation not set

  ORA ORA ORA ORA ORA ORA ORA ORA ORA IMP ORA and IMP

  ORA:unable to extend rollback segment NAME by NUM intablespace NAME
ORA:unable to extend temp segment by num in tablespace name
ORA:max # of extents num reached for rollback segment
ORA:internal error codearguments:
ORAendoffile on communication channel
ORA:table or view does not exist
ORA signalled during: alter rollback segment rb online
ORA:unable to extend table namename partition NAME by NUM in tablespace NAME
Reference://l

   ORA: ORACLE initialization or shutdown in progress
Example:

  create tablespace test datafile
c:testora size M
AUTOEXTEND ON NEXT M MAXSIZE UNLIMITED
default storage (initial K next M pctincrease )/

  Close all services:

  net stop OracleWebAssistant
net stop OracleOraHomeTNSListener
net stop OracleServiceORADB
shutdown

  delete testora:

  Restart all services:

  net start OracleWebAssistant
net start OracleOraHomeTNSListener
net start OracleServiceORADB

  Cannt connect from SQL*PLUS
Error message:
ORA: ORACLE initialization or shutdown in progre

  Solution

  offline the ORA

  $svrmgrl
svrmgrl>connect internal
svrmgrl>shutdown
svrmgrl>startup mount

  –ARCHIVELOG mode

  svrmgrl>alter database datafile C:TESTORA offline;

  –NOARCHIVELOG mode

  svrmgrl>alter database datafile C:TESTORA offline drop;

  svrmgrl>alter database open;

  SQL> select file#namestatus from v$datafile;

  SQL> drop tablespace test;

  =======================================

RMAN: ===========================================================
RMAN: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN: ===========================================================
RMAN: failure of backup command at xx/xx/x ::
RMAN: implicit resync of recovery catalog failed
RMAN: ORACLE error from recovery catalog database: RMAN: database in carnation not set

  RMAN> drop catalog;
# rman target sys/oracle@rac catalog sys/oracle@cat
RMAN> create catalog;
RMAN> register database ;

  =======================================

  ORA:unable to extend rollback segment NAME by NUM intablespace NAME

      產生原因上述ORACLE錯誤為回滾段表空間不足引起的這也是ORACLE數據管理員最常見的ORACLE錯誤信息當用戶在做一個非常龐大的數據操作導致現有回滾段的不足使可分配用的回滾段表空間已滿無法再進行分配就會出現上述的錯誤

  解決方式使用ALTER TABLESPACE tablespace_name ADD DATAFILE filename SIZE size_of_file命令向指定的數據增加表空間根據具體的情況可以增加一個或多個表空間當然這與還與你主機上的裸盤設備有關如果你主機的裸盤設備已經沒有多余的使用空間建議你不要輕意的增加回滾段表空間的大小可使用下列的語句先查詢一下剩余的tablespace空間有多少

   Select user_namesql_text from V$open_cursor where user_name=<user_name>;

  如果多余的空間比較多就可以適當追加一個大的回滾段給表空間使用從而避免上述的錯誤你也可以用以下語句來檢測一下rollback segment的競爭狀況

   Selectclasscount from V$waitstat where calssin(system undo header
system undo blockundo headerundo block);

  和

   Select sum(value) from V$sysstat where namein(db_block_getsconsistents gets);

  如果任何一個class in count/sum(value)大於%就應該考慮增加rollback segment

  ORAunable to extend temp segment by num in tablespace name

  產生原因ORACLE臨時段表空間不足因為ORACLE總是盡量分配連續空間一但沒有足夠的可分配空間或者分配不連續就會出現上述的現象

  解決方法我們知道由於ORACLE將表空間作為邏輯結構單元而表空間的物理結構是數據文件數據文件在磁盤上物理地創建表空間的所有對象也存在於磁盤上為了給表空間增加空間就必須增加數據文件先查看一下指定表空間的可用空間使用視圖SYSDBA_FREE_SPACE視圖中每條記錄代表可用空間的碎片大小

   Select file_idblock_idblocksbytes from sysdba_free_space where tablespace_name=<users>;

  返回的信息可初步確定可用空間的最大塊看一下它是否小於錯誤信息中提到的尺寸再查看一下缺省的表空間參數

  
SQL>SELECT INITIAL_EXTENTNEXT_EXTENTMIN_EXTENTSPCT_INCREASE FROM SYSDBA_TABLESPACES

WHERE TABLESPACE_NAME=name;

  通過下面的SQL命令修改臨時段表空間的缺省存儲值

   SQL>ALTER TABLESPACE name DEFAULT STORAGE (INITIAL XXX NEXT YYY);

  適當增大缺省值的大小有可能解決出現的錯誤問題也可以通過修改用戶的臨時表空間大小來解決這個問題SQL>ALTER USER username TEMPORARY TABLESPACE new_tablespace_name

  使用ALTER TABLESPACE命令一但完成所增加的空間就可使用無需退出數據庫或使表空間脫機但要注意一旦添加了數據文件就不能再刪除它若要刪除就要刪除表空間

  一個報錯例子如下

   ORA:unable to extend temp segment byintablespace TEMPSPACE

  ORAmax # of extents num reached for rollback segment

  產生原因這種錯誤通常為一個回滾段和一個表空間已經達到MAXEXTENTS參數設置的極限要注意的是這個MAXEXTENTS不是該回滾段或表空間的硬件極限硬件極限取決於數據庫創建時在initora文件中指定的DB_BLOCK_SIZE參數的值

  解決方法使用SQL命令ALTER TABLESPACE…STORAGE(MAXEXTENTS XXXX)來增加 MAXEXTENTS其中XXXX值必須大於錯誤信息中所指的數值但不能大於LARGEST MAXEXTENT的值如果已經達到了LARGEST MAXEXTENT VALUE解決的辦法就是重新創建較大的范圍尺寸使用帶有選項COMPRESS=Y的Export工具導出表如果表空間有可用空間先給表做一個備份用alter tablespace tablespace_name更改其名字然後再裝載表回數據庫

  查看其錯誤出現的地方如果出現在回滾段或索引上那麼必須將其刪除並重建如果出現在臨時表空間修改臨時表空間的存儲字段便可解決這個問題

  一個報錯例子如下

   ORA:max # extentsreachedforrollback segment RBS_

  ORAinternal error codearguments

  產生原因這種錯誤通常為ORACLE的內部錯誤只對OSS和ORACLE開發有用ORA的錯誤經常伴隨跟蹤文件的狀態轉儲(系統狀態和進程狀態)系統狀態存儲將包括ORACLE RDBMS持有的當前對象的信息進程狀態轉儲則將顯示特殊進程持有的對象當進程符合了某錯誤條件時經常是由於一些信息取自它持有的一個塊如果我們知道這些錯誤進程持有的塊就容易跟蹤問題的來源

  解決方法一般來說出現這個錯誤我們本身是無法解決的只有從提高系統本身各方面來解決這個內部問題如增加硬件設備調整系統性能使用OPS(當然 OPS從某種意義上說並不是一種好的解決方式)等ORA錯誤的第一個變量用於標記代碼中錯誤的位置(代碼中的每個部分的第一變量都不一樣)從第二個到第五個變量顯示附加信息告訴OSS代碼在哪裡出現了錯誤

  一個報錯例子如下

   ORA:internalerror code arguments: [] [] [] [] [] [] [] []

  ORAendoffile on communication channel

  產生原因通訊不正常結束從而導致通訊通道終止解決方法

  >檢查是否有服進程不正常死機可從alertlog得知

  >檢查sql*Net Driver是否連接到ORACLE可執行程序

  >檢查服務器網絡是否正常如網絡不通或不穩定等

  >檢查同一個網上是否有兩個同樣名字的節點

  >檢查同一個網上是否有重復的IP地址

  ORAtable or view does not exist

  產生原因這是由於裝載的表或視圖不存在多半是CATEXPSQL還沒有運行無法執行Export視圖如果CATEXPSQL已經運行則可能是版本錯誤

  解決方法因為Import和Export共享的一些視圖是通過運行CATEXPSQL來裝載的(它們具有相同的視圖)並不生成單獨的 CATEXPSQL因而造成視圖與Export代碼不同步較難保持彼此之間的兼容用戶就必須建立自己的Export應用從而避免ORA 的錯誤

  上述錯誤均為我們在使用回滾段時比較常見的問題ORA指明當前使用的回滾段的狀態為not online不能使用將它改為online狀態即可使用ORA指明當前回滾段已經為online狀態可以直接使用不用再集合它

  ORA signalled during alter rollback segment rb online

  我們在做統計時還可能遇到下述問題一個rollback segment的狀態為Needs Recovery的現象這是由於ORACLE回退一個事物表中的沒有提交的事物時失敗所造成的通常原因為一個datafile或者 tablespace是在offline的狀態或者一個undo的目標被破壞或者rollback segment被破壞解決的辦法是將所有的tablespace和datafile都置為online狀態如果不能解決則做下面的工作

  >在initsidora中加入event= trace name context forever lever

  >shutdown數據庫然後重啟

  >在$ORACLE_HOME/rdbms/log下找到startup時生成的trace file

  >在trace文件中找到下列信息error recovery tx(##) object #

  >根據object#(與sysdba_objects表中的object_id相同)在sysdba_objects表中查出該object的名字

  >將該object drop掉

  >在initora文件中將該rollback segment放回rollback_segments參數中刪除event

  >shutdown數據庫然後重啟此時Needs Recovery的問題應該是完全解決了否則就是rollback segment被破壞了

  ORAunable to extend table namename partition NAME by NUM in tablespace NAME

  產生原因指定的tablespace空間已經被占用滿無法擴展

  解決方法使用ALTER TABLESPACE ADD DATAFILE命令增加文件系統文件和原始分區或者增加INITIAL的大小(如alter tablespace CDRS default storage(next M pctincrease ))應該能夠解決否則就是有人使用你的表空間上創建了一個比較大的數據文件導致你的表空間不夠用

  一個報錯例子如下

  
ORA: unable to extend table RMMCDRLOCAL_CDR partition LOCAL_CDR byin

tablespace CDRS

  ======================================================
This document contains information about errors frequently encountered by
new DBAs along with appropriate actions to be taken in each circumstance

  )  ORA

  a) on Rollback segment when importing Specify commit=y and a large buffer on import This way the
Rollback will be released after each array as opposed to each object
b) when allocating an extent on a tablespace with alot of free space
SQL> Select max(blocks) from DBA_FREE_SPACE
You may have free space but it might not be contiguous Make sure it is greater than the extent it
is trying to allocate You can reduce the storage parameters NEXT and PCTINCREASE if it isnt

  )  ORA max extents of exceeded when storage is set for maxextents of

  Most platforms have a max of even though it allows you to specify
(see the readme for your platform)

  )  ORA shutdown in progress when starting up even after a shutdown was issued quite some time ago

  If the background processes arent running the SGA could have been left out there… Issue a startup force open (which does a shutdown abort first)

  )  IMP ORA and IMP on import

  Run catalogsql and expvewsql (renamed catexpsql in v) as sys before the import Both files are in $ORACLE_HOME/rdbms/admin (UNIX)

  )  ORA Invalid column name on import Run expvewsql (catexpsql) before the import
)  ORA Oracle not available

  Startup the DB first…if it is started check your searchpath Make sure that ORACLE_SID is set correctly  For setuid issues see PRE

  )  ORA Oracle Data Block corrupted (file # num and block # num)

  To determine where the corruption is:
SQL> select * from sysdba_extents where file_id = filenum and blocknum
between block_id and (block_id + blocks );
The filenum and blocknum are the numbers in the error This query should give the segment_name and segment_type (ie table and its name)
In order to salvage the uncorrupted part of the table you can add an entry to the initora:
event = trace name context forever
This will skip the corrupted block on a table scan Export the table drop and recreate it from import

  )  ORA what does it mean

  Usually it comes with another error such as if it cant be found in any of the trace files try setting the following event in initora and restarting the DB
event= trace name errorstack forever
for the output of this look in the trace files in the directory given by the USER_DUMP_DEST parameter in initora

  )  My create database is failing with ORA: error while processing file

  Take out the INIT_SQL_FILES param out of initora run the scripts by hand after the database is created

  ) Out of shared memory (ORA)

  Try defragmenting the shared pool by running an alter system flush shared_pool If that is not enough increase the shared_pool_size parameter


From:http://tw.wingwit.com/Article/program/Oracle/201311/18627.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.