UPDATE GLOBAL_NAME SET GLOBAL_NAME = '';注意:生产环境不要随便执行哦,特别是像我这种小白!


如果把GLOBAL_NAME 修改为空的,或者存取GLOBAL_NAME的数据块发生损坏就会报[18062]的错误,如下


SQL> startup
ORACLE instance started.


Total System Global Area 422670336 bytes
Fixed Size 1344616 bytes
Variable Size 318770072 bytes
Database Buffers 96468992 bytes
Redo Buffers 6086656 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [18062], [], [], [], [], [], [], [],
[], [], [], []
Process ID: 3552
Session ID: 1 Serial number: 5





模拟实验






1.查看global_name的值




SQL> select * from global_name;




GLOBAL_NAME


--------------------------------------------------------------------------------


NODE3




2.把 global_name 值做修改


SQL> UPDATE GLOBAL_NAME SET GLOBAL_NAME = '';




1 row updated.




SQL> commit;




Commit complete.




SQL> shutdown immediate


Database closed.


Database dismounted.


ORACLE instance shut down.




SQL> startup


ORACLE instance started.




Total System Global Area 422670336 bytes


Fixed Size 1344616 bytes


Variable Size 318770072 bytes


Database Buffers 96468992 bytes


Redo Buffers 6086656 bytes


Database mounted.


ORA-01092: ORACLE instance terminated. Disconnection forced


ORA-00600: internal error code, arguments: [18062], [], [], [], [], [], [], [],


[], [], [], []


Process ID: 3552


Session ID: 1 Serial number: 5






二、解决方法:




1) 启动数据库到 Mount状态




SQL> conn / as sysdba


Connected to an idle instance.




SQL> startup mount;


ORACLE instance started.




Total System Global Area 422670336 bytes 


Fixed Size 1344616 bytes 


Variable Size 318770072 bytes 


Database Buffers 96468992 bytes 


Redo Buffers 6086656 bytes 


Database mounted.




2) 查找oracle进程的pid




 [root@node3 ~]# ps -ef | grep LOCAL | grep -v grep


oracle    2562  2517  0 15:09 ?        00:00:00 oraclenode3 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))


2562




3)这个 PID是 2562 是下面要使用的GDB


                    


[root@node3 ~]# gdb $ORACLE_HOME/bin/oracle 2562


GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)


Copyright (C) 2009 Free Software Foundation, Inc.


License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>


This is free software: you are free to change and redistribute it.


There is NO WARRANTY, to the extent permitted by law.  Type "show copying"


and "show warranty" for details.


This GDB was configured as "x86_64-redhat-linux-gnu".


For bug reporting instructions, please see:


<http://www.gnu.org/software/gdb/bugs/>...


/bin/oracle: No such file or directory.


Attaching to process 2562


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/bin/oracle...(no debugging symbols found)...done.


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libodm11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libodm11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libcell11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libcell11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libskgxp11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libskgxp11.so


Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.


Loaded symbols for /lib64/librt.so.1


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libnnz11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libnnz11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libclsra11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libclsra11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libdbcfg11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libdbcfg11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libhasgen11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libhasgen11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libskgxn2.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libskgxn2.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libocr11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libocr11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libocrb11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libocrb11.so


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libocrutl11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libocrutl11.so


Reading symbols from /usr/lib64/libaio.so.1...(no debugging symbols found)...done.


Loaded symbols for /usr/lib64/libaio.so.1


Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.


Loaded symbols for /lib64/libdl.so.2


Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.


Loaded symbols for /lib64/libm.so.6


Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.


[Thread debugging using libthread_db enabled]


Loaded symbols for /lib64/libpthread.so.0


Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done.


Loaded symbols for /lib64/libnsl.so.1


Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.


Loaded symbols for /lib64/libc.so.6


Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.


Loaded symbols for /lib64/ld-linux-x86-64.so.2


Reading symbols from /usr/lib64/libnuma.so.1...(no debugging symbols found)...done.


Loaded symbols for /usr/lib64/libnuma.so.1


Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done.


Loaded symbols for /lib64/libnss_files.so.2


Reading symbols from /u01/app/oracle/product/11.2.0/db_1/lib/libnque11.so...(no debugging symbols found)...done.


Loaded symbols for /u01/app/oracle/product/11.2.0/db_1/lib/libnque11.so


0x000000315a20d8e0 in __read_nocancel () from /lib64/libpthread.so.0


(gdb) break kokiasg


Breakpoint 1 at 0x14d5f20


(gdb) continue


Continuing. 


这一步会一直停在这里




6) 打开一个新的窗口打开数据库


SQL> alter database open


这一步会hang住不动






这时候gdb会输出以下内容




Breakpoint 1, 0x00000000014d5f20 in kokiasg ()






7) 打开一个新的窗口,用sqlplus登录




SQLPLUS / as sysdba




SQL> select status from v$instance;




STATUS


-----------


OPEN




SQL > update global_name set global_name = 'NODE3';


1 row updated.




SQL > commit;






8)打开一个新的会话,连接到sqlplus查看GLOBAL_NAME:




SQL> select * from global_name;




GLOBAL_NAME


----------------------


NODE3




9) Kill GDB 的会话然后退出


(Gdb) kill


Kill the program being debugged? (y or n) y


(Gdb) quit




重启数据库成功


SQL> startup


ORACLE instance started.




Total System Global Area  839282688 bytes


Fixed Size


Variable Size


Database Buffers


Redo Buffers


Database mounted.


Database opened.






这个时候最开始hang住的会话会看到如下错误


alter database open


*


ERROR at line 1:


ORA-03113: end-of-file on communication channel


Process ID: 2562


Session ID: 1 Serial number: 5






参考MOS :  743676.1   1431334.1