Mục đích: Nhân bản ORACLE_HOME Database Server sang Database Server khác để đỡ mất công cài lại Oracle Software.
1. Kiểm tra oracle_home inventory [ SOURCE DB]
$ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 12.1.0.1.10 Copyright (c) 2017, Oracle Corporation. All rights reserved. Oracle Home : /oracle/app/oracle/product/12.1.0.2_CRMTST/dbhome_1 Central Inventory : /oracle/app/oraInventory from : /oracle/app/oracle/product/12.1.0.2_CRMTST/dbhome_1/oraInst.loc OPatch version : 12.1.0.1.10 OUI version : 12.1.0.2.0 Log file location : /oracle/app/oracle/product/12.1.0.2_CRMTST/dbhome_1/cfgtoollogs/opatch/opatch2017-02-08_13-03-50PM_1.log Lsinventory Output file location : /oracle/app/oracle/product/12.1.0.2_CRMTST/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2017-02-08_13-03-50PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: dbatest ARU platform id: 23 ARU platform description:: Solaris Operating System (SPARC 64-bit) Installed Top-level Products (1): Oracle Database 12c 12.1.0.2.0 There are 1 products installed in this Oracle Home. Interim patches (2) : Patch 22139226 : applied on Sun Feb 28 16:22:03 AST 2016 Unique Patch ID: 19731538 Patch description: "Database PSU 12.1.0.2.160119, Oracle JavaVM Component (Jan2016)" Created on 8 Jan 2016, 04:08:32 hrs PST8PDT Bugs fixed: 19699946, 19176885, 19623450, 22139226, 19909862, 21811517, 19223010 21068507, 19895326, 19877336, 22118835, 22118851, 21566993, 19153980 20408829, 21047766, 19231857, 19895362, 19855285, 20415564, 21555660 19245191, 21047803, 20408866, 21566944 Patch 21948354 : applied on Sun Feb 28 16:19:33 AST 2016 Unique Patch ID: 19591711 Patch description: "Database Patch Set Update : 12.1.0.2.160119 (21948354)" Created on 23 Dec 2015, 01:11:03 hrs PST8PDT Sub-patch 21359755; "Database Patch Set Update : 12.1.0.2.5 (21359755)" Sub-patch 20831110; "Database Patch Set Update : 12.1.0.2.4 (20831110)" Sub-patch 20299023; "Database Patch Set Update : 12.1.0.2.3 (20299023)" Sub-patch 19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)" Bugs fixed: 19189525, 19075256, 19141838, 19865345, 19791273, 19280225, 18845653 20951038, 19243521, 19248799, 21756699, 18988834, 19238590, 21281532 20245930, 18921743, 18799063, 19134173, 19571367, 20476175, 20925795 19018206, 20509482, 20387265, 20588502, 19149990, 18849537, 18886413 17551063, 19183343, 19703301, 19001390, 18202441, 19189317, 19644859 19358317, 19390567, 19279273, 19706965, 19068970, 19619732, 20348653 18607546, 18940497, 19670108, 19649152, 18948177, 19315691, 19676905 18964978, 19035573, 20165574, 19176326, 20413820, 20558005, 19176223 19532017, 20134339, 19074147, 18411216, 20361671, 20425790, 18966843 20294666, 19307662, 19371175, 19195895, 19154375, 19468991, 19174521 19520602, 19382851, 21875360, 19326908, 19658708, 20093776, 20618595 21787056, 17835294, 19791377, 19068610, 20048359, 20746251, 19143550 19185876, 19627012, 20281121, 19577410, 22092979, 19001359, 19518079 18610915, 19490948, 18674024, 18306996, 19309466, 19081128, 19915271 20122715, 21188532, 20284155, 18791688, 20890311, 21442094, 18973548 19303936, 19597439, 20235511, 18964939, 19430401, 19044962, 19409212 19879746, 20657441, 19684504, 19024808, 18799993, 20877664, 19028800 19065556, 19723336, 19077215, 19604659, 21421886, 19524384, 19048007 18288842, 19689979, 20446883, 18952989, 16870214, 19928926, 21526048 19180770, 19197175, 19902195, 20318889, 19730508, 19012119, 19067244 20074391, 19512341, 19841800, 14643995, 20331945, 19587324, 19547370 19065677, 19637186, 21225209, 20397490, 18967382, 19174430, 18674047 19054077, 19536415, 19708632, 19289642, 20869721, 19335438, 17365043 18856999, 19869255, 20471920, 19468347, 21620471, 16359751, 18990693 17890099, 19439759, 19769480, 19272708, 19978542, 20101006, 21300341 20402832, 19329654, 19873610, 21668627, 21517440, 19304354, 19052488 20794034, 19291380, 18681056, 19896336, 19076343, 19561643, 18618122 20440930, 18456643, 19699191, 18909599, 19487147, 18250893, 19016730 18743542, 20347562, 16619249, 18354830, 19687159, 19174942, 20424899 19989009, 20688221, 20441797, 19157754, 19032777, 19058490, 19399918 18885870, 19434529, 19018447, 18417036, 20919320, 19022470, 19284031 20474192, 20173897, 22062026, 19385656, 19501299, 17274537, 20899461 19440586, 16887946, 19606174, 18436647, 17655240, 19023822, 19178851 19124589, 19805359, 19597583, 19155797, 19393542, 19050649
2. Kiểm tra cỡ ORACLE_HOME ở SOURCE DB
cd $ORACLE_HOME du -h . | tail -1 14G .
3. Tapk thư mục ORACLE_HOME trên TARGET HOST
mkdir -p /oracle/app/oracle/product/12.1.0.2_clone/dbhome_1
4. Backp ORACLE_HOME ở SOURCE HOST
cd $ORACLE_HOME tar -cvf /export/home/oracle/HOME_BKUP/home12_bkp.tar .
5. Scp file tar sang target host
cd /oracle/app/oracle/product/12.1.0.2_clone/dbhome_1 scp oracle@192.168.2.3:/export/home/oracle/HOME_BKUP/home12_bkp.tar .
6 . Untar file tar
cd /oracle/app/oracle/product/12.1.0.2_clone/dbhome_1 tar -xvf home12_bkp.tar
7 . Chạy clone script trên TARGET HOST
cd $ORACLE_HOME/oui/bin ./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/oracle/app/oracle/product/12.1.0.2_clone/dbhome_1" ORACLE_HOME_NAME="dbhome_12gR2" ORACLE_BASE="/oracle/app/oracle" OSDBA_GROUP=dba OSOPER_GROUP=dba
output:
# ./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/oracle/app/oracle/product/12.1.0.2_clone/dbhome_1" ORACLE_HOME_NAME="dbhome_12gR2" ORACLE_BASE="/oracle/app/oracle" OSDBA_GROUP=dba OSOPER_GROUP=dba Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 256819 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-02-08_02-08-27PM. Please wait ...[STDBY@test/oracle/app/oracle/product/12.1.0.2_clone/dbhome_1/oui/bin# Oracle Universal Installer, Version 12.1.0.2.0 Production Copyright (C) 1999, 2014, Oracle. All rights reserved. You can find the log of this install session at: /oracle/app/oraInventory/logs/cloneActions2017-02-08_02-08-27PM.log .................................................................................................... 100% Done. Installation in progress (Wednesday, February 8, 2017 2:08:38 PM AST) ............................................................................... 79% Done. Install successful Linking in progress (Wednesday, February 8, 2017 2:08:45 PM AST) . 80% Done. Link successful Setup in progress (Wednesday, February 8, 2017 2:09:28 PM AST) .......... 100% Done. Setup successful Saving inventory (Wednesday, February 8, 2017 2:09:29 PM AST) Saving inventory complete Configuration complete End of install phases.(Wednesday, February 8, 2017 2:09:56 PM AST) WARNING: The following configuration scripts need to be executed as the "root" user. /oracle/app/oracle/product/12.1.0.2_clone/dbhome_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 dbhome_12gR2 was successful. Please check '/oracle/app/oraInventory/logs/cloneActions2017-02-08_02-08-27PM.log' for more details.
7. Chạy script root.sh bằng user root trên TARGET HOST
root# /oracle/app/oracle/product/12.1.0.2_clone/dbhome_1/root.sh Check /oracle/app/oracle/product/12.1.0.2_clone/dbhome_1/install/root_sec61-1_2017-02-08_14-10-25.log for the output of root script
8.Tạo ADR REPO:
$ORACLE_HOME/bin/diagsetup basedir=/oracle/app/oracle oraclehome=/oracle/app/oracle/product/12.1.0.2_clone/dbhome_1
Về phần dữ liệu thì export và import dùng datapump, chi tiết Các lệnh hay sử dụng khi chuyển dữ liệu sử dụng DataPump (expdp, impdp) từ A-Z trong Oracle Database
Hy vọng hữu ích cho bạn.
=============================* KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE trực tiếp từ tôi giúp bạn bước đầu trở thành những chuyên gia DBA, đủ kinh nghiệm đi thi chứng chỉ OA/OCP, đặc biệt là rất nhiều kinh nghiệm, bí kíp thực chiến trên các hệ thống Core tại VN chỉ sau 1 khoá học.
* CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
* Chi tiết tham khảo:
https://bit.ly/oaz_w
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile: 0902912888
⚡️ Skype: tranbinh48ca
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: http://bit.ly/ytb_binhoraclemaster
👨 Tiktok: https://www.tiktok.com/@binhoraclemaster?lang=vi
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhoracle
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội
=============================
học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,khóa học pl/sql, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle multitenant, Container Databases (CDB), Pluggable Databases (PDB), oracle cloud, oracle security, oracle fga, audit_trail, oracle dataguard, oracle goldengate, mview, oracle exadata, oracle oca, oracle ocp, oracle ocm , oracle weblogic, middleware, hoc solaris, hoc linux, hoc aix, unix, securecrt, xshell, mobaxterm, putty