UJP - 技術情報1

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

ORA-01658でexpが失敗

ORA-01658でexpが失敗


0.改訂履歴

  • 2005.10.11 新規作成

1.はじめに

 このドキュメントでは,ORA-01658エラーの対処手順を説明する. 利用してるOracleは,RedHat 6.2で稼働しているOracle8i 8.1.5.0.1である. OSもハードも古いものなのでサーバ移転を行い,撤去を依頼されたんでexpコマンドでフルバックアップをとろうとしたら,このエラーが発生した. なんでもこのOracleは,稼働中にも関わらずファイルコピーでバックアップを取得ていたので,これまでオンラインバックアップ,RMANはおろかexportさえも行っていなかったとの事.  ORA-1658エラーはテーブルスペースの容量不足が問題なので,それを確認して増やす手順となっている.

2.現象

  • 現象を確認する.
[oracle@testdb oracle]$ exp sys/sys_user_password@TESTDB FILE=testdb.dmp

Export: Release 8.1.5.0.1 - Production on 火 Oct 11 11:13:28 2005

(c) Copyright 1999 Oracle Corporation.  All rights reserved.


Connected to: Oracle8i Release 8.1.5.0.1 - Production
With the Java option
PL/SQL Release 8.1.5.0.0 - Production
Export done in JA16SJIS character set and JA16SJISFIXED NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SYS 
. exporting object type definitions for user SYS 
About to export SYS's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. exporting synonyms
. exporting views
EXP-00008: ORACLE error 1658 encountered
ORA-01658: unable to create INITIAL extent for segment in tablespace TEMP
EXP-00000: Export terminated unsuccessfully
[oracle@testdb oracle]$
  • ORA-01658エラーが原因で,exportが異常終了した.
  • メッセージに,TEMPテーブルスペースの領域が足りないとされている.

3.確認

  • 現在のTEMPテーブルスペースを確認する.
exportを実行する.
SQL> select tablespace_name,bytes from dba_data_files
2 where tablespace_name = 'TEMP';

TABLESPACE_NAME BYTES
------------------------------ ----------
TEMP 1048576

SQL>  
  • バイト単位なので,1MBとなる.
  • テーブルスペースを構成しているデータベースファイルを確認する.
SQL> select file_name from dba_data_files where tablespace_name='TEMP';

FILE_NAME
--------------------------------------------------------------------------------
/u02/oradata/TESTDB/temp01.dbf

SQL>
  • ファイルシステムから確認する.
[oracle@testdb /u01]$ ls -lah /u02/oradata/TESTDB/temp01.dbf
-rw-r-----    1 oracle   dba          1.0M Oct 11 11:13 /u02/oradata/TESTDB/temp01.dbf
[oracle@testdb /u01]$
  • 確かに1MBしかない...

4.対処

  • 1MBというのは論外なので,領域を増やす.
  • 増やす前に,ファイルシステムの空き容量を確認する.
[oracle@testdb /u01]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/ida/c0d0p1       3.8G  998M  2.7G  27% /
/dev/ida/c0d0p6       1.9G  953M  915M  51% /u01
/dev/ida/c0d0p7       1.9G  1.7G   79M  96% /u02
/dev/ida/c0d0p8       1.9G  1.4G  434M  77% /u03
/dev/ida/c0d0p9       1.9G  261M  1.6G  14% /u04
/dev/ida/c0d0p5       1.9G   18M  1.8G   1% /var
[oracle@testdb /u01]$
  • 現在のTEMP用データベースファイルが格納されている/u02には空き領域がないのので,/u04に保存する.
SQL> alter tablespace TEMP
  2  add datafile '/u04/oradata/TESTDB/temp02.dbf'
  3  size 300M;

Tablespace altered.

SQL>  
  • テーブルスペースの容量を確認する.
SQL> select tablespace_name,bytes from dba_data_files
  2  where tablespace_name = 'TEMP';

TABLESPACE_NAME                     BYTES
------------------------------ ----------
TEMP                              1048576
TEMP                            314572800

SQL> select sum(bytes) from dba_free_space
  2  where tablespace_name = 'TEMP';

SUM(BYTES)
----------
 315617280

SQL>
  • せっかくなんで計算してみたり.
SQL> select sum(bytes)/1024/1024 from dba_free_space
  2  where tablespace_name = 'TEMP';

SUM(BYTES)/1024/1024
--------------------
          300.996094

SQL>  
  • 301MBになっていることが確認できた.

5.再実行

  • 再度,expを実行してみる.
[oracle@testdb /u01]$ exp sys/sys_user_password@TESTDB FILE=testdb.dmp

Export: Release 8.1.5.0.1 - Production on 火 Oct 11 12:00:41 2005

(c) Copyright 1999 Oracle Corporation.  All rights reserved.


Connected to: Oracle8i Release 8.1.5.0.1 - Production
With the Java option
PL/SQL Release 8.1.5.0.0 - Production
Export done in JA16SJIS character set and JA16SJISFIXED NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SYS 
. exporting object type definitions for user SYS 
About to export SYS's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting snapshots
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
Export terminated successfully without warnings.
[oracle@testdb /u01]$
  • 問題なく実行できたようである.


広告スペース
Google