connected to target database: GENDB (not mounted)

今天通过rman 连接oracle 发现一台节点,提示没有挂载,很是突兀,完成没搞过这破玩意,在网上查了很多资料,让从别一节点上备份,然后在这一台上进行恢复;但是我查了一下备份的内容,这台连不上的上面都有,而且文件也是一致的,所以我直接做了挂载动作

第一步:从DB2 上获取到DBID

[oracle@DB2 ~]$ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 5 18:28:39 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target /

connected to target database: GENDB (DBID=27951032)

第二步:把DB2上的DBID 设置到DB1上,并进行数据库挂载,并退出

[oracle@DB1 ~]$ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 5 18:27:55 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target /                     

connected to target database: GENDB (not mounted)

RMAN> set DBID=27951032  //  在好的一台上取DBID

executing command: SET DBID

RMAN> alter database mount;

using target database control file instead of recovery catalog
database mounted

RMAN> exit     

第三步:退出后,重新连接,会提示数据库有打开  not open, 重新打开数据库

[oracle@DB1 ~]$ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 5 18:31:05 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target /      

connected to target database: GENDB (DBID=27951032, not open)

RMAN> alter database open;

using target database control file instead of recovery catalog
database opened

RMAN> exit

第四步:测试挂载完成, 查询备份设置,一切正常。。。

[oracle@DB1 ~]$ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 5 18:37:39 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target /

connected to target database: GENDB (DBID=27951032)   完成挂载

RMAN> list backupset;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6088    Incr 1  1.50G      DISK        00:09:41     04-JUL-23      
        BP Key: 6088   Status: AVAILABLE  Compressed: NO  Tag: TAG20230704T220004
        Piece Name: /home/oracle/ora_backupset/backupset/20230704/5f20eqn7
  List of Datafiles in backup set 6088
  File LV Type Ckp SCN    Ckp Time  Name

猜你喜欢

转载自blog.csdn.net/lylovejava0/article/details/131562390