如果非必要一般不會重啟服務(wù)器,如果重啟服務(wù)器,必須先要正確關(guān)閉oracle,然后在重啟。
人無完人,總有人會犯錯誤,其中一臺線上oracle維護者,失誤,直接將oracle服務(wù)器重啟了,重啟之后,直接造成了,數(shù)據(jù)庫提示ora-00603: ORACLE server session terminated by fatal error,
用sqlplus 登錄oracle;
1
2
3
su - oracle
alter system set events '10046 trace name context off';
alter system set timed_statistics=false;
然后重啟oracle,最后發(fā)現(xiàn)還是報錯,
去了oracle 的日志目錄并查找trace文件
1
2
3
4
5
6
cd /data0/oracle/admin/dzinfoiims/bdump/
cat dzinfoiims_smon_6401.trc
SMON: following errors trapped and ignored:
ORA-01595: error freeing extent (4) of rollback segment (1))
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [62], [32], [], [], [], [], []
最后幾行顯示 ora-01595,按照提示因為不正確關(guān)閉oracle導(dǎo)致回滾段失敗,基本上可以斷定undo表空間損壞,但是可以通過重建undo文件。
1)生成pfile
1
SQL> create pfile from spfile
修改pfile參數(shù):
1
2
3
#*.undo_management='AUTO'
*.undo_management='MANUAL'
_allow_resetlogs_corruption=true
2)以pfile啟動數(shù)據(jù)庫
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
SQL> startup mount pfile='/data0/oracle/product/10.2.0/db_1/dbs/initdzinfoiims.ora';
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 2085872 bytes
Variable Size 373296144 bytes
Database Buffers 230686720 bytes
Redo Buffers 6299648 bytes
Database mounted.
SQL> show parameter undo
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
undo_management string
MANUAL
undo_retention integer
900
undo_tablespace string
UNDOTBS1
SQL> alter database open;
Database altered.
3)新建undo表空間undotbs2
1
2
3
4
5
6
7
SQL> create undo tablespace undotbs2 datafile '/data0/oracle/oradata/dzinfoiims/undotbs02.dbf' size 1G;
table space created.
SQL> drop tablespace undotbs1;
The deleted table space .
SQL> alter tablespace undotbs2 rename to undotbs1;
table space was alted.
4)以spfile重啟數(shù)據(jù)庫
01
02
03
04
05
06
07
08
09
10
11
12
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 5016387584 bytes
Fixed Size 2027640 bytes
Variable Size 671092616 bytes
Database Buffers 4328521728 bytes
Redo Buffers 14745600 bytes
Database mounted.
本以為至此結(jié)束,但是有兩個表查詢,竟然提示ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], []
這是oracle的一個bug
可以通過alter日志,查看是那個表有問題
可以在dba狀態(tài)下
execute dbms_stats.delete_table_stats('iims','bbs_message_map');
PL/SQL procedure successfully completed.
接下該表,就select就沒事了。
0您可能也喜歡:
oracle 10G處理故障系列之ORA-01207: file is more recent than control file - old control file oracle 10G處理故障系列之ORA-25153: Temporary Tablespace is Empty PHP 安裝64位oracle客戶端 [轉(zhuǎn)]xen虛擬化實戰(zhàn)系列(六)之xen虛擬機破解密碼 LSI SAS 1068E Raid CentOS 5.5 安裝實例 如何在linux和windows平臺合并多個文件方法 用nginx_php 自動安裝LNMP Discuz論壇后臺卡及502錯誤的解決思路無覓關(guān)聯(lián)推薦[?]您可能喜歡:
oracle oraoracle 10G處理故障系列之ORAoracle 10gPHP 安裝64位oracle客戶端使用LVM技術(shù)提升Xen虛擬機性能的實現(xiàn)純靜態(tài)文件環(huán)境下的Nginx優(yōu)化思路apache 2.2.X 動態(tài)添加modmysql之快速刪除表友薦[?]