签到成功

知道了

CNDBA社区CNDBA社区

Moving A Tempfile Online giving error ORA-01516: Nonexistent Log File, Data File, (Doc ID 2506456.1)

2022-07-10 11:44 2484 0 原创 oracle
作者: hbhe0316

APPLIES TO:
Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.
SYMPTOMS
On : 12.2.0.1 version, RDBMShttp://www.cndba.cn/hbhe0316/article/108528

Moving a temp datafile ONLINE using below command :http://www.cndba.cn/hbhe0316/article/108528

SQL> ALTER DATABASE MOVE DATAFILE 'D:/LOCATION/temp01.dbf' TO 'F:/LOCATION/temp01.dbf';



Got below error :
ALTER DATABASE MOVE DATAFILE 'D:/LOCATION/temp01.dbf' TO ''F:/LOCATION/temp01.dbf'
*
ERROR at line 1:
ORA-01516: nonexistent log file, data file, or temporary file
"D:/LOCATION/temp01.dbf" in the current container

CAUSE
“alter database move” only applicable for non TEMP datafilehttp://www.cndba.cn/hbhe0316/article/108528http://www.cndba.cn/hbhe0316/article/108528

Reproduced the issue in Labr :http://www.cndba.cn/hbhe0316/article/108528http://www.cndba.cn/hbhe0316/article/108528

http://www.cndba.cn/hbhe0316/article/108528

SQL> alter database move tempfile '/LOCATION/temp1.dbf' to '/LOCATION/oradata/temp1.dbf';

Got Similar ERROR:

 alter database move tempfile '/LOCATION/temp1.dbf' to '/LOCATION/temp1.dbf'
  *
ERROR at line 1:
ORA-00905: missing keyword

SOLUTION
Since this is for TEMPORARY tablespace, below steps can be done while database is running:http://www.cndba.cn/hbhe0316/article/108528

http://www.cndba.cn/hbhe0316/article/108528
http://www.cndba.cn/hbhe0316/article/108528

1. create new Temporary tablespace for ex: TEMP2
2. ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP2
3. drop OLD temp tablespace

版权声明:本文为博主原创文章,未经博主允许不得转载。

oracle

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:1040253次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ