ORA-01658:Unable to create INITIAL extent for segment in tablespace %s

ORA-39006: internal error ORA-39068: invalid master table data in row with PROCESS_ORDER=-3 ORA-01658: unable to create INITIAL extent for segment in tablespace CC_TBLSP

ORA-39097: Data Pump job encountered unexpected error -1658

導出數據時,DATADUMP在導出schema下創建並使用默認名'SYS_EXPORT_SCHEMA_01’作為JOB名。在導出數據之前,會有一個estimate過程,用來分析在導出數據時需要的擴展space是否足夠:

如果在創建tablespace時指定的initial大小為10M,如:

C:\Users\cc>sqlplus system/passwd@orcl

SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 7 00:47:45 2011

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>create tablespace CC_TBLSP logging datafile '/Oracle11gR2/oradata/ORCL/cc_tblsp.dbf' size 10M REUSE;

如果數據庫中的數據大小超過5M,但是在導出數據時需要的擴展空間如果為5M,此時就會報ORA-01658錯誤:

在創建tablespace時沒有指定初始擴展值,在導出數據時,會因為與tablespace相關的datafile空間不夠而自動擴展的屬性又沒有設置或者乾脆磁盤空間不夠大。so you have to check the size of the datafiles attached to the tablespace and check whether they can autoextend or not;Alternatively,you can specify a smaller size for the initial extent.

查看tablespace的相關信息:

SQL>select file_name,bytes,autoextensible,maxbytes

2 from dba_data_files

3 where tablespace_name='tablespace_name'

4 ;

解決方案:

Either add more datafiles to the tablespace, set the autoextensible flag or enlarge the datafile(s).
1)執行下面的sql增加tablespace的datafile的大小 SQL>alter database datafile '/Oracle11gR2/oradata/ORCL/cc_tblsp.dbf' resize 100m;

2)或者,對datafile設置autoextensible標誌: SQL>alter database datafile '/Oracle11gR2/oradata/ORCL/cc_tblsp.dbf' autoextend on next 200m maxsize 2000m;
3)或者為tablespace添加一個新的: SQL>alter tablespace TS_DP add datafile '/Oracle11gR2/oradata/ORCL/cc_tblsp.dbf' autoextend on next 200m maxsize 2000m;

posted @ 2013-07-09 15:46  ArcerZhang  阅读(2636)  评论(0编辑  收藏  举报