ORA-25153: Temporary Tablespace is Empty解决方法

简介:

 SQL> @/tmp/4.txt

create table huang_1 (deptno number,dname varchar2(19),loc varchar2(20))

*

ERROR at line 1:

ORA-25153: Temporary Tablespace is Empty

提示temporary表空间为空。

下面我们查看当前是那个用户

SQL> show user

USER is "SYS"

下面我们查看这个用户的默认的temporary表空间是那个。

SQL> select username,temporary_tablespace from dba_users where username='SYS';

 

USERNAME                       TEMPORARY_TABLESPACE

------------------------------ ------------------------------

SYS                            TEMP

 

下面我们查看这个表空间在状态。

SQL> select tablespace_name,status from dba_tablespaces where tablespace_name='TEMP';

 

TABLESPACE STATUS

---------- ---------

TEMP       ONLINE

这里是online,如果是offline,我们就要alter tablespace temp onlineonline我们就不管它。

 

下面我们查看表空间和数据文件的对应关系。

SQL> select file_name,tablespace_name from dba_temp_files;

 

FILE_NAME                                          TABLESPACE

-------------------------------------------------- ----------

/opt/oracle/oradata/orcl/temphuang.dbf             TEMPHUANG

在这里我们没有看到temp这个表空间,说明temp这个表空间的数据文件在逻辑上面是不存在的,下面我们查看物理上面是否存在,

SQL> !ls /opt/oracle/oradata/orcl/temp01.dbf

/opt/oracle/oradata/orcl/temp01.dbf

上面说明物理上面是存在的,只是逻辑上面不存在,下面我们填加就可以了。

SQL> alter tablespace temp add tempfile '/opt/oracle/oradata/orcl/temp01.dbf';

 

Tablespace altered.

下面再次查看是否存在

SQL> select tablespace_name,file_name from dba_temp_files;

 

TABLESPACE FILE_NAME

---------- --------------------------------------------------

TEMPHUANG  /opt/oracle/oradata/orcl/temphuang.dbf

TEMP       /opt/oracle/oradata/orcl/temp01.dbf

已经存在了,下面是执行我们原来执行的命令。

SQL> @/tmp/4.txt

Table created.

已经成功了。

 

 

  本文转自7343696 51CTO博客,原文链接:http://blog.51cto.com/luoping/277031,如需转载请自行联系原作者




相关文章
|
4月前
|
存储 索引
mysqldump got error 1812 tablespace is missing for table when using lock tables
mysqldump got error 1812 tablespace is missing for table when using lock tables
162 1
|
存储 Oracle 关系型数据库
【数据库】解决 oracle: ORA-01653: unable to extend table *.LINEORDER by 1024 in tablespace SYSTEM
【数据库】解决 oracle: ORA-01653: unable to extend table *.LINEORDER by 1024 in tablespace SYSTEM
510 0
【数据库】解决 oracle: ORA-01653: unable to extend table *.LINEORDER by 1024 in tablespace SYSTEM
|
SQL 关系型数据库
ORA-1652: unable to extend temp segment by 128 in tablespace xxx Troubleshootin
当收到告警信息ORA-01652: unable to extend temp segment by 128 in tablespace xxxx 时,如何Troubleshooting ORA-1652这样的问题呢? 当然一般xxx是临时表空间,也有可能是用户表空间。
2090 0
|
SQL 数据库 关系型数据库
|
Oracle 关系型数据库