In the process of solving a large Oracle database recovery caused by a misoperation, the shutdown abort instance sometimes fails to solve the problem, so we use the Oracle process to kill, to delete its shared memory segments, the Oracle database strength will be suspended to force abort.
1. kill Oracle Core processes
Reference
- [ora10g@test bdump]$ ps -ef|grep ora_
- ora10g 14431 1 0 Feb21 ? 00:01:32 ora_pmon_streams
- ora10g 14433 1 0 Feb21 ? 00:00:46 ora_psp0_streams
- ora10g 14435 1 0 Feb21 ? 00:00:47 ora_mman_streams
- ora10g 14437 1 0 Feb21 ? 00:06:57 ora_dbw0_streams
- ora10g 14439 1 0 Feb21 ? 00:06:24 ora_lgwr_streams
- ora10g 14441 1 0 Feb21 ? 00:46:13 ora_ckpt_streams
- ora10g 14443 1 0 Feb21 ? 00:01:02 ora_smon_streams
- ora10g 14445 1 0 Feb21 ? 00:00:00 ora_reco_streams
- ora10g 14447 1 0 Feb21 ? 00:05:53 ora_cjq0_streams
- ora10g 14449 1 0 Feb21 ? 00:03:15 ora_mmon_streams
- ora10g 14451 1 0 Feb21 ? 00:02:47 ora_mmnl_streams
- ora10g 14453 1 0 Feb21 ? 00:00:01 ora_d000_streams
- ora10g 14455 1 0 Feb21 ? 00:00:03 ora_s000_streams
- ora10g 14460 1 0 Feb21 ? 00:00:05 ora_qmnc_streams
- ora10g 14468 1 0 Feb21 ? 00:00:08 ora_q000_streams
- ora10g 14470 1 0 Feb21 ? 00:00:02 ora_q001_streams
- ora10g 13622 1 0 03:08 ? 00:00:00 ora_j000_streams
- ora10g 13710 12028 0 03:13 pts/5 00:00:00 grep ora_
- [ora10g@test bdump]$ kill -9 14431 14433 14435 14437
14439 14441 14443 14445 14447 14449 14451 14453 14455 14460 14468 14470 13622
2. Delete Oracle shared memory segments
Reference
- [ora10g@test bdump]$ ipcs
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0xcc481b8c 1441796 ora10g 640 599785472 00x40b3b558
2818054 ora10g 640 1077936128 0
- ------ Semaphore Arrays --------
- key semid owner perms nsems
- 0x0d908ec4 360448 ora10g 640 154
- ------ Message Queues --------
- key msqid owner perms used-bytes messages
- [root@test ~]# ipcrm -m 1441796
- [root@test ~]# ipcrm -s 360448
In the solution to Oracle database recovery caused by an incorrect operation, I tried to open the instance again. Here the 10015 event is used.
Reference
- SQL> alter session set events '
10015 trace name adjust_scn level 1';
- Session altered.
- SQL> alter database open;
- alter database open
- *
- ERROR at line 1:
- ORA-01113: file 1 needs media recovery
- ORA-01110: data file 1:
'/ora10g/app/oradata/ldbra/system01.dbf'
- SQL> recover database;
- Media recovery complete.
- SQL> alter database open;
- Database altered.
The subsequent work is to add the tempfile to the temp tablespace and finally restore successfully.
Reference
- SQL> alter tablespace temp add tempfile
'/ora10g/app/oradata/ldbra/temp01.dbf' size 50m reuse;
- Tablespace altered.
The above content is an introduction to how to solve the Oracle database recovery caused by an incorrect operation. I hope you will gain some benefits.