1. ORA-00257
sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 7月 25 10:44:18 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect / as sysdba
已連接。
SQL> select * from v$log;-
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --- --------------------------------------- --------------
1 1 101 52428800 1 NO CURRENT 3621973 24-7月 -06
2 1 99 52428800 1 NO INACTIVE 3600145 24-7月 -06
3 1 100 52428800 1 NO INACTIVE 3611932 24-7月 -06
發(fā)現(xiàn)ARC狀態(tài)為NO,表示系統(tǒng)沒(méi)法自動(dòng)做歸檔SQL> select * from v$recovery_file_dest;
NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
------------------------------------------------------------------------------------------------------------------
/Oracle/flash_recovery_area 2147483648 2134212608 0 35
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------- -------------- -------------- -------------
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 69.97 0 40
BACKUPPIECE 30.01 0 2
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0
已選擇6行。
發(fā)現(xiàn)ARCHIVELOG占近70%,BACKUPPIRCR占了30%,這樣FLASH_RECOVERY_AREA空間的空間已經(jīng)被完全占據(jù)了根據(jù)數(shù)據(jù)庫(kù)目前可用存儲(chǔ)空間為200GB、FLASH_RECOVERY_AREA空間為2GB的實(shí)際情況,把FLASH_RECOVERY_AREA的空間修改為20GB。SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=20g;
系統(tǒng)已更改。
SQL> select * from v$recovery_file_dest;
------------------------------------------------------- ---------- -----------------------------------
NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ------------- -------------- ---------- ---------- ------------
/Oracle/flash_recovery_area 2.1475E+10 2264587776 0 38
這時(shí)再查看日志的狀態(tài),發(fā)現(xiàn)REDO LOG處于正常的歸檔狀態(tài)。SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --- -------------------------------------------- --------------
1 1 101 52428800 1 YES ACTIVE 3621973 24-7月 -06
2 1 102 52428800 1 NO CURRENT 3650399 25-7月 -06
3 1 100 52428800 1 YES INACTIVE 3611932 24-7月 -06
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 7.6 0 43
BACKUPPIECE 4.21 0 2
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0
已選擇6行。
SQL>2. ORA-600
日志文件中錯(cuò)誤信息:
Mon Apr 16 14:37:52 2007
Starting Oracle instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
SCN scheme 2
Using log_archive_dest parameter default value
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up Oracle RDBMS Version: 9.2.0.1.0.
System parameters with non-default values:
processes = 150
timed_statistics = TRUE
shared_pool_size = 50331648
large_pool_size = 8388608
java_pool_size = 33554432
control_files = f:\ora\oradata\gzsb\control01.ctl, f:\ora\oradata\gzsb\control02.ctl, f:\ora\oradata\gzsb\control03.ctl
db_block_size = 8192
db_cache_size = 25165824
compatible = 9.2.0.0.0
db_file_multiblock_read_count= 16
fast_start_mttr_target = 300
undo_management = AUTO
undo_tablespace = UNDOTBS1
undo_retention = 10800
remote_login_passwordfile= EXCLUSIVE
db_domain =
instance_name = xxxxxx
dispatchers = (PROTOCOL=TCP) (SERVICE=gzsbXDB)
job_queue_processes = 10
hash_join_enabled = TRUE
background_dump_dest = c:\Oracle\admin\gzsb\bdump
user_dump_dest = c:\Oracle\admin\gzsb\udump
core_dump_dest = c:\Oracle\admin\gzsb\cdump
sort_area_size = 524288
db_name = xxxxx
open_cursors = 300
star_transformation_enabled= FALSE
query_rewrite_enabled = FALSE
pga_aggregate_target = 25165824
aq_tm_processes = 1
PMON started with pid=2
DBW0 started with pid=3
LGWR started with pid=4
CKPT started with pid=5
SMON started with pid=6
RECO started with pid=7
CJQ0 started with pid=8
QMN0 started with pid=9
Mon Apr 16 14:37:54 2007
starting up 1 shared server(s) ...
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Mon Apr 16 14:37:55 2007
ALTER DATABASE MOUNT
Mon Apr 16 14:38:00 2007
Successful mount of redo thread 1, with mount id 1403199684.
Mon Apr 16 14:38:00 2007
Database mounted in Exclusive Mode.
Completed: ALTER DATABASE MOUNT
Mon Apr 16 14:38:00 2007
ALTER DATABASE OPEN
Mon Apr 16 14:38:00 2007
Beginning crash recovery of 1 threads
Mon Apr 16 14:38:00 2007
Started first pass scan
Mon Apr 16 14:38:00 2007
Completed first pass scan
62 redo blocks read, 4 data blocks need recovery
Mon Apr 16 14:38:00 2007
Started recovery at
Thread 1: logseq 43, block 3, scn 0.0
Recovery of Online Redo Log: Thread 1 Group 1 Seq 43 Reading mem 0
Mem# 0 errs 0: F:\ORA\ORADATA\GZSB\REDO01.LOG
Mon Apr 16 14:38:00 2007
Ended recovery at
Thread 1: logseq 43, block 65, scn 0.2970218
4 data blocks read, 4 data blocks written, 62 redo blocks read
Crash recovery completed successfully
Mon Apr 16 14:38:00 2007
Thread 1 advanced to log sequence 44
Thread 1 opened at log sequence 44
Current log# 2 seq# 44 mem# 0: F:\ORA\ORADATA\GZSB\REDO02.LOG
Successful open of redo thread 1.
Mon Apr 16 14:38:00 2007
SMON: enabling cache recovery
Mon Apr 16 14:38:00 2007
Undo Segment 1 Onlined
Undo Segment 2 Onlined
Undo Segment 3 Onlined
Undo Segment 4 Onlined
Undo Segment 5 Onlined
Undo Segment 6 Onlined
Undo Segment 7 Onlined
Undo Segment 8 Onlined
Undo Segment 9 Onlined
Undo Segment 10 Onlined
Successfully onlined Undo Tablespace 1.
Mon Apr 16 14:38:00 2007
SMON: enabling tx recovery
Mon Apr 16 14:38:00 2007
Database Characterset is ZHS16GBK
Mon Apr 16 14:38:00 2007
Errors in file c:\Oracle\admin\gzsb\bdump\gzsb_smon_5196.trc:
ORA-00600: internal error code, arguments: [4194], [98], [75], [], [], [], [], []Mon Apr 16 14:38:01 2007
Errors in file c:\Oracle\admin\gzsb\udump\gzsb_ora_3648.trc:
ORA-00600: 內(nèi)部錯(cuò)誤代碼,參數(shù): [4194], [92], [84], [], [], [], [], []Mon Apr 16 14:39:02 2007
Recovery of Online Redo Log: Thread 1 Group 2 Seq 44 Reading mem 0
Mem# 0 errs 0: F:\ORA\ORADATA\GZSB\REDO02.LOG
Recovery of Online Redo Log: Thread 1 Group 2 Seq 44 Reading mem 0
Mem# 0 errs 0: F:\ORA\ORADATA\GZSB\REDO02.LOG
Mon Apr 16 14:39:02 2007
Errors in file c:\Oracle\admin\gzsb\udump\gzsb_ora_3648.trc:
ORA-00607: 當(dāng)更改數(shù)據(jù)塊時(shí)出現(xiàn)內(nèi)部錯(cuò)誤
ORA-00600: 內(nèi)部錯(cuò)誤代碼,參數(shù): [4194], [92], [84], [], [], [], [], []Error 607 happened during db open, shutting down database
USER: terminating instance due to error 607
Instance terminated by USER, pid = 3648
ORA-1092 signalled during: ALTER DATABASE OPEN...查看資料得到:
Would seem that the error is:
ORA-600 [4194] "Undo Record Number Mismatch While Adding Undo Record".Refer to Metalink note 39283.1.In future use Metalink note 153788.1 (Subject: Troubleshoot an ORA-600
Error Using the ORA-600 Argument Lookup Tool).參考:http://www.eygle.com/blog由于數(shù)據(jù)庫(kù)只能在MOUNT狀態(tài)所以
select * from v$rollname;
select * from undo$;
select * from v$tablespace;都不能使用1、通過(guò)錯(cuò)誤信息可以確定當(dāng)前回滾段是1-10,所以修改PFILE文件將下面這個(gè)隱含參數(shù)加到文件中去:
._corrupted_rollback_segments='_SYSSMU1$','_SYSSMU2$','_SYSSMU3$','_SYSSMU4$','_SYSSMU5$','_SYSSMU6$','_SYSSMU7$','_SYSSMU8$','_SYSSMU9$','_SYSSMU10$'
STARTUP PFILE='XXXX'
可以看到數(shù)據(jù)庫(kù)已經(jīng)正常啟動(dòng)
2、create undo tablespace undotbs2 datafile 'F:\ORA\ORADATA\GZSB\undotbs2.dbf';
alter system set undo_tablespace=undotbs2;
drop tablespace undotbs2;
3、修改參數(shù)文件,變更undo表空間,并取消_corrupted_rollback_segments設(shè)置:
*.undo_tablespace='UNDOTBS2'
4、startup pfile='xxxxx'
create spfile from pfile;
shutdown immediate
statup故障解決,進(jìn)行全庫(kù)備份
3. 10201上一個(gè)嚴(yán)重的BUG
環(huán)境 10201,AIX53
但據(jù)Oracle解釋,在任何操作系統(tǒng)版本都有此問(wèn)題,F(xiàn)象:監(jiān)聽(tīng)器啟動(dòng)后,隔一段時(shí)間(長(zhǎng)短不定),就會(huì)出現(xiàn)無(wú)法連接: 若是用10201版本的SQLPLUS,則會(huì)出現(xiàn) NO LISTENER。
9207 版本的SQLPLUS,則會(huì)出現(xiàn):沒(méi)反應(yīng),HANG住。
原因:10201 版本上的一個(gè)BUG:4518443。其會(huì)自動(dòng)創(chuàng)建一個(gè)子監(jiān)聽(tīng)器,當(dāng)出現(xiàn)此情況時(shí),監(jiān)聽(tīng)器將會(huì)掛起。
/opt/Oracle/product/10g/network/log/listener.log有如下語(yǔ)句:
WARNING: Subscription for node down event still pending
檢查是否真因?yàn)榇薆UG造成此現(xiàn)象:
$ ps -ef | grep tnslsnr
ora10g 8909 1 0 Sep 15 ? 902:44 /u05/10GHOME/DBHOME/bin/tnslsnr sales -inherit
ora10g 22685 8909 0 14:19:23 ? 0:00 /u05/10GHOME/DBHOME/bin/tnslsnr sales –inherit正常情況只有一個(gè)監(jiān)聽(tīng)器,而此BUG則會(huì)出現(xiàn)兩個(gè)監(jiān)聽(tīng)器。
解決方法:打補(bǔ)丁4518443 或者在listener.ora 文件里加入:
SUBSCRIBE_FOR_NODE_DOWN_EVENT_<listener_name>=OFF
其中,<listener_name> 是數(shù)據(jù)庫(kù)的監(jiān)聽(tīng)器的名稱。如:默認(rèn)情況下,監(jiān)聽(tīng)器名為:LISTENER 。則語(yǔ)句就是:
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF重啟監(jiān)聽(tīng)程序:
lsnrctl stop
lncrctl start4. ORA-01031: insufficient privileges的解決方法
1。檢查sqlnet.ora 文件.
sqlnet.ora 文件損壞或格式不對(duì)可以導(dǎo)致出現(xiàn)該問(wèn)題。
sqlnet.ora 文件可能存放路徑為
$TNS_ADMIN/sqlnet.ora
如果沒(méi)有設(shè)置$TNS_ADMIN默認(rèn)在$Oracle_HOME/network/admin/sqlnet.ora
或
$HOME/sqlnet.ora
(1). 可以從別的機(jī)器拷貝一個(gè)文件過(guò)來(lái),注意備份原來(lái)的sqlnet.ora。
---檢查sqlnet.ora 文件內(nèi)容
(2). 檢查SQLNET.AUTHENTICATION_SERVICES
如果沒(méi)有使用dblink.檢查該行并設(shè)置
SQLNET.AUTHENTICATION_SERVICES = (BEQ,NONE)
(3). SQLNET.CRYPTO_SEED
在unix 下不需要該參數(shù)。如果存在該行,注釋掉或刪掉
(4).AUTOMATIC_IPC
如果該參數(shù)為 ON,將強(qiáng)制使用"TWO_TASK" 連接
最好設(shè)置為OFF
AUTOMATIC_IPC = OFF
2.檢查相關(guān)文件的權(quán)限配置。
找到$TNS_ADMIN/*
$ cd $TNS_ADMIN
$ chmod 644 sqlnet.ora tnsnames.ora listener.ora
$ ls -l sqlnet.ora tnsnames.ora listener.ora
-rw-r--r-- 1 Oracle dba 1628 Jul 12 15:25 listener.ora
-rw-r--r-- 1 Oracle dba 586 Jun 1 12:07 sqlnet.ora
-rw-r--r-- 1 Oracle dba 82274 Jul 12 15:23 tnsnames.ora
3.檢查操作系統(tǒng)相關(guān)設(shè)置。
(1). $Oracle_HOME環(huán)境變量是否設(shè)置正確
% cd $Oracle_HOME
% pwd
如果錯(cuò)誤,請(qǐng)重新設(shè)置:
sh or ksh: ----------
$ Oracle_HOME=<path_to_ORACLE_HOME>
$ export Oracle_HOME
Example:
$ Oracle_HOME=/u01/app/oracle/product/7.3.3
$ export Oracle_HOME
csh: ----
% setenv Oracle_HOME <path_to_ORACLE_HOME> Example:
% setenv Oracle_HOME /u01/app/oracle/product/7.3.3
另外$Oracle_HOME路徑應(yīng)為實(shí)際路徑,不應(yīng)是目錄連接(ln -s)
(2) $Oracle_SID是否設(shè)置正確;
% echo $Oracle_SID
(3).確信沒(méi)有設(shè)置$TWO_TASK
檢查 "TWO_TASK" 是否設(shè)置:
sh, ksh or on HP/UX only csh:
-----------------------------------
env |grep -i two
- or -
echo $TWO_TASK
csh:
----
setenv |grep -i two
如果有返回行比如:
TWO_TASK=
- or -
TWO_TASK=PROD
就需要取消著這些環(huán)境變量設(shè)置 :
sh or ksh:
----------
unset TWO_TASK
csh:
----
unsetenv TWO_TASK
(4) 檢查Oracle 文件的權(quán)限:
% cd $Oracle_HOME/bin
% ls -l Oracle
權(quán)限應(yīng)為:rwsr-s--x, or 6751.
如果不是:
% chmod 6751 Oracle
(5). 檢查當(dāng)前所連接的操作系統(tǒng)用戶是否是"osdba" 并且已經(jīng)定義在:
"$Oracle_HOME/rdbms/lib/config.s"
or
"$Oracle_HOME/rdbms/lib/config.c".
通常應(yīng)為dba
% id uid=1030(Oracle) gid=1030(dba)
可以如果"gid" 是 "dba" , "config.s" or "config.c"
里面應(yīng)該有: /* 0x0008 15 */ .ascii "dba\0"
如果沒(méi)有添加目前的操作系統(tǒng)用戶到dba 組,或則手工編輯更改config.c并且:%relink Oracle
(6).所需要的文件系統(tǒng)是否正確mount
%mount
(7) 目前身份是否是"root" 并且操作系統(tǒng)環(huán)境變量 "USER", "USERNAME", and "LOGNAME" 沒(méi)有設(shè)置成"root".
root用戶是特例,除非當(dāng)前組是dba 組,否則不能connect internal.
把root用戶當(dāng)前組改為dba組:
# newgrp dba
-----最好不要以root管理數(shù)據(jù)庫(kù);
(8).檢查"/etc/group" :
是否存在重復(fù)行
% grep dba /etc/group
dba::1010:
dba::1100:
如果有,刪掉沒(méi)有用的。
(9).確信停掉的instance沒(méi)有占用內(nèi)存資源
比如:ipcs -b
T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0x50000ffe --rw-r--r-- root root 68
m 1601 0x0eedcdb8 --rw-r----- Oracle dba 4530176
可以看到1601 被Oracle 使用,刪掉.
-------注意是否啟動(dòng)了多個(gè)instance
% ipcrm -m 1601
(10).如果同時(shí)還有ora-12705 錯(cuò)誤檢查一下環(huán)境變量:
"ORA_NLS", "ORA_NLS32", "ORA_NLS33" ,"NLS_LANG".
(11).檢查 "Oracle_HOME" and "LD_LIBRARY_PATH 環(huán)境變量:
$ LD_LIBRARY_PATH=$Oracle_HOME/lib
$ export LD_LIBRARY_PATH
$ Oracle_HOME=/u01/app/oracle/product/8.0.4
$ export Oracle_HOME
(12).當(dāng)前的instance 所再的磁盤(pán)是否有足夠的磁盤(pán)空間
df -k
(13).用戶對(duì)/etc/passwd 是否有讀權(quán)限。
(14).如果使用mts 方式,確信你的連接使用dedicade server 方式。
(15).安裝Oracle所需操作系統(tǒng)補(bǔ)丁是否打全。ORACLE 是否已經(jīng)補(bǔ)丁到最新
ORA-01650:unable to extend rollback segment NAME by NUM intablespace NAME 產(chǎn)生原因:上述Oracle錯(cuò)誤為回滾段表空間不足引起的,這也是ORACLE數(shù)據(jù)管理員最常見(jiàn)的ORACLE錯(cuò)誤信息。當(dāng)用戶
在做一個(gè)非常龐大的數(shù)據(jù)操作導(dǎo)致現(xiàn)有回滾段的不足,使可分配用的回滾段表空間已滿,無(wú)法再進(jìn)行分配,就會(huì)出現(xiàn)上述
的錯(cuò)誤。 解決方式:使用“ALTER TABLESPACE tablespace_name ADD DATAFILE filename SIZE size_of_file”命令向指定的
數(shù)據(jù)增加表空間,根據(jù)具體的情況可以增加一個(gè)或多個(gè)表空間。當(dāng)然這與還與你主機(jī)上的裸盤(pán)設(shè)備有關(guān),如果你主機(jī)的裸
盤(pán)設(shè)備已經(jīng)沒(méi)有多余的使用空間,建議你不要輕意的增加回滾段表空間的大小,可使用下列的語(yǔ)句先查詢一下剩余的
tablespace空間有多少:Select user_name,sql_text from V$open_cursor where user_name=’<user_name>’; 如果多余的空間比較多,就可以適當(dāng)追加一個(gè)大的回滾段給表空間使用,從而避免上述的錯(cuò)誤。你也可以用以下語(yǔ)句
來(lái)檢測(cè)一下rollback segment的競(jìng)爭(zhēng)狀況:Select class,count from V$waitstat where calss in(‘system undo header’,’system undo block’,’undo
header’,’undo block’);和Select sum(value) from V$sysstat where name in (‘db_block_gets’,’consistents gets’);如果任何一個(gè)class in count/sum(value)大于1%,就應(yīng)該考慮增加rollback segment。相應(yīng)的英文如下:Cause:Failed to allocate extent from the rollback segment in tablespaceAction:Use the ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the specified
tablespace.ORA-01652:unable to extend temp segment by num in tablespace name 產(chǎn)生原因:Oracle臨時(shí)段表空間不足,因?yàn)镺RACLE總是盡量分配連續(xù)空間,一但沒(méi)有足夠的可分配空間或者分配不連
續(xù)就會(huì)出現(xiàn)上述的現(xiàn)象! 〗鉀Q方法:我們知道由于Oracle將表空間作為邏輯結(jié)構(gòu)-單元,而表空間的物理結(jié)構(gòu)是數(shù)據(jù)文件,數(shù)據(jù)文件在磁盤(pán)上物
理地創(chuàng)建,表空間的所有對(duì)象也存在于磁盤(pán)上,為了給表空間增加空間,就必須增加數(shù)據(jù)文件。先查看一下指定表空間的
可用空間,使用視圖SYS.DBA_FREE_SPACE,視圖中每條記錄代表可用空間的碎片大。篠QL>Select file_id,block_id,blocks,bytes from sys.dba_free_space where tablespace_name=’<users>’; 返回的信息可初步確定可用空間的最大塊,看一下它是否小于錯(cuò)誤信息中提到的尺寸,再查看一下缺省的表空間參
數(shù):SQL>SELECT INITIAL_EXTENT,NEXT_EXTENT,MIN_EXTENTS,PCT_INCREASE FROM SYS.DBA_TABLESPACES WHERE
TABLESPACE_NAME=name;通過(guò)下面的SQL命令修改臨時(shí)段表空間的缺省存儲(chǔ)值:SQL>ALTER TABLESPACE name DEFAULT STORAGE (INITIAL XXX NEXT YYY);適當(dāng)增大缺省值的大小有可能解決出現(xiàn)的錯(cuò)誤問(wèn)題,也可以通過(guò)修改用戶的臨時(shí)表空間大小來(lái)解決這個(gè)問(wèn)題:SQL>ALTER USER username TEMPORARY TABLESPACE new_tablespace_name;使用ALTER TABLESPACE命令,一但完成,所增加的空間就可使用,無(wú)需退出數(shù)據(jù)庫(kù)或使表空間脫機(jī),但要注意,一旦添加
了數(shù)據(jù)文件,就不能再刪除它,若要?jiǎng)h除,就要?jiǎng)h除表空間。一個(gè)報(bào)錯(cuò)例子如下:ORA-1652:unable to extend temp segment by 207381 in tablespace TEMPSPACE相應(yīng)的英文如下:Cause: Failed to allocate extent for temp segment in tablespaceAction:Use the ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the specified
tablespace or create the object in another tablespace.ORA-01578:Oracle data block corrupted(file # num,block # num)產(chǎn)生原因:當(dāng)ORACLE訪問(wèn)一個(gè)數(shù)據(jù)塊時(shí),由于1、硬件的I/O錯(cuò)誤;2、操作系統(tǒng)的I/O錯(cuò)誤或緩沖問(wèn)題;3、內(nèi)存或paging問(wèn)
題;4、Oracle試圖訪問(wèn)一個(gè)未被格式化的系統(tǒng)塊失;5、數(shù)據(jù)文件部分溢出等上述幾種情況的一種引起了邏輯壞塊或者
物理壞塊,這時(shí)就會(huì)報(bào)ORA-01578的錯(cuò)誤。解決方式:由于Oracle只有在訪問(wèn)到有問(wèn)題的數(shù)據(jù)文件時(shí)才會(huì)報(bào)錯(cuò),所以報(bào)錯(cuò)的時(shí)間有可能會(huì)比實(shí)際出錯(cuò)的時(shí)間要晚,如
果ORA-01578出錯(cuò)信息提示數(shù)據(jù)壞塊指向的是用戶自己的數(shù)據(jù)文件,則用以下方法來(lái)解決:
如果通過(guò)下面的SQL語(yǔ)句查出的壞塊出現(xiàn)有索引上,則只需重建索引即可SQL>Select owner,segment_name,segment_type from dba_extents where file_id=<F> and <B> between block_id and
block_id+blocks-1;(<F>和<B>分別是ORA-01578報(bào)出的壞塊出現(xiàn)的文件號(hào)和塊號(hào))
如果壞塊出現(xiàn)在表上,先用以下語(yǔ)句分析是否為永久性壞塊(建議多執(zhí)行一兩次,有助于鑒別數(shù)據(jù)壞塊是永久性的(硬盤(pán)
上的物理壞塊)還是隨機(jī)性的(內(nèi)存或硬件錯(cuò)誤引起)):SQL>Analyze table <table_name> validate structure cascade;執(zhí)行該命令后,可能會(huì)出現(xiàn)以下的結(jié)果:ORA-01578:與原先錯(cuò)誤信息有相同的參數(shù),為永久性的物理或邏輯壞塊;與原先錯(cuò)誤信息有不同的參數(shù),可能與內(nèi)存,
page space和I/O設(shè)備有關(guān)。如果用戶有此表的最新備份,那么最好是用此備份來(lái)恢復(fù)此表,或者使用event 10231來(lái)取出壞塊以外的數(shù)據(jù):<1>.先關(guān)閉數(shù)據(jù)庫(kù)<2>.編輯init<sid>.ora文件,加入:event=”10231 trace name context forever,level 10”<3>.startup restrict<4>.創(chuàng)建一個(gè)臨時(shí)表:SQL>create table errortemp as select * from error;(error是壞表的表名)<5>.把event從init<sid>.ora文件中刪掉并重起數(shù)據(jù)庫(kù)<6>.rename壞表,把臨時(shí)表rename成壞表的表名<7>.創(chuàng)建表上的INDEX等如果ORA-01578出錯(cuò)信息提示數(shù)據(jù)壞塊指向的是數(shù)據(jù)字典或者是回滾段的話,你應(yīng)該立即與Oracle公司聯(lián)系,共同商量一個(gè)
好的解決辦法。這里所講的解決方法只是比較常見(jiàn)的一種,一些更為具體的解決辦法可以查看一下Oracle的故障解決手冊(cè),那里面有浞及
使用ROWID方法來(lái)取出壞塊以外的數(shù)據(jù)的方法,這里就不介紹了。相應(yīng)的英文如下:Cause:The given data block was corrupted,probably due to program errorsAction:Try to restore the segment containing the given data block,This may involve dropping the segment
and recreating it,If there is a trace file,report the messages recorded in it to customer support.
ORA-01628:max # of extents num reached for rollback segment num產(chǎn)生原因:這種錯(cuò)誤通常為一個(gè)回滾段和一個(gè)表空間已經(jīng)達(dá)到MAXEXTENTS參數(shù)設(shè)置的極限。要注意的是這個(gè)MAXEXTENTS不
是該回滾段或表空間的硬件極限,硬件極限取決于數(shù)據(jù)庫(kù)創(chuàng)建時(shí)在init.ora文件中指定的DB_BLOCK_SIZE參數(shù)的值。解決方法:使用SQL命令A(yù)LTER TABLESPACE…STORAGE(MAXEXTENTS XXXX)來(lái)增加 MAXEXTENTS,其中“XXXX”值必須大于
錯(cuò)誤信息中所指的數(shù)值,但不能大于LARGEST MAXEXTENT的值,如果已經(jīng)達(dá)到了LARGEST MAXEXTENT VALUE,解決的辦法就
是重新創(chuàng)建較大的范圍尺寸,使用帶有選項(xiàng)COMPRESS=Y的Export工具導(dǎo)出表,如果表空間有可用空間,先給表做一個(gè)備
份,用alter tablespace tablespace_name更改其名字,然后再裝載表回?cái)?shù)據(jù)庫(kù)。查看其錯(cuò)誤出現(xiàn)的地方,如果出現(xiàn)在回滾段或索引上,那么必須將其刪除并重建,如果出現(xiàn)在臨時(shí)表空間,修改臨時(shí)表空
間的存儲(chǔ)字段,便可解決這個(gè)問(wèn)題。一個(gè)報(bào)錯(cuò)例子如下:ORA-1628:max # extents 50 reached for rollback segment RBS_1相應(yīng)的英文如下:Cause: An attempt was made to extend a rollback segment that already has reached its maximum size or space
could not be allocated in the data dictionary to contain the definition of the object.Action:If possible,increase the value of either the MAXEXTENTS or PCTINCREASE initialization parameters or
find the data dictionary table lacking space and alter the storage parameters,as described in the Oracle8
Server Administrator’s Guide.ORA-00600:internal error code,arguments:[num],[?],[?],[?],[?]產(chǎn)生原因:這種錯(cuò)誤通常為Oracle的內(nèi)部錯(cuò)誤,只對(duì)OSS和ORACLE開(kāi)發(fā)有用。ORA-600的錯(cuò)誤經(jīng)常伴隨跟蹤文件的狀態(tài)轉(zhuǎn)儲(chǔ)
(系統(tǒng)狀態(tài)和進(jìn)程狀態(tài)),系統(tǒng)狀態(tài)存儲(chǔ)將包括Oracle RDBMS持有的當(dāng)前對(duì)象的信息,進(jìn)程狀態(tài)轉(zhuǎn)儲(chǔ)則將顯示特殊進(jìn)程持
有的對(duì)象,當(dāng)進(jìn)程符合了某錯(cuò)誤條件時(shí),經(jīng)常是由于一些信息取自它持有的一個(gè)塊,如果我們知道這些錯(cuò)誤進(jìn)程持有的
塊,就容易跟蹤問(wèn)題的來(lái)源。解決方法:一般來(lái)說(shuō)出現(xiàn)這個(gè)錯(cuò)誤我們本身是無(wú)法解決的,只有從提高系統(tǒng)本身各方面來(lái)解決這個(gè)內(nèi)部問(wèn)題,如增加硬件
設(shè)備,調(diào)整系統(tǒng)性能,使用OPS(當(dāng)然OPS從某種意義上說(shuō)并不是一種好的解決方式)等。ORA-600錯(cuò)誤的第一個(gè)變量用于標(biāo)
記代碼中錯(cuò)誤的位置(代碼中的每個(gè)部分的第一變量都不一樣),從第二個(gè)到第五個(gè)變量顯示附加信息,告訴OSS代碼在哪
里出現(xiàn)了錯(cuò)誤。一個(gè)報(bào)錯(cuò)例子如下:ORA-00600: internal error code, arguments: [1237], [], [], [], [], [], [], []相應(yīng)的英文如下:Cause:This is a catchall internal error message for Oracle program exceptions.It indicates that a process
has met a low-level,unexpected condition.Various causes of this message include:Time-outs(超時(shí))File corruption(文件太老)Failed data checks in memory(內(nèi)存檢索失敗)Hardware,memory,or I/O errors(硬件、內(nèi)存或者磁盤(pán)錯(cuò)誤)Incorrectly restored files(錯(cuò)誤的重建文件)
ORA-03113:end-of-file on communication channel產(chǎn)生原因:通訊不正常結(jié)束,從而導(dǎo)致通訊通道終止解決方法:1>.檢查是否有服進(jìn)程不正常死機(jī),可從alert.log得知2>.檢查sql*Net Driver是否連接到Oracle可執(zhí)行程序3>.檢查服務(wù)器網(wǎng)絡(luò)是否正常,如網(wǎng)絡(luò)不通或不穩(wěn)定等4>.檢查同一個(gè)網(wǎng)上是否有兩個(gè)同樣名字的節(jié)點(diǎn)5>.檢查同一個(gè)網(wǎng)上是否有重復(fù)的IP地址相應(yīng)的英文如下:Cause:An unexpected end-of-file was processed on the communication channel.The problem could not be
handled by the Net8,two task,software.This message could occur if the shadow two-task process associated
with a Net8 connect has terminated abnormally,or if there is a physical failure of the interprocess
communication vehicle,that is,the network or server machine went down.Action:If this message occurs during a commection attempt,check the setup files for the appropriate Net8
driver and confirm Net8 software is correctly installed on the server.If the message occurs after a
connection is well established,and the error is not due to a physical failure,check if a trace file was
generated on the server at failure time.Existence of a trace file may suggest an Oracle internal error
that requires the assistance of customer support.
ORA-00942:table or view does not exist產(chǎn)生原因:這是由于裝載的表或視圖不存在,多半是CATEXP.SQL還沒(méi)有運(yùn)行,無(wú)法執(zhí)行Export視圖,如果CATEXP.SQL已經(jīng)運(yùn)
行,則可能是版本錯(cuò)誤。解決方法:因?yàn)镮mport和Export共享的一些視圖是通過(guò)運(yùn)行CATEXP.SQL來(lái)裝載的(它們具有相同的視圖),并不生成單獨(dú)
的CATEXP.SQL,因而造成視圖與Export代碼不同步,較難保持彼此之間的兼容,用戶就必須建立自己的Export應(yīng)用,從而
避免ORA-00942的錯(cuò)誤。相應(yīng)的英文如下:Cause:The table or view entered does not exist,a synonym that is jnot allowed here was used,or a view was
referenced where a table is required.Existing user tables and views can be listed by querying the data
dictionary.Certain privileges may required to access the table.If an application returned this message,the
table the application tried to access does not exist in the database,or the application does not have
access to it.Action:Check each of the following:The spelling of the table or view name.That a view is not specified where a table is requiredThat an existing table or view name exists.Contact the database administrator if the table needs to be created or if user or application priviledes
are required to access the table.Also, if attempting to access a table or view in another schema,make certain thecorrect schema is
referenced and that access to the object is granted.
ORA-01598:rollback segment “name” is not onlineCause:The rollback segment was taken offline either manually or by SMON.Action:Check the status of the rollback segment in DBA_ROLLBACK_SEGS.ORA-1636: rollback segment “name” is already onlineCause:A rollback segment can only be used by one instance and an instance is trying to bring a rollback
segment online that is already in use.Action:Check that the values set in the initialization parameter file for parameters
ROLLBACK_SEGMENTS,ROLLBACK_SEGMENT_INITIAL,and ROLLBACK_SEGMENT_COUNT are correctly set for the instance
whiththe problem,Also check that the instance is using the correct initialization parameter file.Make sure
you are not confused about the difference between private and public rollback segments.See the Oracle8
Server Administrator’s Guide for more information about using rollback segments in paraller mode.上述錯(cuò)誤均為我們?cè)谑褂没貪L段時(shí)比較常見(jiàn)的問(wèn)題,ORA-01598指明當(dāng)前使用的回滾段的狀態(tài)為“not online”,不能使
用,將它改為“online”狀態(tài)即可使用;ORA-01636指明當(dāng)前回滾段已經(jīng)為“online”狀態(tài),可以直接使用,不用再集合
它。ORA-1636 signalled during: alter rollback segment rb00 online我們?cè)谧鼋y(tǒng)計(jì)時(shí)還可能遇到下述問(wèn)題:一個(gè)rollback segment的狀態(tài)為”Needs Recovery”的現(xiàn)象,這是由于Oracle回退
一個(gè)事物表中的沒(méi)有提交的事物時(shí)失敗所造成的。通常原因?yàn)橐粋(gè)datafile或者tablespace是在offline的狀態(tài)或者一個(gè)
undo的目標(biāo)被破壞或者rollback segment被破壞。解決的辦法是將所有的tablespace和datafile都置為online狀態(tài),如果
不能解決則做下面的工作:1>.在initsid.ora中加入event=”10015 trace name context forever lever
10”;2>.shutdown數(shù)據(jù)庫(kù)然后重啟;3>.在$Oracle_HOME/rdbms/log下,找到startup時(shí)生成的trace file;4>.在trace文件
中,找到下列信息“error recovery tx(#,#) object #”;5>.根據(jù)object#(與sys.dba_objects表中的object_id相同)在
sys.dba_objects表中查出該object的名字;6>.將該object drop掉;7>.在init.ora文件中將該rollback segment放回
rollback_segments參數(shù)中,刪除event;8>.shutdown數(shù)據(jù)庫(kù)然后重啟。此時(shí)”Needs Recovery”的問(wèn)題應(yīng)該是完全解決
了,否則就是rollback segment被破壞了。
ORA-01688:unable to extend table name.name partition NAME by NUM in tablespace NAME產(chǎn)生原因:指定的tablespace空間已經(jīng)被占用滿,無(wú)法擴(kuò)展。解決方法:使用“ALTER TABLESPACE ADD DATAFILE”命令增加文件系統(tǒng)文件和原始分區(qū),或者增加INITIAL的大小(如:
alter tablespace CDRS101 default storage(next 500M pctincrease 1))應(yīng)該能夠解決,否則就是有人使用你的表空間
上創(chuàng)建了一個(gè)比較大的數(shù)據(jù)文件導(dǎo)致你的表空間不夠用。一個(gè)報(bào)錯(cuò)例子如下:ORA-1688: unable to extend table RMMCDR.LOCAL_CDR partition LOCAL_CDR101 by 460800 in tablespace CDRS101相應(yīng)的英文如下:Cause:An extent could not be allocated for a table segment in tablespaceAction:Use the ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the specified tablespace 本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|