以sys DBA帐户登陆数据库如下:
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 3月 11 08:46:26 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select segment_name as seg,tablespace_name as tab from dba_rollback_segs;
SEG TAB
------------------------------ ------------------------------
SYSTEM SYSTEM
_SYSSMU1$ UNDOTBS1
_SYSSMU2$ UNDOTBS1
_SYSSMU3$ UNDOTBS1
_SYSSMU4$ UNDOTBS1
_SYSSMU5$ UNDOTBS1
_SYSSMU6$ UNDOTBS1
_SYSSMU7$ UNDOTBS1
_SYSSMU8$ UNDOTBS1
_SYSSMU9$ UNDOTBS1
_SYSSMU10$ UNDOTBS1
已选择11行。
SQL> select segment_name as seg,owner,status from dba_rollback_segs;
SEG OWNER STATUS
------------------------------ ------ ----------------
SYSTEM SYS ONLINE
_SYSSMU1$ PUBLIC ONLINE
_SYSSMU2$ PUBLIC ONLINE
_SYSSMU3$ PUBLIC ONLINE
_SYSSMU4$ PUBLIC ONLINE
_SYSSMU5$ PUBLIC ONLINE
_SYSSMU6$ PUBLIC ONLINE
_SYSSMU7$ PUBLIC ONLINE
_SYSSMU8$ PUBLIC ONLINE
_SYSSMU9$ PUBLIC ONLINE
_SYSSMU10$ PUBLIC ONLINE
已选择11行。
SQL>
SQL> select * from v$waitstat where class='undo header';
CLASS COUNT TIME
------------------ ---------- ----------
undo header 129 4
SQL> select usn,extents,waits from v$rollstat;
USN EXTENTS WAITS
---------- ---------- ----------
0 6 0
1 3 6
2 3 8
3 3 3
4 5 5
5 3 7
6 3 3
7 4 8
8 3 3
9 21 6
10 4 4
已选择11行。
SQL>
SQL> select s.usn,n.name,s.extents as ext,s.optsize as opt,s.hwmsize as hw,s.status as st
2 from v$rollstat s, v$rollname n where s.usn=n.usn;
USN NAME EXT OPT HW
---------- ------------------------------ ---------- ---------- ----------
ST
---------------
0 SYSTEM 6 385024
ONLINE
1 _SYSSMU1$ 3 16900096
ONLINE
2 _SYSSMU2$ 3 8511488
ONLINE
USN NAME EXT OPT HW
---------- ------------------------------ ---------- ---------- ----------
ST
---------------
3 _SYSSMU3$ 3 5365760
ONLINE
4 _SYSSMU4$ 5 8511488
ONLINE
5 _SYSSMU5$ 3 23257088
ONLINE
USN NAME EXT OPT HW
---------- ------------------------------ ---------- ---------- ----------
ST
---------------
6 _SYSSMU6$ 3 4317184
ONLINE
7 _SYSSMU7$ 4 18997248
ONLINE
8 _SYSSMU8$ 3 6414336
ONLINE
USN NAME EXT OPT HW
---------- ------------------------------ ---------- ---------- ----------
ST
---------------
9 _SYSSMU9$ 21 20045824
ONLINE
10 _SYSSMU10$ 4 12705792
ONLINE
已选择11行。
SQL>
通过以上查询,知道数据库的回滚段争用情况比较严重。各位帮忙分析下,是不是需要增加回滚段的数量,
或者扩大回滚段的大小来解决回滚段争用的情况。
我尝试在自动管理的模式下,建立普通表空间RBS.然后执行如下命令:
SQL> CREATE PUBLIC ROLLBACK SEGMENT R03
2 TABLESPACE RBS
3 STORAGE (
4 INITIAL 200K
5 NEXT 200K
6 MINEXTENTS 20
7 );
回退段已创建。
SQL> ALTER ROLLBACK SEGMENT R03 ONLINE;
回退段已变更。
SQL> select segment_name as seg,tablespace_name as tab from dba_rollback_segs;
SEG TAB
------------------------------ ------------------------------
SYSTEM SYSTEM
_SYSSMU1$ UNDOTBS1
_SYSSMU2$ UNDOTBS1
_SYSSMU3$ UNDOTBS1
_SYSSMU4$ UNDOTBS1
_SYSSMU5$ UNDOTBS1
_SYSSMU6$ UNDOTBS1
_SYSSMU7$ UNDOTBS1
_SYSSMU8$ UNDOTBS1
_SYSSMU9$ UNDOTBS1
_SYSSMU10$ UNDOTBS1
已选择11行。
SQL>
由于Oracle用的是默认回滚段自动管理,这个时候是看不到的,需要修改到MANUAL模式下才可创建。
请问怎样在不改变回滚段自动管理的模式下,增加回滚段来解决回滚段的争用问题。
----------------------------------------------------------------------------------------------------------------------------------------