One of the most tedious tasks a DBA has to execute is a clone of an eBiz environment. Cloning can take from a few hours to days, depending the level of automation you have and how many additional extra post steps there are after AppTier has been cloned.
Most of the companies I worked with has a large number of environment, DEV, TEST, UAT, PRE-PROD, PROD. Sometimes the list gets bigger since each individual project requires a replica of PROD. This, of course double the number of environments. You normally find at least 10+ environments during the implementation of eBiz. But, I've seen companies with 30+ environments, and that is a crazy number for an Apps DBA at the time of cloning them.
Back in 2007, I started developing a script with the intention of doing the full eBiz clone from a SOURCE to TAGET environment, including both dbTier and appTier. Most of the AD utilities allow you to pass parameter via the command line, and with a little bit of shell scripting help plus Unix skill, I managed to create a set of scripts which perform a full clone from end-to-end. Just press the button and after a few hours you TARGET will be cloned from your SOURCE.
The script works like this:
- It uses SSH public keys to connect to app and db servers. Make sure to create pub keys and add them to destination servers.
- Remotely executes commands via ssh.
- It backup SOURCE database to tape or disk. If you using disk, you need to manually copy RMAN backup pieces to TARGET server.
- It stop database and app process both in TARGET db and app tier.
- It deletes both database and app tier files from TARGET, in case the environment already exists. Make sure to double check script environment variables “clone.env” before running it.
- It uses RMAN to duplicate database from the SOURCE to TARGET.
- It copies the app tier files and Oracle Home, then runs adcfgclone for dbTechStack and appsTier.
- It uses expect to automate adclone utilities. Thanks to Ned G. for this contribution.
- In the last steps it will perform a set of post additional clone steps, like enable/disable SSO, change profile options, run adconfig, datamasking, end-date users, fix symbolic links, etc.
Limitations:
- At the moment the script does not clone a TARGET RAC or MULTINODE environment. It used to work before, but I removed some steps for RAC and MULTINODE, due to complexity of each different sites. I'm planing to work on full RAC and MULTINODE feature sometime this year.
- It assumes you know what you are doing and that Apps DBA has tested the script in a non-PROD environment. I will not assume any responsibility if the script breaks anything. Please READ the instructions and understand what the scripts does before running it.
- It assumes ssh keys and sudo commands are properly setup and that some directory path already exists. Checkout manual in the README.txt
Copyright:
GNU GENERAL PUBLIC LICENSE
clone_ebiz is a script that can be used to automate your eBiz clone end-to-end without human intervention.
Copyright (C) 2007 Christian Daniel Ricci – email: ricci.christian@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Download:
I am asking for a minimum donation via PayPal logo located on the right hand side of my blog (this can come as part of your department's training budget). Alternatively, you can engage my services directly, please contact me on my email.
To download the script click this link clone_ebiz.tgz.gpg (password will be emailed to you when you Donate).
I am asking for a minimum donation via PayPal logo located on the right hand side of my blog (this can come as part of your department's training budget). Alternatively, you can engage my services directly, please contact me on my email.
To download the script click this link clone_ebiz.tgz.gpg (password will be emailed to you when you Donate).
Powered by
http://www.gnupg.org/download
|
- Thanks to Neil for his inputs and changes.
- Many thanks to Ned G. for his contribution with expect.
Enjoy!!! Any questions or help required, please post a comment.
Hi Daniel,
ReplyDeleteNice effort...Gr8 .please send the script&password to my mail id.
Mail: sriram.appsdba@gmail.com
Hi Daniel,
ReplyDeleteI really liked script as per above description. I downloaded script. Wanted to password to see , how it works . Please can you fwd password to below email : singirish@gmail.com
thanks.. goo stuff Please can you fwd password to below email : padipally@gmail.com
ReplyDeleteHI. I really liked the concept as we have almost 42 environments that we have to clone frequently. I hope the script will help me to do that. Please send me the password tp acs.akkineni@gmail.com
ReplyDeleteHi Daniel,
ReplyDeleteI really like script.
Please send me password for script rohitcooldba@gmail.com
Thanks in advance.
Hi Daniel,
ReplyDeleteThis is really interesting saves lot of time and manual effort...I would like to check this out and implement. Please send me password for this script to gvmrmail@gmail.com
Thank you
Daniel,
ReplyDeleteThis looks really interesting to me and you seem to have done some creative work the clone automation.
I would like to review your work as a possible help to our clone automation process.
Can you send me the password to knewell1770@gmail.com
This is the script I am looking for. Great.... Please send me the password to ruappsdba@gmail.com
ReplyDeleteHello,
ReplyDeletePlease send the password to tmorgan@darlingii.com
Thanks,
Tom Morgan
Excellent web site regarding Oracle technologies. Please send the password to anettem9@gmail.com
ReplyDeletecan you send me the password shankar.garlapati@gmail.com
ReplyDeleteHi Would like to test the script. Could you please mail the password to the mail ksaini2013@gmail.com.
ReplyDeleteHi Deniel,
ReplyDeleteI really like your script.would you mind sending the password to rajesh192030@gmail.com
can you send me the password ajith.panickar@gmail.com
ReplyDeletecan you send me the password pavankumar077@gmail.com
ReplyDeletecan you send me the password pavankumar077@gmail.com
ReplyDeletePlease share the password to ramsathiyan@gmail.com
ReplyDeleteplease share password to chowdary189@gmail.com
ReplyDeletechowdary
Hi Daniel,
ReplyDeleteGreat Job Sir. Please kindly send me the password to misterlimbe@yahoo.com.
Regards.
Excellent job . Please send the password to furkanfd@gmail.com
ReplyDelete