ORA-25153: Temporary Tablespace is Empty 重建控制文件导致丢失tempfile

本文记录了一次在使用Oracle数据库进行数据导出时遇到ORA-25153错误的过程及解决方案。通过检查发现临时表空间为空,并通过查看alert.log日志进一步定位问题原因,最终通过重新添加临时文件解决了该问题。
expdp jzh/jzh dumpfile=emp1.dmp directory=test_dir tables=emp1 logfile=emp1.log
Export: Release 11.2.0.3.0 - Production on Sat Sep 27 14:40:07 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-25153: Temporary Tablespace is Empty
ORA-06512: at "SYS.DBMS_LOB", line 724
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3964
ORA-06512: at line 1
导出数据时遇到以上报错,于是先看看temp表空在不在。
SYS@test>select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
EXAMPLE
SYS@test>select tablespace_name,file_name from dba_temp_files;---临时文件没有了
no rows selected
[oracle@11g test]$ ll
total 1955416
-rw-r----- 1 oracle oinstall  10076160 Sep 27 14:44 control01.ctl
-rw-r----- 1 oracle oinstall 362422272 Sep 27 12:12 example01.dbf
-rw-r----- 1 oracle oinstall  52429312 Sep 27 14:42 redo01.log
-rw-r----- 1 oracle oinstall  52429312 Sep 27 12:12 redo02.log
-rw-r----- 1 oracle oinstall  52429312 Sep 27 12:12 redo03.log
-rw-r----- 1 oracle oinstall 597696512 Sep 27 14:40 sysaux01.dbf
-rw-r----- 1 oracle oinstall 754982912 Sep 27 14:41 system01.dbf
-rw-r----- 1 oracle oinstall  30416896 Sep 25 22:14 temp01.dbf
-rw-r----- 1 oracle oinstall  99622912 Sep 27 14:40 undotbs01.dbf
-rw-r----- 1 oracle oinstall  15736832 Sep 27 14:40 users01.dbf
临时文件在,很奇怪,查查alert.log。
WARNING: Default Temporary Tablespace not specified in CREATE DATABASE command
Default Temporary Tablespace will be necessary for a locally managed database in future rele
ase
Successful mount of redo thread 1, with mount id 2157453076
Completed: CREATE CONTROLFILE REUSE DATABASE "TEST" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
WARNING: Default Temporary Tablespace not specified in CREATE DATABASE command
Default Temporary Tablespace will be necessary for a locally managed database in future rele
ase
Successful mount of redo thread 1, with mount id 2157453076
Completed: CREATE CONTROLFILE REUSE DATABASE "TEST" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
这时想起来前几天重建了控制文件,add回来。
SYS@test>alter tablespace temp add tempfile
  2  '/u01/app/oracle/oradata/test/temp01.dbf';
Tablespace altered.
TABLESPACE_NAME                FILE_NAME
------------------------------ ----------------------------------------
TEMP                           /u01/app/oracle/oradata/test/temp01.dbf

ok了,回来了。





来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10271187/viewspace-1283074/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10271187/viewspace-1283074/

Enter user-name: system Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options DROP USER PLMEE CASCADE * ERROR at line 1: ORA-01918: user 'PLMEE' does not exist DROP TABLESPACE PLMEE_DATA INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS * ERROR at line 1: ORA-00959: tablespace 'PLMEE_DATA' does not exist DROP TABLESPACE PLMEE_TEMP INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS * ERROR at line 1: ORA-00959: tablespace 'PLMEE_TEMP' does not exist CREATE TABLESPACE PLMEE_DATA DATAFILE 'D:\Oracle\oradata\PLM_DATA' SIZE 100M AUTOEXTEND ON NEXT 10M * ERROR at line 1: ORA-01119: error in creating database file 'D:\Oracle\oradata\PLM_DATA' ORA-27038: created file already exists OSD-04010: <create> option specified, file already exists CREATE TEMPORARY TABLESPACE PLMEE_TEMP TEMPFILE 'D:\Oracle\oradata\PLM_TEMP' SIZE 100M AUTOEXTEND ON NEXT 10M * ERROR at line 1: ORA-01119: error in creating database file 'D:\Oracle\oradata\PLM_TEMP' ORA-27038: created file already exists OSD-04010: <create> option specified, file already exists ALTER TABLESPACE PLMEE_DATA ADD DATAFILE 'E:\app\dba\oradata\PLMEE01_data' SIZE 100M AUTOEXTEND ON NEXT 10M * ERROR at line 1: ORA-00959: tablespace 'PLMEE_DATA' does not exist ALTER TABLESPACE PLMEE_DATA ADD DATAFILE 'E:\app\dba\oradata\PLMEE02_data' SIZE 100M AUTOEXTEND ON NEXT 10M * ERROR at line 1: ORA-00959: tablespace 'PLMEE_DATA' does not exist ALTER TABLESPACE PLMEE_DATA ADD DATAFILE 'E:\app\dba\oradata\PLMEE03_data' SIZE 100M AUTOEXTEND ON NEXT 10M * ERROR at line 1: ORA-00959: tablespace 'PLMEE_DATA' does not exist ALTER TABLESPACE PLMEE_DATA ADD DATAFILE 'E:\app\dba\oradata\PLMEE04_data' SIZE 100M AUTOEXTEND ON NEXT 10M * ERROR at line 1: ORA-00959: tablespace 'PLMEE_DATA' does not exist ALTER TABLESPACE PLMEE_DATA ADD DATAFILE 'E:\app\dba\oradata\PLMEE05_data' SIZE 100M AUTOEXTEND ON NEXT 10M * ERROR at line 1: ORA-00959: tablespace 'PLMEE_DATA' does not exist CREATE USER PLMEE IDENTIFIED BY PLMEE DEFAULT TABLESPACE PLMEE_DATA TEMPORARY TABLESPACE PLMEE_TEMP * ERROR at line 1: ORA-00959: tablespace 'PLMEE_DATA' does not exist GRANT CONNECT,RESOURCE TO PLMEE * ERROR at line 1: ORA-01917: user or role 'PLMEE' does not exist ALTER USER PLMEE QUOTA UNLIMITED ON PLMEE_DATA * ERROR at line 1: ORA-01918: user 'PLMEE' does not exist ALTER USER PLMEE QUOTA UNLIMITED ON PLM_DATA * ERROR at line 1: ORA-01918: user 'PLMEE' does not exist ALTER USER PLMEE QUOTA UNLIMITED ON USERS * ERROR at line 1: ORA-01918: user 'PLMEE' does not exist old 1: CREATE OR REPLACE DIRECTORY DUMP_DIR AS '&1' new 1: CREATE OR REPLACE DIRECTORY DUMP_DIR AS 'D:\dbInit\' Directory created. GRANT READ,WRITE ON DIRECTORY DUMP_DIR TO PLMEE * ERROR at line 1: ORA-01917: user or role 'PLMEE' does not exist Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options create user and make directory finished...
最新发布
08-28
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值