博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Oracle 之 Cloning $oracle_home (克隆安装oracle软件)
阅读量:2492 次
发布时间:2019-05-11

本文共 3309 字,大约阅读时间需要 11 分钟。

 用途:Cloning an Oracle Home , 可以免去多台机器重复安装oracle软件

1、停止相关进程

[root@node1 bin]# ./crsctl stop cluster -all 
2、打包 dbhome_1 目录
[root@node1 11.2.0]# cd /u01/app/oracle/product/11.2.0/
[root@node1 11.2.0]# tar -zcvpf db_1.bak db_1/
[root@node1 11.2.0]# ls
db_1 db_1.bak
补充:
Create a ZIP file with the Oracle home (but not the Oracle base) directory.

# zip -r dbhome_1.zip /u01/app/oracle/product/11.2.0/dbhome_1

Do not include the admin, fast_recovery_area, and oradata directories that are under the Oracle base directory. These directories are created in the target installation later, when you create a new database there.

3、(如果是异机克隆) 将ZIP文件复制到目标计算机的相应目录。 

4、 解压 tar 包
# tar zxvf db_1.bak -C /app/oracle/product/11.2.0/
注意:
如果有多个节点则所有节点重复2、3、4步骤 。

5、 清除$ORACLE_HOME/network/admin下的*.ora

6、 跑 $ORACLE_HOME/perl/bin/perl clone.pl 脚本
node1-> $ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="/u01/app/oracle/" ORACLE_HOME="/app/oracle/product/11.2.0/db_1" OSDBA_GROUP=dba OSOPER_GROUP=oper -defaultHomeName
./runInstaller -clone -waitForCompletion "ORACLE_BASE=/u01/app/oracle/" "ORACLE_HOME=/app/oracle/product/11.2.0/db_1" "oracle_install_OSDBA=dba" "oracle_install_OSOPER=oper" -defaultHomeName -defaultHomeName -silent -noConfig -nowait 
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB. Actual 6999 MB Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-09-06_04-30-28AM. Please wait ...Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.

You can find the log of this install session at:

/u01/app/oraInventory/logs/cloneActions2017-09-06_04-30-28AM.log
.................................................................................................... 100% Done.

Installation in progress (Wednesday, September 6, 2017 4:31:02 AM CST)

.............................................................................. 78% Done.
Install successful
Setup in progress (Wednesday, September 6, 2017 4:33:11 AM CST)
Setup successful

End of install phases.(Wednesday, September 6, 2017 4:33:49 AM CST)

WARNING:
The following configuration scripts need to be executed as the "root" user.
/app/oracle/product/11.2.0/db_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of OraHome1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2017-09-06_04-30-28AM.log' for more details.

-- 含义:

Use the following syntax:
$ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="target_oracle_base" ORACLE_HOME="target_oracle_home"
OSDBA_GROUP=OSDBA_privileged_group OSOPER_GROUP=OSOPER_privileged_group -defaultHomeName

补充:

Oracle Universal Installer starts, and then records the cloning actions in the cloneActionstimestamp.log file. This log file is typically located in /orainventory_location/logs directory.

7、 重建监听与dbca建库

To configure the connection information for the new database, run Net Configuration Assistant:

$ cd $ORACLE_HOME/bin

$ ./netca
To create a new database for the newly cloned Oracle home, run Database Configuration Assistant:

$ cd $ORACLE_HOME/bin

$ ./dbca

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

转载于:http://blog.itpub.net/31383567/viewspace-2144547/

你可能感兴趣的文章
vue+springboot分页交互
查看>>
vue+springboot打包发布
查看>>
XSL 开发总结
查看>>
【NOI 2018】归程(Kruskal重构树)
查看>>
如何开始DDD(完)
查看>>
[svc]gns3模拟器及探讨几个bgp问题
查看>>
Error:fatal: Not a git repository (or any of the parent directories): .git
查看>>
[导入]竟然支持OpenGL ES!
查看>>
poj 3728 Catch That Cow ([kuangbin带你飞]专题一 简单搜索)
查看>>
C# 加密解密类
查看>>
TP-Link路由器下的多种接入模式
查看>>
C语言之常量与变量
查看>>
我的博客第一天
查看>>
2017.3.31 spring mvc教程(六)转发、重定向、ajax请求
查看>>
Android中用GridView实现九宫格的两种方法(转)
查看>>
必须掌握的前端模板引擎之art-template
查看>>
docker 部署nginx 使用keepalived 部署高可用
查看>>
性能测试需求分析
查看>>
MySQL 8.0索引合并
查看>>
数组各元素出现的次数
查看>>