NBU一体机Oracle数据库还原测试详解

需积分: 22 4 下载量 18 浏览量 更新于2024-09-03 收藏 65KB DOCX 举报
"NBU一体机数据库还原测试操作记录20200724.docx" 本文档详细记录了在NBU(NetBackup)一体机上进行Oracle数据库的还原测试操作,包括实例备份还原和数据一致性比对。文档中提到了在出现问题时的解决策略,以及整个还原流程的详细步骤。 一、操作步骤 1. 首先,需要在新的服务器上安装与源数据库服务器相同版本的Oracle和操作系统。确保Oracle用户账号与源服务器保持一致,并开启数据库的归档模式。 2. 在新服务器上创建Oracle密码文件,例如`orapwdfile=path\pwdsid.orapassword=`,或者直接复制源服务器的密码文件至目标机器。 3. 创建一个与要恢复的数据库具有相同SID的新数据库,同时确保文件路径与源服务器一致。 4. 记录下原数据库的DBID,可以通过RMAN输出或询问DBA获取。 5. 从生产库中创建pfile.ora文件,然后将原pfile复制到新测试服务器,关闭数据库后创建spfile。 SQL命令示例:`create pfile='/$PATH/pfile' from spfile='/$PATH/spfile';` 6. 设置新数据库的DBID为源数据库的DBID。 7. 使用RMAN恢复控制文件,需先确定控制文件的名称,如`cntrl_26_1_1046604346`。 RMAN恢复控制文件脚本: ``` run { allocate channel ch00 type 'sbt_tape'; SEND 'NB_ORA_SERV=nbu5240,NB_ORA_CLIENT=oracle-2'; restore controlfile from 'cntrl_26_1_1046604346'; release channel ch00; } ``` 8. 继续使用RMAN恢复数据库并修复数据库。 RMAN恢复和修复数据库脚本: ``` run { allocate channel ch00 type 'sbt_tape'; SEND 'NB_ORA_SERV=nbu5240,NB_ORA_CLIENT=oracle-2'; restore database; recover database; release channel ch00; } ``` 9. 最后,通过`ALTER DATABASE OPEN RESETLOGS`命令打开数据库。 二、出现问题汇总及解决办法 1. 数据恢复过程中可能出现错误,如"Recover database"报错,通常是因为redo日志的系统改变号(SCN)不匹配。解决方法是使用RMAN的`RECOVER DATABASE UNTIL SCN 2292709;`命令,指定到特定SCN停止恢复。 2. 手动备份时可能遇到错误,如归档日志问题。解决方法可能是使用RMAN的`CHANGE ARCHIVELOG ALL DELETE INPUT;`命令删除输入的归档日志,或者检查并确保所有需要的归档日志都已备份并可访问。 这个操作记录文档对于理解如何在NBU一体机上进行Oracle数据库的备份和恢复具有很高的参考价值,同时也强调了在处理数据库恢复过程中可能遇到的问题及其解决方案。
2019-02-13 上传
Legal Notice Copyright © 2017 Veritas Technologies LLC. All rights reserved. Veritas and the Veritas Logo are trademarks or registered trademarks of Veritas Technologies LLC or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. This product may contain third party software for which Veritas is required to provide attribution to the third party (“Third Party Programs”). Some of the Third Party Programs are available under open source or free software licenses. The License Agreement accompanying the Software does not alter any rights or obligations you may have under those open source or free software licenses. Please see the Third Party Legal Notice Appendix to this Documentation or TPIP ReadMe File accompanying this product for more information on the Third Party Programs. The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Veritas Technologies LLC and its licensors, if any. THE DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. VERITAS TECHNOLOGIES LLC SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE. The Licensed Software and Documentation are deemed to be commercial computer software as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19 "Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq. "Commercial Computer Software and Commercial Computer Software Documentation," as applicable, and any successor regulations, whether delivered by Veritas as on premises or hosted services. Any use, modification, reproduction release, performance, display or disclosure of the Licensed Software and Documentation by the U.S. Government shall be solely in accordance with the terms of this Agreement.