[Oracle] redo undo table space

Redo undo table space

Scenes:

alert log, reported the following error:

[oraprod@arpinfo bdump]$ tail -f alert_PROD.log 
Errors in file /ora1159/prod/proddb/9.2.0/admin/PROD_arpinfo/udump/prod_ora_8729.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [4097], [], [], [], [], [], [], []
Fri Sep  6 10:08:56 2019
Errors in file /ora1159/prod/proddb/9.2.0/admin/PROD_arpinfo/udump/prod_ora_8785.trc:
ORA-00600: internal error code, arguments: [4097], [], [], [], [], [], [], []
Fri Sep  6 10:08:59 2019
Errors in file /ora1159/prod/proddb/9.2.0/admin/PROD_arpinfo/udump/prod_ora_8785.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [4097], [], [], [], [], [], [], []

the reason

The following error is occurring in the alert.log right before the database crashes.

ORA-00600: internal error code, arguments: [4194], [#], [#], [], [], [], [], []

This error indicates that a mismatch has been detected between redo records and rollback (undo) records.

ARGUMENTS:

Arg [a] - Maximum Undo record number in Undo block
Arg [b] - Undo record number from Redo block

Since we are adding a new undo record to our undo block, we would expect that the new record number is equal to the maximum record number in the undo block plus one. Before Oracle can add a new undo record to the undo block it validates that this is correct. If this validation fails, then
an ORA-600 [4194] will be triggered.

The core reason is: undo exceeded its maximum amount. Reconstruction undo table space, the unlimited.

1. Check the parameters undo

SQL> show parameter undo;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     1800
undo_suppress_errors                 boolean     FALSE
undo_tablespace                      string      UNDOTBS7

2. Modify the parameters undo_retention

SQL> ALTER SYSTEM SET undo_retention=900 SCOPE=BOTH;
ALTER SYSTEM SET undo_retention=900 SCOPE=BOTH
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup

3. spfile way to start the database

-------------------------------以spfile启动数据库
SQL> create spfile from pfile;
File created.
-------------------------------重启数据库
SQL> shutdown immediate;
SQL> startup

-------------------------------修改undo_retention
SQL> ALTER SYSTEM SET undo_retention=900 SCOPE=BOTH;
System altered.

4. Create a table space UNDOTBS8

SQL> create undo tablespace UNDOTBS8 datafile '/ora1159/prod/proddata/UNDOTBS8.dbf' size 256M autoextend on next 128M maxsize unlimited;

Tablespace created.

5. Are there any query history undo the transaction (including transaction rollback)

SELECT a.tablespace_name,a.segment_name,b.ktuxesta,b.ktuxecfl,
b.ktuxeusn||'.'||b.ktuxeslt||'.'||b.ktuxesqn trans
FROM dba_rollback_segs a, x$ktuxe b 
WHERE a.segment_id = b.ktuxeusn 
AND a.tablespace_name = UPPER('&tsname') 
AND b.ktuxesta <> 'INACTIVE';
Enter value for tsname: UNDOTBS7
old   5: AND a.tablespace_name = UPPER('&tsname')
new   5: AND a.tablespace_name = UPPER('UNDOTBS7')

no rows selected

If no data can be switched undo tablespace.

6. Switch undo tablespace

alter system set undo_tablespace='UNDOTBS8';

7. Query rollback situation

Original rollback undo all the table space offline, you can delete the relevant table space

SQL> select tablespace_name,segment_name,status from dba_rollback_segs;

TABLESPACE_NAME                SEGMENT_NAME                   STATUS
------------------------------ ------------------------------ ----------------
SYSTEM                         SYSTEM                         ONLINE
UNDOTBS7                       _SYSSMU2$                      OFFLINE
UNDOTBS7                       _SYSSMU3$                      OFFLINE
UNDOTBS7                       _SYSSMU4$                      OFFLINE
UNDOTBS7                       _SYSSMU5$                      OFFLINE
UNDOTBS7                       _SYSSMU6$                      OFFLINE
UNDOTBS7                       _SYSSMU7$                      OFFLINE
UNDOTBS7                       _SYSSMU8$                      OFFLINE
UNDOTBS7                       _SYSSMU9$                      OFFLINE
UNDOTBS7                       _SYSSMU10$                     OFFLINE
UNDOTBS7                       _SYSSMU11$                     OFFLINE

TABLESPACE_NAME                SEGMENT_NAME                   STATUS
------------------------------ ------------------------------ ----------------
UNDOTBS7                       _SYSSMU12$                     OFFLINE
UNDOTBS7                       _SYSSMU13$                     OFFLINE
UNDOTBS7                       _SYSSMU14$                     OFFLINE
UNDOTBS8                       _SYSSMU15$                     ONLINE
UNDOTBS8                       _SYSSMU16$                     ONLINE
UNDOTBS8                       _SYSSMU17$                     ONLINE
UNDOTBS8                       _SYSSMU18$                     ONLINE
UNDOTBS8                       _SYSSMU19$                     ONLINE
UNDOTBS8                       _SYSSMU20$                     ONLINE
UNDOTBS8                       _SYSSMU21$                     ONLINE
UNDOTBS8                       _SYSSMU22$                     ONLINE

TABLESPACE_NAME                SEGMENT_NAME                   STATUS
------------------------------ ------------------------------ ----------------
UNDOTBS8                       _SYSSMU23$                     ONLINE
UNDOTBS8                       _SYSSMU24$                     ONLINE

24 rows selected.

8. The original undo tablespace offline

alter tablespace UNDOTBS7 offline;

9. undo delete the original table space

drop tablespace UNDOTBS7 including contents and datafiles;

10. The modified undo retention

SQL> ALTER SYSTEM SET undo_retention=1800 SCOPE=BOTH;

references

Step by step to resolve ORA-600 4194 4193 4197 on database crash (文档 ID 1428786.1)

Guess you like

Origin www.cnblogs.com/zhangshengdong/p/11725000.html