如果不再需要使用rman来管理目标数据库,或者目标数据库已经崩溃,可以从rman恢复目录注销掉目标数据库。这样只会从恢复目录中移除目标数据库备份相关的元数据,物理备份不会被删除。 连接目标数据库 最简单的就是连上目标数据库和恢复目录,然后执行unregiste
如果不再需要使用rman来管理目标数据库,或者目标数据库已经崩溃,可以从rman恢复目录注销掉目标数据库。这样只会从恢复目录中移除目标数据库备份相关的元数据,物理备份不会被删除。
连接目标数据库
最简单的就是连上目标数据库和恢复目录,然后执行unregister database
$ rman target user/passwd@tgt catalog user/passwd@catlog; RMAN> unregister database; database name is "orcl" and DBID is 1276927241 Do you really want to unregister the database (enter YES or NO)?
不连接目标数据库
如果目标数据库已经崩溃,无法再连接时,可以通过指定目标数据库的DBID或者直接使用名字来注销数据库。
如果不知道目标数据库的DBID或名字,先通过rman数据库的rc_database视图(rc指recovery catalog)来查询相关信息。谨记rman恢复目录可以同时为多个目标数据库提供服务。
$ sqlplus user/passwd@catlog;
SQL> select * from rc_database;
DB_KEY DBINC_KEY DBID NAME RESETLOGS_CHANGE# RESETLOGS_TIME
---------- ---------- ---------- -------- ----------------- ------------------
10161 41305 1276927241 ORCL 1981608693 28-JUL-12
使用DBID
MMM金融互助系统源码是以thinkphp为核心进行开发的3m金融互助平台。程序安装说明:1.恢复数据:将“数据备份”文件夹中的 urkeji.sql 文件请采用phpMyAdmin进行导入; 2.配置Sql数据库信息,文件路径:根目录下 config.php3.后台管理地址:http://域名/admin.php 用户名:100000 密码:admin1
0
$ rman catalog user/passwd@catlog; RMAN> set dbid=1276927241; executing command: SET DBID database name is "ORCL" and DBID is 1276927241 RMAN> unregister database; database name is "ORCL" and DBID is 1276927241 Do you really want to unregister the database (enter YES or NO)?
直接使用目标数据库名字
$ rman catalog user/passwd@catlog; RMAN> unregister database orcl; database name is "ORCL" and DBID is 1276927241 Do you really want to unregister the database (enter YES or NO)? YES database unregistered from the recovery catalog
移除恢复目录
如果rman恢复目录不再使用,可以drop掉:
$ rman catalog user/passwd@catlog; RMAN> drop catalog;
References:
[1]Remove a Database from a RMAN Recovery Catalog
===
每个人都受两种教育,一种来自别人,另一种更重要的是来自自己。 —— 爱德华·吉本
原文地址:rman恢复目录中注销(unregister)目标数据库, 感谢原作者分享。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号