遭遇ORA 01552錯誤

2021-07-06 09:25:07 字數 3998 閱讀 6110

今天新搭建了乙個10g的測試資料庫,執行都很正常,但是在開啟autotrace功能後執行語句,報錯

sql> set autotrace on

sql> select username,sid,serial#,server,paddr,status from v$session where username=user;

username sid serial# server paddr status

sys 35 11 dedicated 2553cce8 active

sys 50 16 dedicated 2553cce8 inactive

error:

ora-00604: error occurred at recursive sql level 1

ora-01552: cannot use system rollback segment for non-system tablespace 『tempts1』

sp2-0612: error generating autotrace explain report

0  recursive calls

0 db block gets

0 consistent gets

0 physical reads

0 redo size

768 bytes sent via sql*net to client

380 bytes received via sql*net from client

2 sql*net roundtrips to/from client

0 sorts (memory)

0 sorts (disk)

2 rows processed

錯誤提示非系統表空間tempts1不能使用系統回退段,檢視回滾段管理模式和回滾表空間。

sql> show parameter undo

name type value

undo_management string manual

undo_retention integer 900

undo_tablespace string

再看看系統中回滾段的狀態

sql> select segment_name, tablespace_name, status from dba_rollback_segs;

segment_name tablespace_name status

system system online

_syssmu1un

dotb

soff

line

syss

mu2 undotbs offline

_syssmu3un

dotb

soff

line

syss

mu4 undotbs offline

_syssmu5un

dotb

soff

line

syss

mu6 undotbs offline

_syssmu7un

dotb

soff

line

syss

mu8 undotbs offline

_syssmu9un

dotb

soff

line

syss

mu10 undotbs offline

因為這庫是手工建立的,在編輯初始化引數檔案時,忘了設定undo_management和undo_tablespace。知道了這個,我想解決起來也就很簡單了,

首選的當然是使用自動管理表空間的方式。

sql> alter system set undo_tablespace=undotbs scope=spfile;

system altered.

sql> alter system set undo_management=auto scope=spfile;

system altered.

sql> shutdown immediate

database closed.

database dismounted.

oracle instance shut down.

sql> startup

oracle instance started.

total system global area 96468992 bytes

fixed size 1217884 bytes

variable size 88083108 bytes

database buffers 4194304 bytes

redo buffers 2973696 bytes

database mounted.

database opened.

另外,我們也可以繼續沿用老的手動管理回滾段的方式。

sql> create rollback segment rbs01;

rollback segment created.

sql> alter rollback segment rbs01 online;

rollback segment altered.

sql> select segment_name, tablespace_name, status from dba_rollback_segs;

segment_name tablespace_name status

system system online

_syssmu1un

dotb

soff

line

syss

mu2 undotbs offline

_syssmu3un

dotb

soff

line

syss

mu4 undotbs offline

_syssmu5un

dotb

soff

line

syss

mu6 undotbs offline

_syssmu7un

dotb

soff

line

syss

mu8 undotbs offline

_syssmu9un

dotb

soff

line

syss

mu10 undotbs offline

segment_name tablespace_name status

rbs01 system online

這樣,就不會有任何問題了。

sql> set autotrace trace

sql> set line 124

sql> select tablespace_name from dba_tablespaces;

plan hash value: 3778488125

| 0 | select statement | | 5 | 65 | 4 (0)| 00:00:01 |

1 - filter(「ts」.」online$」<>3 and bitand(「flags」,2048)<>2048)

0  recursive calls

0 db block gets

0 consistent gets

0 physical reads

0 redo size

0 bytes sent via sql*net to client

0 bytes received via sql*net from client

0 sql*net roundtrips to/from client

0 sorts (memory)

0 sorts (disk)

5 rows processed

ORA 20446,再次遭遇oracle bug

ora 20446 the owner of the job is not registered ora 06512 at sysman.mgmt jobs line 168 ora 06512 at sysman.mgmt jobs line 86 ora 06512 at line 1 上bai...

ORA錯誤編碼

ora 00942 表或檢視不存在 在oracle新建乙個表並在oracle中用select查得到,可是在asp.net執行sql語句總報錯 ora 00942 表或檢視不存在 原因分析 須在select from table 前加當前使用者名稱 如 select from sys.table 使用...

ORA錯誤小彙總

今天看到一篇不錯的彙總哈 表示立刻mark下哈 ora 12560 協議介面卡錯誤 可能是以下原因 1 服務沒有開啟 oracle的服務,oraclehome92tnslistener 2 資料庫例項沒有開啟 oracleserviceorcl 3 登錄檔中預設oracle sid設定錯誤 orac...