在解决由于一次误操作而引起的Oracle数据库大恢复的过程中, 由于shutdown abort实例有时起不到解决的作用,于是我们就采用杀Oracle进程,来删除其共享内存段的做法,将挂起Oracle数据库实力强制abort。
1、杀Oracle核心进程
引用
[ora10g@testbdump]$ps-ef|grepora_ ora10g1443110Feb21?00:01:32ora_pmon_streams ora10g1443310Feb21?00:00:46ora_psp0_streams ora10g1443510Feb21?00:00:47ora_mman_streams ora10g1443710Feb21?00:06:57ora_dbw0_streams ora10g1443910Feb21?00:06:24ora_lgwr_streams ora10g1444110Feb21?00:46:13ora_ckpt_streams ora10g1444310Feb21?00:01:02ora_smon_streams ora10g1444510Feb21?00:00:00ora_reco_streams ora10g1444710Feb21?00:05:53ora_cjq0_streams ora10g1444910Feb21?00:03:15ora_mmon_streams ora10g1445110Feb21?00:02:47ora_mmnl_streams ora10g1445310Feb21?00:00:01ora_d000_streams ora10g1445510Feb21?00:00:03ora_s000_streams ora10g1446010Feb21?00:00:05ora_qmnc_streams ora10g1446810Feb21?00:00:08ora_q000_streams ora10g1447010Feb21?00:00:02ora_q001_streams ora10g136221003:08?00:00:00ora_j000_streams ora10g1371012028003:13pts/500:00:00grepora_ [ora10g@testbdump]$kill-914431144331443514437 14439144411444314445144471444914451144531445514460144681447013622
2、删除Oracle 共享内存段
引用
[ora10g@testbdump]$ipcs ------SharedMemorySegments-------- keyshmidownerpermsbytesnattchstatus 0xcc481b8c1441796ora10g64059978547200x40b3b558 2818054ora10g64010779361280 ------SemaphoreArrays-------- keysemidownerpermsnsems 0x0d908ec4360448ora10g640154 ------MessageQueues-------- keymsqidownerpermsused-bytesmessages [root@test~]#ipcrm-m1441796 [root@test~]#ipcrm-s360448
在一次误操作引起的Oracle数据库大恢复的解决办法中再次尝试将实例打开,这里用到了10015事件。
引用
SQL>altersessionsetevents' 10015tracenameadjust_scnlevel1'; Sessionaltered. SQL>alterdatabaseopen; alterdatabaseopen * ERRORatline1: ORA-01113:file1needsmediarecovery ORA-01110:datafile1: '/ora10g/app/oradata/ldbra/system01.dbf' SQL>recoverdatabase; Mediarecoverycomplete. SQL>alterdatabaseopen; Databasealtered.
后续工作就是将tempfile添加到temp表空间中,终于恢复成功。
引用
SQL>altertablespacetempaddtempfile '/ora10g/app/oradata/ldbra/temp01.dbf'size50mreuse; Tablespacealtered.
相关文章
标签:Oracle