ITPub博客

首页 > 数据库 > Oracle > [20230818]ORA-01149 cannot shutdown - file 7 has online backup set.txt

[20230818]ORA-01149 cannot shutdown - file 7 has online backup set.txt

原创 Oracle 作者:lfree 时间:2023-08-23 21:01:26 0 删除 编辑

[20230818]ORA-01149 cannot shutdown - file 7 has online backup set.txt

--//准备关闭数据库,出现如下提示:
SYS@test> shutdown immediate
ORA-01149: cannot shutdown - file 7 has online backup set
ORA-01110: data file 7: 'D:\APP\ORACLE\ORADATA\TEST\USERS01.DBF'
--//怎么会打开热备份模式。如何关闭,查询呢?

SYS@test> @ver1
PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

SYS@test> select * from v$backup ;
     FILE# STATUS                  CHANGE# TIME                    CON_ID
---------- -------------------- ---------- ------------------- ----------
         1 NOT ACTIVE             12000787 2020-08-09 17:04:30          1
         2 NOT ACTIVE                    0                              2
         3 NOT ACTIVE             12000787 2020-08-09 17:04:30          1
         4 NOT ACTIVE                    0                              2
         5 NOT ACTIVE             12000787 2020-08-09 17:04:30          1
         6 NOT ACTIVE                    0                              2
         7 ACTIVE                 15712385 2023-08-18 20:45:47          1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         8 NOT ACTIVE             12000787 2020-08-09 17:04:30          3
         9 NOT ACTIVE             12000787 2020-08-09 17:04:30          3
        10 NOT ACTIVE             12000787 2020-08-09 17:04:30          3
        11 NOT ACTIVE             12000787 2020-08-09 17:04:30          3
        36 NOT ACTIVE             12000787 2020-08-09 17:04:30          3
12 rows selected.

--//估计是copy and paste惹得的祸。

SYS@test> alter tablespace USERS end backup;
Tablespace altered.

SYS@test> select * from v$backup where file#=7;
     FILE# STATUS                  CHANGE# TIME                    CON_ID
---------- -------------------- ---------- ------------------- ----------
         7 NOT ACTIVE             15712385 2023-08-18 20:45:47          1

SYS@test> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

--//OK!现在正常关闭数据库。

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

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7970878