Purge old files on Linux/Unix using “find” command
I've noticed that one of our interface directories has a lot of old files, some of them were more than a year old. I checked it with our implementers and it turns out that we can delete all files that are older than 60 days. I decided to write a (tiny) shell script to purge all files older than 60 days and schedule it with crontab, this way I won't deal with it manually. I wrote a find command to identify and delete those files. I started with the following command: find /interfaces/inbound -mtime +60 -type f -maxdepth 1 -exec rm {} \; It finds and deletes all files in directory /interface/inbound that are older than 60 days. "-maxdepth 1" -> find files in current directory only. Don't look for files in sub directories. After packing it in a shell script I got a request to delete "csv" files only. No problem... I added the "-name" to the find command: find /interfaces/inbound -name "*.csv" -mtime +60 -type f -maxdepth 1 -exec rm {} \; All csv files in /interface/inbound that are older than 60 days will be deleted. But then, the request had changed, and I was asked to delete "*.xls" files further to "*.csv" files. At this point things went complicated for me since I'm not a shell script expert... I tried several things, like add another "-name" to the find command: find /interfaces/inbound -name "*.csv" -name "*.xls" -mtime +60 -type f -maxdepth 1 -exec rm {} \; But no file was deleted. Couple of moments later I understood that I'm trying to find csv files which is also xls files... (logically incorrect of course). After struggling a liitle with the find command, I managed to make it works: find /interfaces/inbound \( -name "*.csv" -o -name "*.xls" \) -mtime +60 -type f -maxdepth 1 -exec rm {} \;
Posted by Mohammed Sajid Siddique at 8:50 AM 0 comments
Subscribe to: Posts (Atom)
Oracle E-Business Suite 11i Certified Professional & Expert
Oracle E-Business Suite 11i Certified Professional Supply Chain ConsultantOracle E-Business Suite 11i Certified Professional Financial ConsultantOracle E-Business Suite 11i Applications Database Administrator Certified ProfessionalOracle E-Business Suite 11i Application System Administrator Certified ExpertOracle E-Business Suite 11i Workflow Certified Expert
Oracle 9i, 10g DBA Certified Professional
Oracle 11i Apps DBA Certified Professional
Oracle 10g RAC Certified Expert
Check My LinkedIn Profile
Followers
if (!window.google !google.friendconnect) {
document.write('' +
'');
}
if (!window.registeredBloggerCallbacks) {
window.registeredBloggerCallbacks = true;
var registeredGadgets = [];
gadgets.rpc.register('registerGadgetForRpcs', function(gadgetDomain, iframeName) {
// Trim the gadget domain from a random url (w/ query params)
// down to just a top level domain.
var startIndex = 0;
var protocolMarker = "://";
// Find the start of the host name
if (gadgetDomain.indexOf(protocolMarker) != -1) {
startIndex = gadgetDomain.indexOf(protocolMarker) + protocolMarker.length;
}
// Now find the start of the path
var pathIndex = gadgetDomain.indexOf("/", startIndex);
// Now extract just the hostname
if (pathIndex != -1) {
gadgetDomain = gadgetDomain.substring(0, pathIndex);
}
gadgets.rpc.setRelayUrl(iframeName, gadgetDomain + "/ps/rpc_relay.html");
// Just return some random stuff so the gadget can tell when
// we're done.
return "callback";
});
gadgets.rpc.register('getBlogUrls', function() {
var holder = {};
holder.postFeed = "http://www.blogger.com/feeds/8358218337220897152/posts/default";
holder.commentFeed = "http://www.blogger.com/feeds/8358218337220897152/comments/default";
return holder;
});
gadgets.rpc.register('requestReload', function() {
document.location.reload();
});
gadgets.rpc.register('requestSignOut', function(siteId) {
google.friendconnect.container.openSocialSiteId = siteId;
google.friendconnect.requestSignOut();
});
}
var skin = {};
skin['FACE_SIZE'] = '32';
skin['HEIGHT'] = "260";
skin['TITLE'] = "Followers";
skin['BORDER_COLOR'] = "transparent";
skin['ENDCAP_BG_COLOR'] = "transparent";
skin['ENDCAP_TEXT_COLOR'] = "#335566";
skin['ENDCAP_LINK_COLOR'] = "#336699";
skin['ALTERNATE_BG_COLOR'] = "transparent";
skin['CONTENT_BG_COLOR'] = "transparent";
skin['CONTENT_LINK_COLOR'] = "#336699";
skin['CONTENT_TEXT_COLOR'] = "#335566";
skin['CONTENT_SECONDARY_LINK_COLOR'] = "#336699";
skin['CONTENT_SECONDARY_TEXT_COLOR'] = "#000000";
skin['CONTENT_HEADLINE_COLOR'] = "#000000";
skin['FONT_FACE'] = "normal normal 100% Helvetica, Arial, sans-serif";
google.friendconnect.container.setParentUrl("/");
google.friendconnect.container["renderMembersGadget"](
{id: "div-12lb4ztjxsrx2",
height: 260,
site: "18212234755094357901",
useLightBoxForCanvas: false,
locale: 'en' },
skin);
Thursday, October 8, 2009
Purge old files on Linux/Unix using “find” command
Forgot your Password?
Forgot your Password?
Almost every website that uses username & password have a "forget password" functionality to retrieve users passwords, and so also the Oracle E-Business Suite.This is a very useful functionality since it reduces the number of SR's opened to the helpdesk team regarding login problems and moreover satisfying the customers which can get a new password in a very short time with no helpdesk intervention.The implementation of this functionality is very simple and easy. To enable it you should:set the profile "Local Login Mask" to the current value plus 8 (e.g. current value is 32 -> set value to 40) Bounce Apache The "Local Login Mask" profile used to customize some attributes of the login page (AppsLocalLogin.jsp), one of them is the "forgot your password" link. You should set the value of this profile to the sum of all attribute's mask values you are interested in.The full attributes list is:AttributeMask Value Binary value Hint for Username 01 00000001 Hint for Password 02 00000010 Cancel button 04 00000100 Forgot Password link 08 00001000 Registration link 16 00010000 Language Images 32 00100000 Corporate Policy Message 64 01000000 Setting the Forgot Password link mask value will add the following TIP to the login page:The reset password process:- Click on "Forgot your password?" link will ask for a username to which reset the password.- After typing the username and click OK, a new workflow process is started (Item type UMXUPWD) and you'll get this confirmation message:- Shortly you'll get this email - "Password reset required approval" (expired after 4 hours).- Click on "Approve" to confirm you are interested in a new password.- Shortly you'll get an email with a temporary password which you have to change on first login.Very nice and easy to implement functionality, which could be very beneficial.
Posted by Mohammed Sajid Siddique at 9:18 AM 0 comments
Apps User Connection Details
This is going to be my first post... so I decided to bring a very useful SQL for apps DBA's.This SQL shows details about users connected to the system (sid, responsibilty, form name, Oracle pid, Application pid and more..)The parameters are Apps Username or Oracle Session Id (put % where you don't pass a parameter).Very useful when you have a heavy session or when you have a DB lock and you want to know who is standing from behind (the applicative user)...It contains 3 SQL's with unions:1) 1st sql - OA Framework screens (login screen, iSupport etc...)2) 2nd sql - Responsibility connection details (for Java Applet)3) 3rd sql - Forms connection detailsselect usr.user_name "Apps Username",i.first_connect "First Connect Date",ses.sid,ses.serial#,ses.module,v.spid "Oracle Server Process",ses.process "Application Server Process",rsp.responsibility_name "Responsibility Name",null "Responsibility Start Time",fuc.function_name "Function Name",i.function_type "Function Type",i.last_connect "Function Start Time"from icx_sessions i,fnd_logins l,fnd_appl_sessions a,fnd_user usr,fnd_responsibility_tl rsp,fnd_form_functions fuc,gv$process v,gv$session seswhere i.disabled_flag = 'N'and i.login_id = l.login_idand l.end_time is nulland i.user_id = usr.user_idand l.login_id = a.login_idand a.audsid = ses.audsidand l.pid = v.pidand l.serial# = v.serial#and i.responsibility_application_id = rsp.application_id(+)and i.responsibility_id = rsp.responsibility_id(+)and i.function_id = fuc.function_id(+)and i.responsibility_id not in (select t1.responsibility_idfrom fnd_login_responsibilities t1where t1.login_id = l.login_id)and rsp.language(+) = 'US'and usr.user_name like '&APPS_USER_NAME'and ses.sid like '&SID'unionselect usr.user_name,l.start_time,ses.sid,ses.serial#,ses.module,v.spid,ses.process,rsp.responsibility_name,r.start_time,null,null,null form_start_timefrom fnd_logins l,fnd_login_responsibilities r,fnd_user usr,fnd_responsibility_tl rsp,gv$process v,gv$session seswhere l.end_time is nulland l.user_id = usr.user_idand l.pid = v.pidand l.serial# = v.serial#and v.addr = ses.paddrand l.login_id = r.login_id(+)and r.end_time is nulland r.responsibility_id = rsp.responsibility_id(+)and r.resp_appl_id = rsp.application_id(+)and rsp.language(+) = 'US'and r.audsid = ses.audsidand usr.user_name like '&APPS_USER_NAME'and ses.sid like '&SID'unionselect usr.user_name,l.start_time,ses.sid,ses.serial#,ses.module,v.spid,ses.process,null,null,frm.user_form_name,ff.type,f.start_timefrom fnd_logins l,fnd_login_resp_forms f,fnd_user usr,fnd_form_tl frm,fnd_form_functions ff,gv$process v,gv$session seswhere l.end_time is nulland l.user_id = usr.user_idand l.pid = v.pidand l.serial# = v.serial#and v.addr = ses.paddrand l.login_id = f.login_id(+)and f.end_time is nulland f.form_id = frm.form_id(+)and f.form_appl_id = frm.application_id(+)and frm.language(+) = 'US'and f.audsid = ses.audsidand ff.form_id = frm.form_idand usr.user_name like '&APPS_USER_NAME'and ses.sid like '&SID';
Almost every website that uses username & password have a "forget password" functionality to retrieve users passwords, and so also the Oracle E-Business Suite.This is a very useful functionality since it reduces the number of SR's opened to the helpdesk team regarding login problems and moreover satisfying the customers which can get a new password in a very short time with no helpdesk intervention.The implementation of this functionality is very simple and easy. To enable it you should:set the profile "Local Login Mask" to the current value plus 8 (e.g. current value is 32 -> set value to 40) Bounce Apache The "Local Login Mask" profile used to customize some attributes of the login page (AppsLocalLogin.jsp), one of them is the "forgot your password" link. You should set the value of this profile to the sum of all attribute's mask values you are interested in.The full attributes list is:AttributeMask Value Binary value Hint for Username 01 00000001 Hint for Password 02 00000010 Cancel button 04 00000100 Forgot Password link 08 00001000 Registration link 16 00010000 Language Images 32 00100000 Corporate Policy Message 64 01000000 Setting the Forgot Password link mask value will add the following TIP to the login page:The reset password process:- Click on "Forgot your password?" link will ask for a username to which reset the password.- After typing the username and click OK, a new workflow process is started (Item type UMXUPWD) and you'll get this confirmation message:- Shortly you'll get this email - "Password reset required approval" (expired after 4 hours).- Click on "Approve" to confirm you are interested in a new password.- Shortly you'll get an email with a temporary password which you have to change on first login.Very nice and easy to implement functionality, which could be very beneficial.
Posted by Mohammed Sajid Siddique at 9:18 AM 0 comments
Apps User Connection Details
This is going to be my first post... so I decided to bring a very useful SQL for apps DBA's.This SQL shows details about users connected to the system (sid, responsibilty, form name, Oracle pid, Application pid and more..)The parameters are Apps Username or Oracle Session Id (put % where you don't pass a parameter).Very useful when you have a heavy session or when you have a DB lock and you want to know who is standing from behind (the applicative user)...It contains 3 SQL's with unions:1) 1st sql - OA Framework screens (login screen, iSupport etc...)2) 2nd sql - Responsibility connection details (for Java Applet)3) 3rd sql - Forms connection detailsselect usr.user_name "Apps Username",i.first_connect "First Connect Date",ses.sid,ses.serial#,ses.module,v.spid "Oracle Server Process",ses.process "Application Server Process",rsp.responsibility_name "Responsibility Name",null "Responsibility Start Time",fuc.function_name "Function Name",i.function_type "Function Type",i.last_connect "Function Start Time"from icx_sessions i,fnd_logins l,fnd_appl_sessions a,fnd_user usr,fnd_responsibility_tl rsp,fnd_form_functions fuc,gv$process v,gv$session seswhere i.disabled_flag = 'N'and i.login_id = l.login_idand l.end_time is nulland i.user_id = usr.user_idand l.login_id = a.login_idand a.audsid = ses.audsidand l.pid = v.pidand l.serial# = v.serial#and i.responsibility_application_id = rsp.application_id(+)and i.responsibility_id = rsp.responsibility_id(+)and i.function_id = fuc.function_id(+)and i.responsibility_id not in (select t1.responsibility_idfrom fnd_login_responsibilities t1where t1.login_id = l.login_id)and rsp.language(+) = 'US'and usr.user_name like '&APPS_USER_NAME'and ses.sid like '&SID'unionselect usr.user_name,l.start_time,ses.sid,ses.serial#,ses.module,v.spid,ses.process,rsp.responsibility_name,r.start_time,null,null,null form_start_timefrom fnd_logins l,fnd_login_responsibilities r,fnd_user usr,fnd_responsibility_tl rsp,gv$process v,gv$session seswhere l.end_time is nulland l.user_id = usr.user_idand l.pid = v.pidand l.serial# = v.serial#and v.addr = ses.paddrand l.login_id = r.login_id(+)and r.end_time is nulland r.responsibility_id = rsp.responsibility_id(+)and r.resp_appl_id = rsp.application_id(+)and rsp.language(+) = 'US'and r.audsid = ses.audsidand usr.user_name like '&APPS_USER_NAME'and ses.sid like '&SID'unionselect usr.user_name,l.start_time,ses.sid,ses.serial#,ses.module,v.spid,ses.process,null,null,frm.user_form_name,ff.type,f.start_timefrom fnd_logins l,fnd_login_resp_forms f,fnd_user usr,fnd_form_tl frm,fnd_form_functions ff,gv$process v,gv$session seswhere l.end_time is nulland l.user_id = usr.user_idand l.pid = v.pidand l.serial# = v.serial#and v.addr = ses.paddrand l.login_id = f.login_id(+)and f.end_time is nulland f.form_id = frm.form_id(+)and f.form_appl_id = frm.application_id(+)and frm.language(+) = 'US'and f.audsid = ses.audsidand ff.form_id = frm.form_idand usr.user_name like '&APPS_USER_NAME'and ses.sid like '&SID';
How to get details about patch applied in Oracle Applications by OAM & SQL?
How to get details about patch applied in Oracle Applications by OAM & SQL?
There are some tables in oracle apps (AD tables especially) involved when applying patches.Some of them are very useful when we need specific information about patch already applied.I will show the main tables and afterwards some handy related SQL’s to retrieve patch applied details and how we can also get all this information via OAM.AD_APPLIED_PATCHES – The main table when we are talking about patches that applied in Oracle Apps.This table holds information about the "distinct" Oracle Applications patches that have been applied.If 2 patches happen to have the same name but are different in content (e.g. "merged" patches), then they are considered distinct and this table will therefore hold 2 records (eTRM).I also found that if the applications tier node is separate from the concurrent manager node, and the patch applied on both nodes, this table will hold 2 records, one for each node.AD_PATCH_DRIVERS – This table holds information about all patch drivers included in specific patch.For example if patch contain only one unified driver like u[patch_name].drv then ad_patch_drivers will hold 1 record.On the other hand, if patch contain more than 1 driver, for example d[patch_name].drv and c[patch_name].drv, this table will hold 2 records.AD_PATCH_RUNS – holds information about each execution of adpatch for a specific patch driver.In case a patch contains more than one driver, this table will hold a record for each driver.This table also holds one record for each node the patch driver has been applied on (column APPL_TOP_ID).AD_PATCH_RUN_BUGS – holds information about all the bugs fixed as a part of specific run of adpatch.AD_BUGS – this table holds information about all bug fixes that have been applied.We have 2 options to view applied patch information:1) via OAM – Oracle Applications Manager2) Via SQL queriesWith OAM it’s easy and very intuitive, from OAM site map -> “Maintenance” tab -> “Applied Patches” under Patching and Utilities.Search by Patch ID will get all information about this patch; In addition, drill down by clicking on details will show the driver details.For each driver we can use the buttons (Timing Details, Files Copied, etc.) to get more detailed information.With SQL we can retrieve all the above information, sometimes more easily. For example: How to know which modules affected by specific patch? With OAM:1) search patch by Patch ID2) click on Details3) For each driver click on “Bug Fixes” and look on product column.With SQL:Run the following query, it will show you all modules affected by specific patch in one click…select distinct aprb.application_short_name as "Affected Modules"from ad_applied_patches aap,ad_patch_drivers apd,ad_patch_runs apr,ad_patch_run_bugs aprbwhere aap.applied_patch_id = apd.applied_patch_idand apd.patch_driver_id = apr.patch_driver_idand apr.patch_run_id = aprb.patch_run_idand aprb.applied_flag = 'Y'and aap.patch_name = '&PatchName';Another SQL will retrieve basic information regarding patch applied, useful when you need to know when and where (node) you applied specific patch:select aap.patch_name, aat.name, apr.end_datefrom ad_applied_patches aap,ad_patch_drivers apd,ad_patch_runs apr,ad_appl_tops aatwhere aap.applied_patch_id = apd.applied_patch_idand apd.patch_driver_id = apr.patch_driver_idand aat.appl_top_id = apr.appl_top_idand aap.patch_name = '&PatchName';To check if specific bug fix is applied, you need to query the AD_BUGS table only.This table contains all patches and all superseded patches ever applied:select ab.bug_number, ab.creation_datefrom ad_bugs abwhere ab.bug_number = '&BugNumber';
There are some tables in oracle apps (AD tables especially) involved when applying patches.Some of them are very useful when we need specific information about patch already applied.I will show the main tables and afterwards some handy related SQL’s to retrieve patch applied details and how we can also get all this information via OAM.AD_APPLIED_PATCHES – The main table when we are talking about patches that applied in Oracle Apps.This table holds information about the "distinct" Oracle Applications patches that have been applied.If 2 patches happen to have the same name but are different in content (e.g. "merged" patches), then they are considered distinct and this table will therefore hold 2 records (eTRM).I also found that if the applications tier node is separate from the concurrent manager node, and the patch applied on both nodes, this table will hold 2 records, one for each node.AD_PATCH_DRIVERS – This table holds information about all patch drivers included in specific patch.For example if patch contain only one unified driver like u[patch_name].drv then ad_patch_drivers will hold 1 record.On the other hand, if patch contain more than 1 driver, for example d[patch_name].drv and c[patch_name].drv, this table will hold 2 records.AD_PATCH_RUNS – holds information about each execution of adpatch for a specific patch driver.In case a patch contains more than one driver, this table will hold a record for each driver.This table also holds one record for each node the patch driver has been applied on (column APPL_TOP_ID).AD_PATCH_RUN_BUGS – holds information about all the bugs fixed as a part of specific run of adpatch.AD_BUGS – this table holds information about all bug fixes that have been applied.We have 2 options to view applied patch information:1) via OAM – Oracle Applications Manager2) Via SQL queriesWith OAM it’s easy and very intuitive, from OAM site map -> “Maintenance” tab -> “Applied Patches” under Patching and Utilities.Search by Patch ID will get all information about this patch; In addition, drill down by clicking on details will show the driver details.For each driver we can use the buttons (Timing Details, Files Copied, etc.) to get more detailed information.With SQL we can retrieve all the above information, sometimes more easily. For example: How to know which modules affected by specific patch? With OAM:1) search patch by Patch ID2) click on Details3) For each driver click on “Bug Fixes” and look on product column.With SQL:Run the following query, it will show you all modules affected by specific patch in one click…select distinct aprb.application_short_name as "Affected Modules"from ad_applied_patches aap,ad_patch_drivers apd,ad_patch_runs apr,ad_patch_run_bugs aprbwhere aap.applied_patch_id = apd.applied_patch_idand apd.patch_driver_id = apr.patch_driver_idand apr.patch_run_id = aprb.patch_run_idand aprb.applied_flag = 'Y'and aap.patch_name = '&PatchName';Another SQL will retrieve basic information regarding patch applied, useful when you need to know when and where (node) you applied specific patch:select aap.patch_name, aat.name, apr.end_datefrom ad_applied_patches aap,ad_patch_drivers apd,ad_patch_runs apr,ad_appl_tops aatwhere aap.applied_patch_id = apd.applied_patch_idand apd.patch_driver_id = apr.patch_driver_idand aat.appl_top_id = apr.appl_top_idand aap.patch_name = '&PatchName';To check if specific bug fix is applied, you need to query the AD_BUGS table only.This table contains all patches and all superseded patches ever applied:select ab.bug_number, ab.creation_datefrom ad_bugs abwhere ab.bug_number = '&BugNumber';
Basics of Cloning
Basics of Cloning
Hello all, As per the request and with experience I am again returing to Cloning of Oracle Application. I know most of them know what exactly happens in cloning but still here I am trying to touch the depths.
Before starting I want to ask question. Why you need to do cloning ? Why we need to duplicate Oracle Application.
We need cloning for various of reasons. suppose I have got production instance and want to test some application. Now here I want to test the application, need to apply some product specific patches which might affect whole application then I have to give downtime which will affect business. So if I had the same this on whic hI can play and test my application or code or say I can apply some patches and at the same time business also run then nothing like it. This can be achieved by cloning or duplicating the application.
Duplicating the application is not easy or its just not simply copy the application, it wont work in any case. Logically it sounds fine just to copy the filesystem and relink it and start the application but its not that easy.
Basically for cloning Oracle Application it can be categorised into three major categories.
-Preparing the Source System-Copy the file System-Preparing or say Configuring the Target System
You can achive first and third steps using a Rapid Clone utility which Oracle provides for cloning
There can be many ways and methods to clone Oracle Application which many organisations follows but the only supported method provided by Oracle is using Rapid clone.
Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install.
Basically there are two cloning methodology using Autoconfig and without using autoconfig. First one that is using autoconfig is completely replaced by Rapidclone.
Non-autocofig cloning methodology was generally used before 11.5.5 that is non autoconfig enabled system.
Here I will discuss Rapid Clone method of cloning and also throw some light on cloning 11.0.3 oracle application as some users are still using that.
So first about the Rapid clone method.
In Category 1 that is first you need to make source for clone. You need to dress up Source system so that only configuration files and not the whole file system is copied.
Pre-requiste Steps
To start with cloning you need to first check about some pre-requisites some utilities should be of required version
Here are they,
Oracle Universal Installer should be of 2.2.0.19 versionPerl should be of 5.005 version minimumJRE 1.1.8 and 1.3.1JDK 1.3.1Zip utility of version 2.3 minimumLatest Autoconfig Templates patches are applied. TXK-O is the latest till date.Latest Rapid Clone patches should be applied. Latest is ADX.F till date.
After check ing the pre-requisites now your system is ready to clone.
Preparing the Source system:
After checking the above mentioned pre-requisites now you have to prepare the source system which need to be cloned.
In a broad way what this step will do is this will create the staged clone directory which will be having the driver files and configuration file of the source.
So what exactly is going to happen in this step. Lets get in more details
Basically you have to run the adpreclone.pl script once for Application tier and one for the datbase (even if you are on single node ! )
Lets first check for the Database tier
On Source system, run following as ORACLE user
cd RDBMS Oracle_Home/appsutil/scripts/_perl ./adpreclone.pl dbTier
After running this it goes in two stages
dbTechstack and Database
What exactly it will do isIt will create stage cloned area at $ORACLE_HOME/appsutil/clone This clone directory has got following main directoriesdata,jre,bin,db,html,context
It will prepare datbase techstack at dbTechStack stage. Major activities it will take care of at this stage.
-Creates template files at $ORACLE_HOME/appsutil/template-Creates driver files at $ORACLE_HOME/appsutil/driver/instconf.drv-Converts inventory from binary to xml
It will prepare datbase at the database stage. Major activities includes
-Create datbase control file script$Oracle_Home/appsutil/clone/context/data/stage/addbhomsrc.xml$Oracle_Home/appsutil/clone/context/data/stage/adcrdb.zipadcrdbclone.sql
-Generates database creation driver file$Oracle_Home/appsutil/clone/context/data/driver/data.drv
-Copy JDBC Libraries$Oracle_Home/appsutil/clone /clone/jlib/classes111.zip
So all this happens on database side
Now lets concentrate on Application tier side. Again it goes almost in the same way that is in two stages.
As a APPLMGR user on application tier this script is runcd $COMMON_TOP/admin/scripts/_perl ./adpreclone.pl appsTier
It will also create the staged clone directory at $COMMON_TOP/cloneIt goes in two stages. Lets see one by one
atTechStack that is Application tier techstack.
- Creates template files forOracle_iAS_Home/appsutil/templateOracle_806_Home/appsutil/template
-Creates Techstack driver files forOracle_iAS_Home/appsutil/driver/instconf.drvOracle_806_Home/appsutil/driver/instconf.drv
appltop preparation
-It will create application top driver file$COMMON_TOP/clone/appl/driver/appl.drv
-Copy JDBC libraries$COMMON_TOP/clone/jlib/classes111.zip
So this all happens in dressing the source system
After then we need to copy the files.
Copy following files
APPL_TOPOA_HTML ($COMMON_TOP/html)JAVA_TOPCOMMON_TOP/utilCOMMON_TOP/clone8.0.6 ORACLE_HOMEiAS ORACLE_HOMEDB ORACLE_HOMEdbf files
After this stage now you need to configure the Target node. Basically you will run adcfgclone.pl same for databse tier and for application tier.Let go in bit more detail:
First we will see for the database tier
On the target node you will runORACLE_DB_HOME/appsutil/clone/bin/perl adcfgclone.pl dbTier
Again there are two stages :
First will look at dbTechstackIt will use the driver files and templates which were created at source and has been copied to target.
Following scripts are run-adchkutl.sh-adclonectx.pl-runInstallConfigDriver —- located in $Oracle_Home/appsutil/driver/instconf.drv-Relinking $Oracle_Home/appsutil/install/adlnkoh.sh
Now for database-Driver file$Oracle_Home/appsutil/clone/context/data/driver/data.drv-Create database adcrdb.zip-Autoconfig is run-Control file creation adcrdbclone.sql
Now on application tierfrom COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier
Stage at TechStack-Creates context file for target adclonectx.pl-Run driver files$Oracle_806_Home/appsutil/driver/instconf.drv$Oracle_iAS_Home/appsutil/driver/instconf.drv
Relinking of Oracle Home$Oracle_806_Home/bin/adlnk806.sh$Oracle_iAS_Home/bin/adlnkiAS.sh
at the end for ApplTop stageIt runs driver and then autoconfig
So this will totally configure your application which has been copied.
At the end you have to some finishing tasks
-Update Printer settings-Update Workflow Configuration settings-Update Profile options
This completes you application cloning completely.
Hello all, As per the request and with experience I am again returing to Cloning of Oracle Application. I know most of them know what exactly happens in cloning but still here I am trying to touch the depths.
Before starting I want to ask question. Why you need to do cloning ? Why we need to duplicate Oracle Application.
We need cloning for various of reasons. suppose I have got production instance and want to test some application. Now here I want to test the application, need to apply some product specific patches which might affect whole application then I have to give downtime which will affect business. So if I had the same this on whic hI can play and test my application or code or say I can apply some patches and at the same time business also run then nothing like it. This can be achieved by cloning or duplicating the application.
Duplicating the application is not easy or its just not simply copy the application, it wont work in any case. Logically it sounds fine just to copy the filesystem and relink it and start the application but its not that easy.
Basically for cloning Oracle Application it can be categorised into three major categories.
-Preparing the Source System-Copy the file System-Preparing or say Configuring the Target System
You can achive first and third steps using a Rapid Clone utility which Oracle provides for cloning
There can be many ways and methods to clone Oracle Application which many organisations follows but the only supported method provided by Oracle is using Rapid clone.
Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install.
Basically there are two cloning methodology using Autoconfig and without using autoconfig. First one that is using autoconfig is completely replaced by Rapidclone.
Non-autocofig cloning methodology was generally used before 11.5.5 that is non autoconfig enabled system.
Here I will discuss Rapid Clone method of cloning and also throw some light on cloning 11.0.3 oracle application as some users are still using that.
So first about the Rapid clone method.
In Category 1 that is first you need to make source for clone. You need to dress up Source system so that only configuration files and not the whole file system is copied.
Pre-requiste Steps
To start with cloning you need to first check about some pre-requisites some utilities should be of required version
Here are they,
Oracle Universal Installer should be of 2.2.0.19 versionPerl should be of 5.005 version minimumJRE 1.1.8 and 1.3.1JDK 1.3.1Zip utility of version 2.3 minimumLatest Autoconfig Templates patches are applied. TXK-O is the latest till date.Latest Rapid Clone patches should be applied. Latest is ADX.F till date.
After check ing the pre-requisites now your system is ready to clone.
Preparing the Source system:
After checking the above mentioned pre-requisites now you have to prepare the source system which need to be cloned.
In a broad way what this step will do is this will create the staged clone directory which will be having the driver files and configuration file of the source.
So what exactly is going to happen in this step. Lets get in more details
Basically you have to run the adpreclone.pl script once for Application tier and one for the datbase (even if you are on single node ! )
Lets first check for the Database tier
On Source system, run following as ORACLE user
cd RDBMS Oracle_Home/appsutil/scripts/_perl ./adpreclone.pl dbTier
After running this it goes in two stages
dbTechstack and Database
What exactly it will do isIt will create stage cloned area at $ORACLE_HOME/appsutil/clone This clone directory has got following main directoriesdata,jre,bin,db,html,context
It will prepare datbase techstack at dbTechStack stage. Major activities it will take care of at this stage.
-Creates template files at $ORACLE_HOME/appsutil/template-Creates driver files at $ORACLE_HOME/appsutil/driver/instconf.drv-Converts inventory from binary to xml
It will prepare datbase at the database stage. Major activities includes
-Create datbase control file script$Oracle_Home/appsutil/clone/context/data/stage/addbhomsrc.xml$Oracle_Home/appsutil/clone/context/data/stage/adcrdb.zipadcrdbclone.sql
-Generates database creation driver file$Oracle_Home/appsutil/clone/context/data/driver/data.drv
-Copy JDBC Libraries$Oracle_Home/appsutil/clone /clone/jlib/classes111.zip
So all this happens on database side
Now lets concentrate on Application tier side. Again it goes almost in the same way that is in two stages.
As a APPLMGR user on application tier this script is runcd $COMMON_TOP/admin/scripts/_perl ./adpreclone.pl appsTier
It will also create the staged clone directory at $COMMON_TOP/cloneIt goes in two stages. Lets see one by one
atTechStack that is Application tier techstack.
- Creates template files forOracle_iAS_Home/appsutil/templateOracle_806_Home/appsutil/template
-Creates Techstack driver files forOracle_iAS_Home/appsutil/driver/instconf.drvOracle_806_Home/appsutil/driver/instconf.drv
appltop preparation
-It will create application top driver file$COMMON_TOP/clone/appl/driver/appl.drv
-Copy JDBC libraries$COMMON_TOP/clone/jlib/classes111.zip
So this all happens in dressing the source system
After then we need to copy the files.
Copy following files
APPL_TOPOA_HTML ($COMMON_TOP/html)JAVA_TOPCOMMON_TOP/utilCOMMON_TOP/clone8.0.6 ORACLE_HOMEiAS ORACLE_HOMEDB ORACLE_HOMEdbf files
After this stage now you need to configure the Target node. Basically you will run adcfgclone.pl same for databse tier and for application tier.Let go in bit more detail:
First we will see for the database tier
On the target node you will runORACLE_DB_HOME/appsutil/clone/bin/perl adcfgclone.pl dbTier
Again there are two stages :
First will look at dbTechstackIt will use the driver files and templates which were created at source and has been copied to target.
Following scripts are run-adchkutl.sh-adclonectx.pl-runInstallConfigDriver —- located in $Oracle_Home/appsutil/driver/instconf.drv-Relinking $Oracle_Home/appsutil/install/adlnkoh.sh
Now for database-Driver file$Oracle_Home/appsutil/clone/context/data/driver/data.drv-Create database adcrdb.zip-Autoconfig is run-Control file creation adcrdbclone.sql
Now on application tierfrom COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier
Stage at TechStack-Creates context file for target adclonectx.pl-Run driver files$Oracle_806_Home/appsutil/driver/instconf.drv$Oracle_iAS_Home/appsutil/driver/instconf.drv
Relinking of Oracle Home$Oracle_806_Home/bin/adlnk806.sh$Oracle_iAS_Home/bin/adlnkiAS.sh
at the end for ApplTop stageIt runs driver and then autoconfig
So this will totally configure your application which has been copied.
At the end you have to some finishing tasks
-Update Printer settings-Update Workflow Configuration settings-Update Profile options
This completes you application cloning completely.
Subscribe to:
Comments (Atom)