Feed aggregator

AJAX and the Refresh Button

Adam Winer - Tue, 2007-07-31 17:12
JSF relies heavily on <input type="hidden" name="javax.faces.ViewState"> for its lifecycle. This hidden field carries all UI state for the page. Whether that's client-side state (with the entire page Base64-encoded) or server-side state (with a simple token), it's important that the right field be delivered with any JSF postback for the page to function correctly.

As a result, AJAX implementations in JSF typically need not only to submit this value to the server when posting an AJAX request, but also to update it as necessary when a request completes. While looking at an ADF Rich Client bug recently, I was rudely reminded that the Refresh/Reload button doesn't always behave as you might imagine, and thought it was worth delving into the details. (I'll be talking about JSF, but the behavior is generic to DHTML and applies outside of JSF, and the code samples are just raw HTML.)

Take the following page:

<form name="foo">
<div id="valCtr">
<input name="val" type="hidden" svalue="1">

<a href="#" onclick="forms.foo.val.value =
parseInt(forms.foo.val.value) + 1; return false;">

Now, in your favorite browser, try the following:
  • Click Display (you'll see 1)
  • Click Increment a couple of times
  • Click Display again (you'll see 3)
  • Click or select Refresh/Reload (but not Shift-Refresh)
  • And Display once more. You'll still see 3 (unless you're using Safari)
  • Now, Shift-Refresh, and Display. Now we're back at 1.
What have we seen? Refresh has re-queried the HTML for the page, but instead of resetting the value of our hidden input field back to 1, it's stored the updated value of 3! This isn't a bug - so says this Bugzilla bug (and all 61 duplicates!) Microsoft would agree with Mozilla here. Of the big 3, only Safari doesn't overwrite form fields on reload. (The caching behavior is in fact very handy for Back/Forward, and is exploited by the Really Simple History framework.) Shift-refresh fully reloads the page, and drops the form element cache.

This can lead to big problems in a JSF application. Take the following scenario:
  • A page initially renders with state token 1 in a hidden field
  • An AJAX request updates the state token to 2
  • The user hits Reload, and the new HTML contains state token 3
  • But the browser ignores it, and overwrites it with state token 2!
Now we've got a page in state "3", but a token claiming it's really in state "2". This is bad. As always, let's see what alternatives we've got, and whether they suffer from the same problem.

First, how about creating the DOM on the fly?

<script type="text/javascript">
function incrementViaDOM()
var value = parseInt(document.forms.foo.val.value) + 1;
var newField = document.createElement("input");
newField.name = "val";
newField.type = "hidden";
newField.value = "" + value;
var oldField = document.forms.foo.val;
var parent = oldField.parentNode;
parent.replaceChild(newField, oldField);


<a href="#" onclick="incrementViaDOM(); return false;">
Increment with replaceChild</a>

In Firefox, this still doesn't help. The hidden field value is still cached. (And this example doesn't work at all in IE... see this entry for why and how to fix it.)

OK, how about innerHTML?

<script type="text/javascript">

var value = parseInt(document.forms.foo.val.value) + 1;
var valCtr = document.getElementById("valCtr");
valCtr.innerHTML = "<input name=\"val\" " +
"type=\"hidden\" value=\"" + value + "\">";

<a href="#" onclick="increment(); return false;">
Increment with innerHTML</a>

Now this works... changes made by innerHTML are not remembered by Firefox or Internet Explorer (or Safari). So, if you don't want a hidden field cached, update with innerHTML and browsers won't hassle you.

Alternatively, you could look at tackling this issue during the refresh, by forcibly resetting the value from Javascript:

<input name="val" type="hidden">
<script type="text/javascript">

This works in Firefox, but does not in IE. Whatever code overwrites the value of the hidden field runs after this inline script, but before the page's onload handler. So, if you want to tackle this problem while refreshing, you'll have to do it in onload.

To (finally) come back to JSF, there's a better way to solve this problem, at least for the state token. Use a StateManager that automatically doesn't generate new tokens for AJAX requests, but instead reuses the old token. New tokens are important when you're rendering a new page, but are a waste of space when you're just working on a single page. And, as a nice side-effect, this makes this issue moot. (MyFaces Trinidad 1.0.2 will include this token-reuse optimization, though it's always used innerHTML for updating the state token, so it hasn't been hit by this bug.)

So, to summarize, if you have a programatically-modified, hidden input field that needs to be Reload-proof, two techniques look good:
  • Use innerHTML to update the field
  • Use onload to set the hidden input field value

If you've got any other tricks, I'd be happy to know.

Know Thyself

Mary Ann Davidson - Tue, 2007-07-31 07:47

I am trying something a bit different with this blog entry, which is to tag team it with a colleague. The idea for this entry came out of an email exchange inside Oracle about identity and privacy. It was an interesting enough discussion that a third colleague thought it would be worthy of a blog entry. From my perspective, it's a chance to work with a great colleague and vent my spleen while doing so. What's better than that?

I should do a brief introduction here to my co-blogger, Roger Sullivan, who is VP of Business Development for Oracle Identity Management. I could provide Roger's more formal CV but suffice it to say that on a "street creds" level, Roger is a very well respected identity management kahuna (e.g., he is also President of the Liberty Alliance).  On a more personal level, a few years ago, Oracle acquired a company of which Roger was then-CEO. I remember punching the air with multiple "woo hoos" when I heard the news, because I knew Roger and thought that the fact we were "acquiring" him as part of the deal was at least as important as the technology (which itself was pretty cool).
The original email exchange Roger and I (and others) had was around federated identity. There is probably a fancier definition of federated identity with which Roger can enlighten us, but as a practical matter you can think of it as being able to have an "identity" that is recognized in multiple arenas that have some business relationship among them. For example, suppose I go to a web site for FooHotels. FooHotels has a business relationship with a car rental agency, RentHotCars (they offer joint car rental/hotel packages, and you get hotel points for renting cars and vice versa). From a consumer standpoint, I'd like to be able to go to a single web site, book a hotel and rent a car (and get all those points!) without having to separately identify myself to each entity. In particular, if I jump to RentHotCars.com from FooHotels.com, I'd like to be able to do that without typing in yet another cryptic username and password. I can do that through the magic of federated identity.
One of the beauties of federated identity is that the standards work in this area was driven by real businesses (not merely technologists in search of a problem to solve "elegantly"). As such, a lot of work to-date has been pragmatic, implementable, and focused on a clear problem that it would be useful to solve. And Roger has been a leader in developing those standards. Woo hoo!
&lt;Roger> Mary Ann, you are too kind.  I think it is safe to say that all of the Identity Management acquisitions, including the recent announcement of Bharosa joining the family have, been great moves for Oracle and our customers.  The synergies created by the union of these "best of breed" companies have been truly remarkable and have catapulted Oracle into a leadership position in the Identity Management market.
Mary Ann has provided a great description of the essentials of Federation.  What else would I say to a former U.S. Navy officer with a loaded weapon?  (Read on...)
Federated Identity Management provides benefits to each of the participants.  For the Service Provider, federation extends their reach into their markets.  For the Identity Provider, it provides a singularly secure mechanism of storing the essential identity elements.  And for the individual user, it provides a safe and secure means of disclosing only the required information necessary for the task at hand.
&lt;Mary Ann> To me, the business need (and utility as a user) of a being able have a federated identity is a different issue than having (or needing to have) a single identity recognized by lots of disparate entities who don't have a business relationship. This lack of business need (dare I say Need to Know?) coupled with many people's natural desire for privacy to me means that we don't actually need a single identity and in fact, I'd really resist it. I do resist it.
For example, I have multiple "identity cards" in my wallet (I have lots of them in fact, judging by the thickness of my wallet). These identities are issued by different organizations, each of which has a different authority to issue them (and don't in general need to know of my other personas). For example, I have a concealed weapons permit in the state of Idaho (which required me, among other things, to take a gun safety class and pass an FBI check). I also have an American Express card. American Express neither knows nor cares that I am licensed to carry concealed in Idaho and the state of Idaho presumably neither knows nor cares what my credit rating is, as long as I pay my taxes on time. This is one reason why I have two cards: it reflects the fact that these identities have no relationship with each other, and each has "authority" to recognize "Mary Ann's identity" that are unrelated. They don't even need to know I am the same person.
&lt;Roger> Mary Ann has hit upon the fundamental issue that concerns many who are using web-based services.
Consider the following example of how we interact in our daily (non-electronic) lives.  Let's say that I'm driving home from work and receive a call from my wife asking me to stop at the store for some milk.  I don't have much cash, so I swing by my bank's ATM machine.  This simple example involves at least four distinct identity elements.  [Pause now while the "Jeopardy" music plays and you try to identify at least four forms of identity.]
The cell call will probably have my wife's name on the screen as I answer because her number is passed through the cell network and I have that number associated with her name in my contact list.  There is reasonably strong assurance that it will be her on the other end, unless she has loaned the phone to someone else.
At the ATM machine, I'll need to insert my ATM card (something I have) and enter a PIN code (something I know) in order to provide multi-factor authentication that it's really me trying to access my bank account.  This is good for the bank and especially good for the security of my funds.  I like providing these extra steps.
At the convenience store, the only "authentication" required is that of the $5.00 bill that I present for the milk.  For some transactions, there is an implicit right to anonymity.  Neither the store clerk nor I have any need to know the other's identity for this transaction.  If, on the other hand, I looked considerably younger than I do and was buying beer, the clerk would have an obligation for me to provide proof of legal age on some sort of recognized identity card.  I know that this is expected in the various day-to-day transactions in which I participate.
What we want to achieve in the electronic world, is the same kind of humanly intuitive interaction with web-based services.  The minimal set of appropriate credentials - and only those - provided for the transaction at hand.
[PS: The 4th form was my driver's license with beaucoup identity information on it.  If I want the privilege of driving, then I will agree to carry and provide this authentication mechanism to the local constable on reasonable demand.]
&lt;Mary Ann> Unfortunately, more and more of our representative identities are linked through the magic (or curse) of Social Security Numbers (SSNs). As such, we have the "collapsing" of identity, sort of the metaphysical equivalent of having one persona instead of many, which has made it a lot easier for identity thieves to flourish. It used to be the case that losing a single credit card did not lead to an identity theft nightmare. You just called the company and cancelled the card (I only did this once, when I "lost" a credit card that later turned up).  Now, if you lose (or misplace) one "identity" that is based on your SSN, or someone else gets access to it, they can often "link" to all your other personas. You didn't lose one card, you lost your entire identity.
The entire identity theft explosion has been fueled by too darn many people using Social Security Number for purposes for which it was never intended: as a single unique identifier (that enables linkages between non-related personas, many times for no purpose that could possibly be construed as beneficial to a user).  Putting it differently, if my magazine subscription record is leaked, so people know that I take Surfer's Journal, I really would not care. (So what? It's a great publication and no harm to me if people know I read it.)  However, if my "subscription record" were to include my Social Security Number (for no good reason, and there is no good reason to use it), I am in deep kimchee because that SSN allows a bad guy access to many other Mary Ann personas. Bad guy can "become" me.
If a Social Security Number is ubiquitous (and it is) but not secret (it has been used as people's health care number and driver's license number, conveniently located on your health care card or driver's license in 12 point font, bold) and the key to "who you are," it is the perfect storm of one "key" (which is not secret and cannot be changed) unlocking your entire identity, so that it can be stolen. The only worse thing would be substituting your fingerprint as your "unique identifier," which is also not secret and can't be changed.
I confess to being a professional crank on this issue. Some years ago, I registered for a class at UC Berkeley Extension (which had and presumably still has excellent classes). They wanted my Social Security Number in order for me to register. Here's how the dialogue went:
UCB: "We'd like your Social Security Number."
Me: "Why, is this a taxable event? Because if it isn't, you shouldn't be using SSN."
UCB: "We want to uniquely identify you."
Me: "That's your problem. I know perfectly well who I am. Besides, if you want a unique identifier, use a database sequence number. Trust me; I know about these things."
I won the argument through sheer stubbornness. (In the interests of full disclosure, I am told that UC Berkeley no longer uses SSN as student identifiers, so good on them. Perhaps in my own small, cranky way, I helped them see the light.)
I should note that Oracle has technology (transparent data encryption, woo hoo!) that can encrypt columns (or entire tablespaces, as of Oracle Database 11g) of sensitive information like Social Security Numbers. It's a nice weapon in the security person's arsenal. A great one, in fact. But the entire world is not Oracle, and encryption, as wonderful as it is, doesn't help you if the data is "inappropriately accessed" in decrypted form.  Eventually, data - any data - has to be decrypted to use it.
&lt;Roger> As Mary Ann points out, Oracle provides sophisticated security mechanisms in order to protect the information that our solutions manage.  In addition, we strongly believe that these solutions must be based on industry proven standards.  This provides our customers with the investment protection and flexibility that web-based applications require in a connected world.  There is a very long list of boring acronyms that detail the identity-related standards that our products support.  Moreover, there are equally long lists of standards for virtually every product area in the company.  A fundamental criterion for the successful integration of acquired companies is their adherence to relevant standards.  This enables Oracle to quickly achieve a return on its acquisition investment.

&lt;Mary Ann> Clearly, there are times when an organization needs to collect sensitive information (like your employer, who needs your SSN to for tax reporting purposes). Many organizations take appropriate care to secure that information. Those aren't the folks that make my blood boil.
You do have to ask, and I have, why is really sensitive data being collected by so many people who do not need it and who don't secure it? Especially when it is users and not "collectors" who pay the costs of recovery from identity theft? It's like someone demanding to borrow my car (something of value to me), getting drunk (not acting responsibly with my property), wrecking my car, and leaving me to pay the repair bill. It's a rotten deal. Any reasonable person would say, "You shouldn't borrow my car; get your own. If you are going to borrow it and you wreck it in a drunken stupor, you pay for it. The entire megillah."
&lt;Roger> Identity standards have been well established for the means of collecting and "connecting the bits" so that the necessary identity information can be protected and securely shared for legitimate purposes.  The danger is that, once the bits are connected for illicit purposes, they can spread at light speed through web infrastructure.  The identity industry is beginning to establish policy standards that go beyond simple interoperability of the technology.  Rules can be created so that there are secure electronic safeguards in place to ensure that only legitimate connections can be made, thereby significantly reducing the opportunity for identity theft.  Additionally, one can assure that the mechanisms for managing the data and performing risk analysis can be thoroughly audited.  Establishing, implementing, deploying, and auditing these standards-based solutions will add enormous confidence to those who are using web-based services.  And that will yield comparable market growth.  
&lt;Mary Ann> I like what I am hearing from you, Roger! Federated identity is a wonderful thing when there is a business purpose for linking my identities, as there so often is. As someone who is forever being asked to create another username and password for yet another website, I wish we had more of this where it makes sense. However, federated identity is most assuredly not "having a single persona that relies on an immutable non-secret for security." Only God and my mom - well, maybe only God - knows or should know all the different facets of my persona, or anybody's persona. I for one would like to keep it that way.
&lt;Roger> So, Mary Ann does your spleen feel sufficiently vented?
&lt;Mary Ann> On this topic, yes! Thanks for adding color, detail and expertise to the discussion, and for being part of the solution, not the problem.

For more information:

Liberty Alliance:


Surfer's Journal, a great publication:


Roger Sullivan's blog:


Oracle's acquisition of Bharosa:


Useful Metalink NOTE ID's

Madan Mohan - Tue, 2007-07-31 02:18
RDBMS and E-Business Suite Installation and Configuration
118218.1 11i. Installing a Digital Cerificate on both the Server and Client.
252217.1 Requirements for Installing Oracle 9iR2 on RHEL3
146469.1 Installation & Configuration of Oracle Login server & Portal3i
146468.1 Installation of Oracle9i Application Server(9iAS)
152775.1 XML gateway installation
165700.1 Multiple Jserv configuration
207159.1 Documentation of 9iAS
210514.1 Express Server WebIV Note numbers
170931.1 Notes on Motif troubleshooting
177610.1 Oracle Forms in Applications FAQ
258021.1 How to monitor the progress of a materialized view refresh (MVIEW)
330250.1 Tips & Tricks To Make Apache Work With Jserv
139684.1 Oracle Applications Current Patchset Comparison Utility - patchsets.sh
236469.1 Using Distributed AD in Applications Release 11.5.
96630.1 Cash Management Overview
233428.1 Sharing the Application Tier File System in Oracle Applications 11i
243880.1 Shared APPL_TOP FAQ
330250.1 Tips & Tricks To Make Apache Work With Jserv
241370.1 Concurrent Manager Setup and Configuration Requirements in an 11i RAC Environment
209721.1 How to Change the Port Number on one Machine, When we Use Multiple Collaboration Suite Tiers
177377.1 How to change passwords in Portal (Database and lightweight user passwords)
304748.1 Internal: E-Business Suite 11i with Database FAQ
166213.1 SPFILE internals ** INTERNAL ONLY **
216208.1 Oracle9i Application Server (9iAS) with Oracle E-Business Suite Release

11i Troubleshooting
186981.1 Oracle Application Server with Oracle E-Business Suite Release 11i

Physical Standby
Note:180031.1 Creating a Data Guard physical standby
Note:214071.1 Creating a Data Guard physical standby with Data Guard Manager
Note:232649.1 Configuring gap resolution
Note:232240.1 Performing a switchover
Note:227196.1 Performing a failover
Note:187242.1 Applying Patchsets with Physical Standby in Place

Logical Standby
Note:186150.1 Creating a logical standby
Note:214071.1 Creating a logical standby with Data Guard Manager
Note:232240.1 Performing a switchover
Note:227196.1 Performing a failover
Note:233261.1 Tuning Log Apply Services
Note:215020.1 Troubleshooting Logical Standbys
Note:210989.1 Applying Patchsets with Logical Standby in Place
Note:233519.1 Known Issues with Logical Standby

Dataguard General Information
Note:205637.1 Configuring Transparent Application Failover with Data Guard
Note:233509.1 Data Guard Frequently Asked Questions
Note:225633.1 Using SSH with 9i Data Guard
Note:233425.1 Top Data Guard Bugs
Note:219344.1 Usage, Benefits and Limitations of Standby RedoLogs
Note:201669.1 Setup and maintenance of Data Guard Broker using DGMGRL
Note:203326.1 Data Guard 9i Log Transportation on RAC
Note:239100.1 Data Guard Protection Modes Explained

Dataguard Configuration Best Practices
Note:240874.1 Primary Site and Network Configuration Best Practices
Note:240875.1 9i Media Recovery Best Practices

Frequently Asked Questions
68993.1 Concurrent Managers on NT
1013526.102 Changing and Resetting Release 11 Applications Passwords
74924.1 ADI (Applications Desktop Integrator) Installation
114226.1 How to Set Up Apache and JSERV w/ Oracle XSQL, JSP, and Developer
146469.1 Installing and Configuring Oracle Login Server and Oracle Portal 3i with Oracle Applications 11i
146468.1 Installing Oracle9i Application Server with Oracle Applications 11i
62463.1 Detailed Guide on How the Intelligent Agent Works
104452.1 Troubleshooting (Concurrent Manager Unix specific)
122662.1 How to change the hostname or domainname of your portal
231286.1 Configuring the Oracle Workflow 2.6 Java-based Notification Mailer with Oracle Applications 11i
230688.1 Basic ApacheJServ Troubleshooting with IsItWorking.class
204015.1 Export/Import Process for Oracle Applications Release 11i Database Instances Using Oracle8i EE
158818.1 Migrating the Workflow Mailer to the APPLMGR Account
185431.1 Troubleshooting Oracle Applications Manager OAM 2.0 for 11i
177089.1 OAM11i Standalone Mode Setup and Configuration
172174.1 WF 2.6: Oracle Workflow Notification Mailer Architecture in Release 11i
166021.1 Oracle Applications Manager 11i - Pre-requisite Patches
166115.1 Oracle Applications Manager 11i integrated with Oracle Applications 11i
165041.1 Generic Service Management Functionality
204090.1 Generic Service Management Configuration using Applications Context Files
139863.1 Configuring and Troubleshooting the Self Service Framework with Oracle Applications (latest version)
187735.1 Workflow FAQ - All Versions
166830.1 Setting up Real Application Cluster (RAC) environment on Linux - Single node
158868.1 Step by Step, Oracle 9iAS Installation Process
123243.1 Scheduling Web Reports Via Oracle Reports Server CGI
165195.1 Using AutoConfig to Manage System Configurations with Oracle Applications 11i

RMAN and Backup & Restore
60545.1 How to Extract Controlfiles, Datafiles, and Archived Logs from RMAN Backupsets

10gR2 Setup Installation, ASM,CRS, RAC , Troubleshooting
471165.1 Additional steps to install 10gR2 RAC on IBM zSeries Based Linux (SLES10)
414163.1 10gR2 RAC Install issues on Oracle EL5 or RHEL5 or SLES10 (VIPCA Failures)
467753.1 Veritas clusterware 5.0 not recognized by Oracle due to the fact that Veritas
467176.1 RAC: Installing RDBMS Oracle Home Hangs The Oui
466975.1 Step to remove node from Cluster when the node crashes due to OS or H/w
330358.1 CRS 10g R2 Diagnostic Collection Guide
401132.1 How to install Oracle Clusterware with shared storage on block devices
392207.1 CSSD Startup fails with NSerr (12532,12560) transport:(502,0,0) during Install
333166.1 CSSD Startup Fails with NSerr (12546,12560) transport:(516,0,0) During install
330929.1 CRS Stack Fails to Start After Reboot ORA-29702 CRS-0184
463255.1 Enable trace for gsd issues on 10gR2 RAC
338924.1 CLUVFY Fails With Error: Could not find a suitable set of interfaces for VIPs
462616.1 Reconfiguring the CSS disktimeout of 10gR2 Clusterware for Proper LUN Failover
461884.1 How To Disable Fatal Mode Oprocd On HP-UX Itanium 10gR2
404474.1 Status of Certification of Oracle Clusterware with HACMP 5.3 & 5.4
329530.1 Using Redhat Global File System (GFS) as shared storage for RAC
458324.1 Increased 'Log File Sync' waits in 10gR2
341214.1 How To clean up after a Failed (or successful) Oracle Clusterware Installation
454638.1 srvctl command failed - An unexpected exception has been detected in native
276434.1 Modifying the VIP or VIP Hostname of a 10g Oracle Clusterware Node
383123.1 PRKP-1001 CRS-215 srvctl Can not Start 2nd Instance
358620.1 How To Recreate Voting And OCR Disk In 10gR1/2 RAC
200346.1 RAC: Frequently Asked Questions
220970.1 RAC: Frequently Asked Questions
269320.1 Removing a Node from a 10g RAC Cluster
430266.1 How to install 10gR2 and 9iR2 on the same node with different UDLM requirement
283684.1 How to Change Interconnect/Public Interface IP Subnet in a 10g Cluster
391790.1 Unable To Connect To Cluster Manager Ora-29701
294430.1 CSS Timeout Computation in RAC 10g (10g Release 1 and 10g Release 2)
414177.1 Executing root.sh errors with "Failed To Upg Oracle Cluster Registry Config
390483.1 DRM - Dynamic Resource management
390880.1 OCR Corruption after Adding/Removing voting disk to a cluster when CRS stack
309542.1 How to start/stop the 10g CRS ClusterWare
387205.1 The DB Cannot Start With CRS And ASM
270512.1 Adding a Node to a 10g RAC Cluster
395156.1 Startup (mount) of 2nd RAC instance fails with ORA-00600 [kccsbck_first]
363777.1 How to Completely Remove a Service so that its Service_id Can Be Reused
391112.1 Database Resource Manager Spins Lmon To 100% Of Cpu
365530.1 Permissions not set correctly after 10gR2 installation
357808.1 Diagnosability for CRS / EVM / RACG
284752.1 10g RAC: Steps To Increase CSS Misscount, Reboottime and Disktimeout
332180.1 ASMCMD - ASM command line utility
371434.1 Using Openfiler iSCSI with an Oracle database
338047.1 cluvfy ERROR: Unable to retrieve database release version
183408.1 Raw Devices and Cluster Filesystems With Real Application Clusters
367564.1 Server Reboots When Rolling Upgrading CRS(10gr1 -> 10gr2)
358545.1 Root.sh is failing with CORE dumps, during CRS installation
343092.1 How to setup Linux md devices for CRS and ASM
295871.1 How to verify if CRS install is Valid
331934.1 RAC Single Instance (ASM) startup fails with ORA-27300/ORA-27301/ORA-27302
341974.1 10gR2 RAC Scheduling and Process Prioritization
341971.1 10gR2 RAC GES Statistics
341969.1 10gR2 RAC OS Best Practices
341965.1 10gR2 RAC Reference
341963.1 10gR2 RAC Best Practices
313540.1 Manually running cvu to verify stages during a CRS/RAC installation
331168.1 Oracle Clusterware consolidated logging in 10gR2
339710.1 Abnormal Program Termination When Installing 10gR2 on RHAS 4.0
337937.1 Step By Step - 10gR2 RAC with ASM install on Linux(x86) - Demo
280209.1 10g RAC Performance Best Practices

216664.1 FAQ: Cloning Oracle Applications Release 11i
230672.1 Cloning Oracle Applications Release 11i with Rapid Clone
135792.1 Cloning Oracle Applications Release 11i

139516.1 Discoverer 4i with Oracle Applications 11i
257798.1 Discoverer 10g (9.0.4) with Oracle Applications 11i
139516.1 Installation of Discoverer 4i

165195.1 Using AutoConfig to Manage System Configurations with Oracle Applications 11i
218089.1 Autoconfig FAQ

Real Application Clusters(RAC)
181503.1 Real Application Clusters Whitepapers (OTN)
280209.1 10g RAC Performance Best Practices (INTERNAL ONLY)
302806.1 IBM General Parallel File System (GPFS) and Oracle RAC on AIX 5L and IBM eServer pSeries
270512.1 Adding a Node to a 10g RAC Cluster
137288.1 Manual Database Creation in Oracle9i (Single Instance and RAC)
292776.1 10g RAC Lessons Learned
280216.1 10g RAC Reference (INTERNAL ONLY)
269320.1 Removing a Node from a 10g RAC Cluster
226561.1 9iRAC Tuning Best Practices (INTERNAL ONLY)
220178.1 Installing and setting up ocfs on Linux - Basic Guide
208375.1 How To Convert A Single Instance Database To RAC In A Cluster File System Configuration
255359.1 Automatic Storage Management (ASM) and Oracle Cluster File System (OCFS) in Oracle10g
341963.1 10gR2 RAC Best Practices (INTERNAL ONLY)
273015.1 Migrating to RAC using Data Guard
329530.1 Using Redhat Global File System (GFS) as shared storage for RAC
270901.1 How to Dynamically Add a New Node to an Existing 9.2.0 RAC Cluster
203326.1 Data Guard 9i Log Transportation on RAC
169539.1 A Short Description of HA Options Available in 9i
160120.1 Oracle Real Application Clusters on Sun Cluster v3
226569.1 9iRAC Most Common Performance Problem Areas (INTERNAL ONLY)
251578.1 Step-By-Step Upgrade of Oracle Cluster File System (OCFS v1) on Linux
247135.1 How to Implement Load Balancing With RAC Configured System Using JDBC
139436.1 Understanding 9i Real Application Clusters Cache Fusion
285358.1 Creating a Logical Standby from a RAC Primary Using a Hot Backup
222288.1 9i Rel 2 RAC Running on IBM’s General Parallel File System
226567.1 9iRAC Related Init.ora Parameters (INTERNAL ONLY)
210889.1 RAC Installation with a NetApp Filer in Red Hat Linux Environment
341965.1 10gR2 RAC Reference (INTERNAL ONLY)
341969.1 10gR2 RAC OS Best Practices (INTERNAL ONLY)
226566.1 9iRAC Related Latches (INTERNAL ONLY)
220970.1 RAC: Frequently Asked Questions
268202.1 Dynamic node addition in a Linux cluster
332257.1 Using Oracle Clusterware with Vendor Clusterware FAQ
245079.1 Steps to clone a 11i RAC environment to a non-RAC environment
235158.1 How To Enable/Disbale Archive Log Mode on Oracle9i Real Application Cluster
210022.1 How To Add A New Instance To The Existing Two Nodes RAC Database Manually
317516.1 Adding and Deleting a Cluster Node on 10gR2 / Linux
271685.1 How to Run Autoconfig for RAC Environment on Apps Tier Only
278816.1 How to Setup Parallel Concurrent Processing using Shared APPL_TOP for RAC Environment
334459.1 How to change hostname in RAC environment
250378.1 Migrating Applications 11i to use Oracle9i RAC (Real Application Clusters).
295998.1 How to solve corruptions on OCFS file system
345081.1 How to Rename a RAC Database in a 10g Real Application Clusters Environment
312051.1 How To Remove Ocfs From Linux Box.

228516.1 How to copy (export/import) Portal database schemas of IAS 9.0.2 to another database
330391.1 How to copy (export/import) Portal database schemas of IAS 10.1.2 to another database

125767.1 Upgrading Devloper6i with Oracle Applications 11i
216550.1 RDBMS upgrade to 9.2.0
161779.1 Upgradation of HTTP Server
212005.1 Upgrade Oracle Applications to 11.5.8
139863.1 Self Servie Framework Upgrade
112867.1 Express Server & OFA upgrade
124606.1 Jinitiator upgrade
130091.1 JDK upgrade to 1.3
130091.1 Upgrading Oracle Applications 11i to use JDK 1.3
144069.1 Upgrading to Workflow 2.6 with Oracle Applications 11i
159657.1 Complete Upgrade Checklist for Manual Upgrades from 8.X / 9.0.1 to Oracle9i

Note 230627.1 - 9i Export/Import Process for Oracle Applications Release 11i
Note 331221.1 - 10g Export/Import Process for Oracle Applications Release 11i
Note 362205.1 - 10g Release 2 Export/Import Process for Oracle Applications Release 11i
Note 277650.1 - How to Use Export and Import when Transferring Data Across Platforms or Acros...
Note 243304.1 - 10g: Transportable Tablespaces Across Different Platforms
Note 341733.1 - Export/Import DataPump Parameters INCLUDE and EXCLUDE - How to Load and Unload..


Database Upgrade from 8i to 9i

Madan Mohan - Tue, 2007-07-31 01:53
Pre-Upgrade Tasks

1) Make sure that you have 9iR2 software (9.2.0 CD Dump) before starting the installation.

first need to download the software on the server. Following are the details of the software to be downloaded:

i. for Solaris:
Disk1: Part# A99349-01
Disk2: Part# A99350-01
Disk3: Part# A99351-01
ii. for Linux
Disk1: Part# A99339-01
Disk2: Part# A99340-01
Disk3: Part# A99341-01

2) Login to orxxxxxx user and make sure that you have minimum 4 GB free space in /xxxxxx/oracle mount point. If you do not have enough free space, you need to send the TAR to SA team for adding more space to /xxxxxx/oracle mount point.

3) Make sure that you have oraInst.loc file in the below given locations and it has 777 privileges over it. If the file is not there or it does not have 777 privileges, you need to send the TAR to SA team for creating the file or granting 777 on it.
a. On Solaris: /var/opt/oracle/oraInst.loc
b. On Linux: /etc/oraInst.loc

4) Look out for the oraInventory on your instance. As per EBSO standards the location of oraInventory is “/xxxxxx/oracle/product/oraInventory”. If it is not present in this location you need to search for it. Once you know the location of oraInventory and you have privileges to update oraInst.loc file, make sure that the contents of oraInst.loc is as shown below. If the file was already existing and had some other values, just update it as shown below:

5) Make sure that you have /igold symbolic link pointing to /xxxxxx on the file system.

Preparing the System for Upgrade

1) Declare blackout on all the Components of APPS Instance and shutdown all Middle-Tier services of the instance. Keep Database server and DB listener up.

2) Check the free space in SYSTEM tablespace and if it is less than 1 GB free, add another datafile to create free space. Similarly, make sure that you have minimum 750 MB free in RBS tablespace. One example of how to add datafile is given below.

SQL> select tablespace_name, round(sum(bytes)/1024/1024) free_space from dba_free_space where tablespace_name in (‘SYSTEM’,’RBS’) group by tablespace_name;

SQL> alter tablespace SYSTEM add datafile ‘/xxxxxx/oradata02/data02/systemxx.dbf’ size 1000m autoextend on next 25m maxsize 1800m;

3) Make sure that the value of maxextents for all Rollback Segments is Unlimited. Run the below given query to check this. The value of “32765” means the Unlimited size. If the value is less than 32765 then alter the rollbacks segment to make maxextents unlimited.

SQL> select segment_name, max_extents,status from dba_rollback_segs;
SQL> alter rollback segment rbsXX storage (maxextents unlimited);

4) Set the values of following parameters in initXXXXXX.ora file as given below.
db_domain =
aq_tm_processes = 0
job_queue_processes = 0
log_archive_start = false
_system_trig_enabled = FALSE

5) Search for any “event=” set in initXXXXXX.ora or ifilecbo.ora files. If you find any event, comment that entry. Also, you may not find some of the initialization parameters given above in initXXXXXX.ora file. In that case check the parameter in ifilecbo.ora file.

6) Alter the database to NOARCHIVELOG mode and shut it down. Also shutdown the DB listener.

$ sqlplus “/ as sysdba”
SQL> shutdown immediate
SQL> startup mount
SQL> alter database noarchivelog;
SQL> archive log list
SQL> shutdown immediate
SQL> exit
$ lsnrctl stop XXXXXX

7) Create new ORACLE_HOME and set environment for that.

a. Create new directory “920” in product directory for the new HOME
$ cd /xxxxxx/oracle/product
$ mkdir 920

b. Copy the environment file from old ORACLE_HOME (817) to new ORACLE_HOME (920)
$ cd /xxxxxx/oracle/product/920
$ cp ../817/.env .

c. Edit the environment file in new ORACLE_HOME and change all the references from “817” to “920” by performing a global replace in “vi”.
$ vi .env
:1,$ s/817/920/g

d. Edit “.profile” file and “.bash_profile” (only in Linux) and edit all the references of “817” to “920”

$ cd $HOME
$ vi .profile
:1,$ s/817/920/g
$ vi .bash_profile
:1,$ s/817/920/g

e. Log out from orxxxxxx user, login again and make sure that the following environment variables are pointing to new ORACLE_HOME i.e. “/orxxxxxx/product/920”.
$ echo $TNS_ADMIN

8) At this stage we are ready to perform our upgrade. Just review all the steps in these first 2 sections and make sure that you have followed all of them. Then proceed to next section and perform the upgrade.

Performing 920 Upgrade

1) Login to orxxxxxx user and make sure that the environment variables like ORACLE_HOME, TNS_ADMIN and LD_LIBRARY_PATH are pointing to new ORACLE_HOME of 920. Also, make sure that /igold symbolic link is pointing to /xxxxxx and oraInst.loc file has been correctly updated. All these things had been discussed in the previous sections of the document.

2) Start a Reflection X session and connect to orxxxxxx user using Fsecure SSH client. Run xclock to see if you can run GUI. If you are performing the upgrade from a remote location (from India) do not run the Installer from your own PC but use VNC Viewer to connect to a Desktop in the US and then run the upgrade from the US PC. In case of Your Place customers, the normal SSH session is enabled to run GUI Installers and there is no performance hit from any location. You can run the installer without opening any Reflection or VNC viewer.

3) Start “runInstaller” from Disk1 of CD Set which has been downloaded earlier and choose the following options while installation:

a. File Locations:
ORACLE_HOME path=/igold/oracle/product/920
Do not give the actual location of 920 ORACLE_HOME (/xxxxxx/oracle/product/920) here. We are deliberately using “igold” as it helps in patching of cloned instances

b. Select a Product:
Oracle 9i Database

c. Type of Installation:
Enterprise Edition

d. Database Configuration
Software Only

4) Download PatchSet (Patch# 3095277) and unzip it in a temporary directory and run below given cpio command. It will create a new Disk1 directory.
$ unzip 9204_solaris_release.cpio.z
$ cpio -idmv < 9204_solaris_release.cpio
$ cpio -idmv < 9204_lnx32_release.cpio

5) Start “runInstaller” from /xxxxxx/oracle/product/oui directory to install PatchSet files and choose the following options:

a. Files Locations:
Source Path: /Disk1/stage/products.jar
ORACLE_HOME path=/igold/oracle/product/920

b. Choose OUI installation and complete it. Exit the installer, do not choose continue with “Next Install”. You have to restart installer.

c. Start installer again with the same File Location values as given above and choose PatchSet installation.

6) Relink Oracle executables to remove igold dependencies and verify that libraries being referenced after relinking are from correct ORACLE_HOME location and not from igold link.
$ cd $ORACLE_HOME/bin
$ ./relink all
$ ldd lsnrctl
$ ldd sqlplus
$ ldd oracle

7) Copy initXXXXXX.ora and ifilecbo.ora files from old ORACLE_HOME to new 920 ORACLE_HOME. Do not change the value of any initialization parameter; this will be done in later steps.
$ cd $ORACLE_HOME/dbs
$ cp ../../817/dbs/initXXXXXX.ora .
$ cp ../../817/dbs/ifilecbo.ora .

8) Perform the DB upgrade from 8.1.7 to 9.2.0 using the manual scripts as given below. These upgrade scripts may take 4-5 hours to complete. “startup migrate” statement will throw “ORA-32004: obsolete and/or deprecated parameter(s) specified” exception. At this point of time ignore this error it will be taken care in later steps. Once the upgrade scripts complete, query “dba_registry” table to make sure that Oracle components have been upgraded.
$ sqlplus “/ as sysdba”
SQL> startup migrate
SQL> spool db_upgrade.log
SQL> @?/rdbms/admin/u0801070.sql
SQL> spool off
SQL> spool dbcmp_upgrade.log
SQL> @?/rdbms/admin/cmpdbmig.sql
SQL> spool off
SQL> SELECT comp_name, status, substr(version,1,10) as version from dba_registry;
Oracle9i Catalog Views VALID
Oracle9i Packages and Types VALID
JServer JAVA Virtual Machine VALID
Oracle9i Java Packages VALID
Oracle XDK for Java UPGRADED
Oracle interMedia Text LOADED
Oracle9i Real Application Clusters INVALID
Oracle interMedia LOADED
Oracle Spatial LOADED

9) Shutdown the instance, start it up again and execute utl_recomp package to recompile invalid objects using parallel workers. This may take 3-4 hours.
a. SQL> shutdown immediate
b. SQL> startup
c. SQL> @?/rdbms/admin/utlrcmp.sql
d. SQL> exec utl_recomp.recomp_parallel(6)

10) Upgrade Oracle Text, Oracle interMedia and Orace Spatial as given in the following steps. Run “catpatch.sql” script to complete the installation of patchset. Then query dba_registry table to verify the upgrade.
a. Upgrade Oracle Spatial
SQL> spool spatial_upgrade.log
SQL> connect / as sysdba
SQL> @?/md/admin/mdprivs.sql
SQL>connect mdsys/mdsys
SQL> @?/md/admin/c81Xu9X.sql
SQL> spool off
b. Upgrade Oracle interMedia
SQL> spool intermedia_upgrade.log
SQL> connect / as sysdba
SQL> @?/ord/im/admin/imdbma.sql
SQL> @?/ord/admin/u0801070.sql
SQL> @?/ord/im/admin/u0801070.sql
SQL> connect ordsys/ordsys
SQL> @?/ord/im/admin/imchk.sql
SQL> spool off
c. Upgrade Oracle Text
SQL> spool text_upgrade.log
SQL> connect / as sysdba
SQL> @?/ctx/admin/s0900010.sql
SQL> connect ctxsys/ctxsys
SQL> @?/ctx/admin/u0900010.sql
SQL> connect / as sysdba
SQL> @?/ctx/admin/s0902000.sql
SQL> connect ctxsys/ctxsys
SQL> @?/ctx/admin/u0902000.sql
SQL> spool off
d. Complete Patchset
SQL> shutdown immediate
SQL> startup migrate
SQL> spool patch.log
SQL> @?/rdbms/admin/catpatch.sql
SQL> spool off
e. Compile invalids
SQL> shutdown immediate
SQL> startup
SQL> exec utl_recomp.recomp_parallel(4)
f. Verify the upgrade
SQL> SELECT comp_name, status, substr(version,1,10) as version from dba_registry;
Oracle9i Catalog Views VALID
Oracle9i Packages and Types VALID
JServer JAVA Virtual Machine VALID
Oracle9i Java Packages VALID
Oracle XDK for Java VALID
Oracle interMedia Text VALID
Oracle9i Real Application Clusters INVALID
Oracle interMedia VALID
Oracle Spatial VALID

11) Copy tnsnames.ora and listener.ora files from TNS_ADMIN directory of old ORACLE_HOME (817) to TNS_ADMIN directory of new ORACLE_HOME (920) and change references of 817 ORACLE_HOME to 920 ORACLE_HOME. Then start DB listener and make sure that “tnsping” works.

12) Update initXXXXXX.ora and ifilecbo.ora files as given below. These values have been taken from Note# 216205.1.

a. Update the following parameters in initXXXXXX.ora file:
Set the value of “aq_tm_processes” to the original value which was there before starting the upgrade
Set the value of “job_queue_processes” to the original value which was there before starting the upgrade
Set “compatible = 9.2.0”
Set “_system_trig_enabled = TRUE”
Set “log_archive_start = true”

b. Add the following new parameters in initXXXXXX.ora file:
nls_length_semantics = BYTE
pga_aggregate_target = 1000M
workarea_size_policy = AUTO

c. Comment the following parameters in initXXXXXX.ora as these are obsoleted in 9iR2 database:

d. Update the following parameter in ifilecbo.ora file”
Set “optimizer_features_enable = 9.2.0”

e. Comment the following parameters in ifilecbo.ora as these are obsoleted in 9iR2 database:

13) Restart the database and alter it in arhivelog mode. Make sure that you do not get “ORA-32004: obsolete and/or deprecated parameter(s) specified” error while starting the database. If you get this error, check the erroring parameter name in alertXXXXXX.log file and comment that in init.ora.
$ sqlplus “/ as sysdba”
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> shutdown immediate
SQL> startup

14) Execute the post-install scripts
SQL> conn / as sysdba
SQL> @?/javavm/install/jvmsec3.sql
SQL> @?/javavm/install/jvmsec5.sql
SQL> conn apps/
SQL> @/patch/115/sql/adgrn9i.sql apps

15) Apply APPS patches required for 9iR2 database.

a. Apply FND Patch# 2838093
b. If adpatch hangs while executing “adinvset.pls” for more than 10 minutes then you may be hitting Bug# 2651057. Apply Patch# 2651057 to fix the issue.
c. Apply AD Patch# 2361208

16) Complete the upgrade and start APPS services

a. Run “Re-create grants and synonyms” from adadmin
b. Run “Compile APPS schema” from adadmin
c. Start all APPS services
d. Expire the blackout
e. Perform health checks and release the instance to the customer
f. Rename old ORACLE_HOME as 817_old
$ mv /xxxxxx/oracle/product/817 /xxxxxx/oracle/product/817_old

Limit user sessions in Oracle

Hampus Linden - Mon, 2007-07-30 15:55
Developers sometimes enjoy configuring their JDBC datasources after their own likings, testing a performance issue by having a gazzillion threads to the database "just in case we need them".
Well in my opinion, if you need what is obviously too many threads, then there is a coding issue.
So to make people think twice before flooding a service with connections I've started limiting the number of sessions they are allowed to have.
Easy as always to do in Oracle. First we allow resource limits by setting the resource_limit to true, then we simply create a profile and assign that to the user. The profile can set the limit of how many session a user is allowed to have.

A little demonstration;
oracle@htpc:~$ rsqlplus "/ as sysdba"

SQL*Plus: Release - Production on Mon Jul 30 21:56:12 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> show parameter resource_limit

------------------------------------ ----------- ------------------------------
resource_limit boolean FALSE
SQL> alter system set RESOURCE_LIMIT=true scope=both;

System altered.

SQL> create profile sesslimit limit sessions_per_user 2;

Profile created.

SQL> create user fish identified by fish123
2 default tablespace data profile sesslimit;

User created.

SQL> grant create session to fish;

Grant succeeded.

SQL> connect fish/fish123
SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP and Data Mining options
-- I'll start two sessions in another terminal.
SQL> connect fish/fish123
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit


Integer Series Generators: Multiple Integer Series (New SQL Snippets Tutorial)

Joe Fuda - Sun, 2007-07-29 13:30
The SQL Snippets "Integer Series Generator" section has been expanded to include new topics covering techniques for generating multiple integer series in a single query. Unlike previous topics which only demonstrated queries that created a single integer series, like 1,2,3,4, the new topics show how a query can generate a series like 1,2 for one row and 1,2,3 for another row in the same query.

String to Rows: Hierarchical Methods (New SQL Snippets Tutorial)

Joe Fuda - Sun, 2007-07-29 13:30
A new, hierarchical technique for converting strings to rows has been added to the SQL Techniques Tutorials - String to Rows tutorial in SQL Snippets.

Integer Series Generators: CONNECT BY LEVEL Method (Updated SQL Snippets Tutorial)

Joe Fuda - Sun, 2007-07-29 13:30
This tutorial has been updated to include a discussion of how hierarchical queries that do not have a CONNECT BY condition with PRIOR behave. A sample query that uses "PRIOR DBMS_RANDOM.VALUE IS NOT NULL" to make the CONNECT BY LEVEL technique conform to documented requirements has also been added.

Accessing Custom Forms after Upgrading To R12

Fadi Hasweh - Sun, 2007-07-29 03:23
I was checking customization upgrade subject since we faced it and I found this interesting note (451934.1)

The note is talking about how to make custom forms that where created and working fine on 11i to work the on R12.
And according to the note
"All custom forms that were build and working fine on releases 11i are designed and compiled using the Form Builder 6i, while the developer version for R12 is 10G.So you need to open the custom forms in Form Builder release 10G and compile them and save then upload them again."

I did not try the solution yet but thought of sharing it since many were asking bout this subject lately.
Also i found the (Custom forms does not work after upgrade to 12i) forum helpful

Data consistency and accuracy

Peter Khos - Fri, 2007-07-27 17:49
Earlier this week, a private contractor working for the City of Burnaby (a suburb of Vancouver) dug their backhoe into a high pressure oil pipeline (a video of incident) sending about 1,400 barrels of crude oil high into air covering the neighbourhood and eventually leaked out into the Burrard Inlet. It took half of an hour before the pipeline was switched off and two hours before the oil boom Peter Khttp://www.blogger.com/profile/14068944101291927006noreply@blogger.com0

11.0.3 to Upgrade

Madan Mohan - Fri, 2007-07-27 04:09
Production Cut-over Checklist
10th Novembert, 2006

Environment Name:

Prepared By:
Madan Mohan K

1.0 Pre-Upgrade Checks

· OS user for RDBMS
· Group for or11iuat
· OS user for APPLMGR
· Group for ap11iuat
· OS utilities to be in PATH
· Java version
· Perl version
· Zip version
· Unzip version
· Oracle Inventory file
· Oracle Inventory permissions
· Add to .profile for all Unix users
· Permission for $APPLCSF
· X-server installed
· Stage area is installed

ar cc make ld zip unzip perl java javac
ulimit -d 1048576
Xvfb installed
2.0 Pre Upg tasks on 11.0.3 instance

2.0.1. Apply the Patch 1268797
cd $FND_TOP/patch/110/sql
sqlplus / @afstatrn.sql True
2.0.2. Apply the TUMS patch 3422686
cd $AD_TOP/patch/110/sql
sqlplus apps/app @adtums.sql /u10/app/convr11/tmp
2.0.3 Set the File attachments

2.0.4 . Submit “Purge Concurrent
Requests” with a retention
period of 7 days

2.0.5. Check for rows in
Select count(*) from apps. ALR_ACTION_HISTORY;
If No rows then Apply the Patch 451137
2.0.6. Disabled all the Custom Triggers and

2.0.7 Disabled Database Audit trial in init.ora
Audit_trial= false or comment out the line.
2.0.8 Validate and Compile Apps Schema
Use adadmin Utility
2.0.9 Backup the INVALIDS in a Table
Create table BEFORE_PREUPG_INVALIDS as select * from dba_objects where status=’INVALID’;
2.0.10. Make a note of passwords for following
Oracle user - APPS
Oracle user - SYSTEM

3.0 Pre Upgrade Tasks on 11i Instance

3.0.1. Run Rapid install on DB tier
./rapidwiz –servername
3.0.2. Run Rapid install on MT tier
./rapidwiz –servername
3.0.3 Apply the Forms Patch set 18

3.0.4 Install software on DB tier (4163445)
3.0.5 Install Latest Opatch 2617419 on DB Tier
Unzip *2617419*.zip in $OARCLE_HOME
3.0.6 Applied Database patch 4192148 for Import

3.0.7 Update the .profile in MT and DB Tiers .
On MT :
- /<>/applmgr/r11i<>appl/APPSORA.env
- $ORACLE_HOME/ R11i<> _ .env

3.0.8 InstallPrep.sh script as per Note 189256.1

3.0.9 Configured tnsnames.ora on MT to connect to 8.1.7 database of 11.0.3 instance

3.0.10. Login to MT tier and perform following pre
upgrade tasks
Verify custom index privileges - Done
cd $APPL_TOP/admin/preupg
sqlplus apps/cl_11i_gbook_sta afindxpr.sql applsys
sqlplus apps/cl_11i_gbook_sta afpregdi.sql

Make sure orders are in a supported status - Done
cd $ONT_TOP/patch/115/sql
sqlplus apps/cl_11i_gbook_sta @ontexc07.sql

Review Item Validation Org settings – Done
cd $ONT_TOP/patch/115/sql
sqlplus apps/cl_11i_gbook_sta @ontexc05.sql

Close open pick slips/picking batches or open deliveries/departures – Done
cd $WSH_TOP/patch/115/sql
sqlplus apps/cl_11i_gbook_sta @wshbdord.sql

Validate inventory organization data – Done
cd $WSH_TOP/patch/115/sql
sqlplus apps/cl_11i_gbook_sta @wshpre00.sql

Review cycles that may not be upgraded – Done
cd $ONT_TOP/patch/115/sql
sqlplus apps/cl_11i_gbook_sta @ontexc08.sql

Clear open interface tables – Done
cd $APPL_TOP/admin/preupg
sqlplus apps/cl_11i_gbook_sta @
Run above sql for each of the following scripts:
Requisitions Open Interface (pocntreq.sql)
Purchasing Documents Open Interface (pocntpoh.sql)
Receiving Open Interface (pocntrcv.sql)

Import and purge Invoice Import Interface expense reports and invoices – Done
cd $APPL_TOP/admin/preupg
sqlplus apps/cl_11i_gbook_sta @apuinimp.sql

Diagnose problems in the data – Done
cd $AR_TOP/patch/115/sql
sqlplus apps/cl_11i_gbook_sta @ar115chk.sql

Identify potential ORACLE schema conflicts - Done
cd $APPL_TOP/admin/preupg
sqlplus applsys/cl_11i_gbook_sta @adpuver.sql
3.0.10 Apply Family Consolidated Upgrade Patch for Financials - 3993353 with preinstall=y

3.0.11 Shutdown Mid Tier services
and Database for 11.0.3
Instance & Bkup the 11.0.3 DB

4.0. Database Upgrade using Export /
Shutdown the 11.0.3 MID Tier Services

Login to 11.0.3 Database and Note the global_name
on Source Instance.
Select global_name from global_name;

Extracted following files which are used for export / import from patch 4872830
adclondb.sql – Ran this script to generate adcrdb.sql. adcrdb.sql contains create database and create tablespace which needs to be executed on 11i
sqlplus SYSTEM/SYSTEM_r11clone @adclondb.sql 9
Ran auque1.sql, which generates a script called auque2.sql. This is required since Advanced Queue settings are not propagated in Export / Import process. auque2.sql needs to be executed on Target Instance.
auexpimp.dat – Parameter file for Export and Import
Export 11.0.3 database using following par file
exp parfile=exp_parameter.dat


5.0. Import 11.0.3 database to 11i

Login to 11i Database Tier

Copy the initR11CLONE.ora from 11.0.3 instance to initR11i.ora on 11i and modify the directoey locations for controlfiles, all dump destinations, and also specify APPS_UNDO for undo tablespace

Updated Global_name for this Database to the value on 11.0.3
alter database rename global_name to 'R11CLONE.WORLD';

Create the apps user as

create user apps identified by cl_11i_gbook_sta default tablespace applsysd temporary tablespace

Setup the Enterprise Edition for Oracle 9i
These scripts create objects required by the RDBMS and other technology stack components on the database server
Login to 11i Database Tier
Created folder $ORACLE_HOME/appsutil/admin
Copied addb920.sql, adsy920.sql, adjv920.sql, admsc920.sql, and adgrants.sql from $APPL_TOP/admin to $ORACLE_HOME/appsutil/admin

sqlplus /nolog
connect SYSTEM/system_r11iuat
@addb920.sql -- Sets up database SYS schema

sqlplus /nolog
connect SYSTEM/system_r11iuat
@adsy920.sql -- Sets up database SYSTEM schema

sqlplus /nolog
connect SYSTEM/system_r11iuat
@adjv920.sql - Installs Java Virtual Machine

sqlplus /nolog
connect SYSTEM/system_r11iuat
@admsc920.sql FALSE CTXD TEMP $ORACLE_HOME/ctx/lib/libctxx9.so

Check for output of dba_registry is as given below

col comp_name for a40
col version for a15
select comp_name, version, status FROM dba_registry;

Imported 11.0.3 database into 11i using following parameter file

Script imp_time_taken
imp parfile=imp_parameter.dat


Run preparatory scripts

sqlplus /nolog
connect SYSTEM/system_r11clone
@adgrants.sql APPLSYS -- Grants necessary privileges on selected SYS objects.

Applied database patch to create / update OWS packages
Login to 11i Database Tier 3835781
mkdir $ORACLE_HOME/appsutil/admin/OWS
cd $ORACLE_HOME/appsutil/admin/OWS
cp /R11isit/staging/patches/*3835781* .

Installed XML Parser for PL/SQL
Login to 11i Database Tier
mkdir $ORACLE_HOME/appsutil/admin/xmlparser
cd $ORACLE_HOME/appsutil/admin/xmlparser
cp $COMMON_TOP/util/plxmlparser_v1_0_2.zip .
unzip plxmlparser_v1_0_2.zip - This file creates several subdirectories in the current location
cp $COMMON_TOP/util/XSU12_ver1_2_1.zip .
unzip XSU12_ver1_2_1.zip - This file creates subdirectory - OracleXSU12
cd /R11iuat/db/9.2.0/appsutil/admin/xmlparser/lib/java
loadjava -user apps/cl_11i_gbook_sta -r -v xmlparserv2.jar
loadjava -user apps/cl_11i_gbook_sta -r -v xmlplsql.jar
cd ../sql
cat load.sql sqlplus apps/cl_11i_gbook_sta
cd /R11iuat/db/9.2.0/appsutil/admin/xmlparser/OracleXSU12/lib
sh oraclexmlsqlload.ksh
mkdir $ORACLE_HOME/appsutil/admin/java
cd $ORACLE_HOME/appsutil/admin/java
cp /R11iuat/oradata/R11iEXP/applmgr/r11iexpcomn/java/xmlparserv2.zip .
loadjava -user apps/cl_11i_gbook_sta -r -v xmlparserv2.zip

Re-compile Invalids
sqlplus “/ as sysdba”
create table invalids_after_db_backup as select * from dba_objects where status = ‘INVALID’;

Set up tablespaces
Increased SYSTEM tablespace size to 9 GB before you run the scripts given below
cd $AD_TOP/patch/115/sql
sqlplus APPS/cl_11i_gbook_sta @adgncons.sql apps cl_11i_gbook_sta APPLSYS
Gathered database information
Login to 11i Mid tier
cd $APPL_TOP/admin/preupg
sqlplus apps/cl_11i_gbook_sta @adupinfo.sql

Ran preparatory script on Administration node
Login to 11i Mid tier
cd $APPL_TOP/admin
sqlplus system/system_r11clone @adsysapp2.sql system_r11clone

6.0 Auto Upgrade Tasks
Login to 11i Application Tier
o Run Autoupgrade using adaimgr

6.0.1 Post-Autoupgrade tasks
Login to 11i Database Tier
Re-compile Invalids
sqlplus “/ as sysdba”
create table invalids_after_autoupgrade as select * from dba_objects where status = ‘INVALID’;

6.0.2 Performed cold Backup of

7.0 Autopatch Tasks
Login to 11i Application Tier
Applied AD.I.4 (4712852)
Applied maintenance pack
cd $AU_TOP/patch/115/driver
adpatch options=nocopyportion,nogenerateportion

Issues faced while running Autopatch are noted in Upgrade log attached to this document below
Ran OATM to move 11.0.3 data to

8.0 Post Autopatch tasks
List of Patches to be applied are included in below file.

DBA Setup activities performed after all patches are applied is listed in the following document

9.0 Clean Up Unwanted Files/Directories

10.0. Health Check & Release the Instance for

Webinar: Release 12 Java Infrastructure

Solution Beacon - Thu, 2007-07-26 14:44
This is another in our Release 12 webinar series, and will be presented live, with the recorded replay available for registered attendees in the near future. This one hour webinar will be presented on 8/8 at 10:30am CDT, and registration is available here.TitleRelease 12 Java InfrastructureAbstractLearn about the new Java infrastructure underlying the Release 12 environment. The new technology

Webinar: Are you Ready for Fusion?

Solution Beacon - Thu, 2007-07-26 14:43
This is another in our Release 12 webinar series, and will be presented live, with the recorded replay available for registered attendees in the near future. This one hour webinar will be presented on August 15th at 10:30am CDT, and registration is available here.TitleAre you Ready for Fusion?AbstractA Practical Guide to What You Should Know For those of you concerned about Fusion's place in your

Webinar: Release 12 Subledger Accounting Engine

Solution Beacon - Thu, 2007-07-26 14:42
This is another in our Release 12 webinar series, and will be presented live, with the recorded replay available for registered attendees in the near future. This one hour webinar will be presented on August 15th at 1:30pm CDT, and registration is available here.TitleRelease 12 Subledger Accounting EngineAbstractWhat it is, What it does, and How to use it. Be in the know by attending this

Choice of desktop OS

Peter Khos - Wed, 2007-07-25 20:10
Back in April of this year, I bought a new Dell AMD desktop which comes with Vista installed. I gave that a twirl for a month and thought maybe I should go with Linux so that I can install Oracle on a "proper" OS and also Vista applications are tough to come by.I am finding that Linux (I chose Ubuntu) has similar problems where I was not able to use the software that comes with my various Peter Khttp://www.blogger.com/profile/14068944101291927006noreply@blogger.com1

Webinar: Release 12 Multi-Org Access Control (MOAC) – An Inside Look

Solution Beacon - Tue, 2007-07-24 15:55
This is another in our Release 12 webinar series, and will be presented live, with the recorded replay available for registered attendees in the near future. The webinar will be presented on 7/25 at 1:30pm CDT, and registration is available here.Title Release 12 Multi-Org Access Control (MOAC) – An Inside Look Abstract Join us as our Solution Architect focuses on Multi-Org Access Control (MOAC),

Webinar: Release 12 Procurement Part I – The Professional Buyer's Work Center

Solution Beacon - Tue, 2007-07-24 15:55
This is another in our Release 12 webinar series, and will be presented live, with the recorded replay available for registered attendees in the near future. The webinar will be presented on 7/25 at 10:30am CDT, and registration is available here.TitleWebinar: Release 12 Procurement Part I – The Professional Buyer's Work CenterAbstractExciting things are happening to the Procurement Suite in

Simple Tutorial for Publishing FSG Reports Using XML Publisher

Solution Beacon - Tue, 2007-07-24 15:50
This simple tutorial will show you how to create a custom FSG Report using XML Publisher.1. Log in to Oracle Applications and select the "XML Publisher Administrator" responsibility (your Applications Administrator will have to grant access to this responsibility).2. Navigate to the Templates page.3. Type FSG% in the Name field and click "Go to query" for the standard FSG template

Remote debugging Code Tester

Jornica - Tue, 2007-07-24 12:04

Quest Code Tester for Oracle (Code Tester) helps you with defining test cases, generating test harnesses and presenting the test results in a structured way. Code Tester does not provide any features to debug your code. If you run into a red light situation when a test case fails, you have discover where the error is located. This means checking inputs and outcomes in order to exclude incorrect setup and incorrect initialization code. And of course checking your code, recompiling your (test) code and login again.

If this does not result into a green light, it is time to debug your code with a development IDE. As a result you have to transfer your test code into your development IDE. Wouldn't it be nice if you could enter debug mode seamlessly: when executing your test case the execution stops at a breakpoint and you can debug your code. The answer is: yes, you can. With SQL Developer you can remote debug your code within a test run.

The linking pin between Code Tester and SQL Developer is the package sys.dbms_debug_jdwp where jdwp stands for Java Debug Wire Protocol. This protocols needs a debugger process i.e. SQL Developer and a debuggee process i.e. Code Tester. The debugger listens for requests from the debuggee i.e. PL/SQL package procedure calls to connect_tcp and disconnect.

Setting up the debuggee
In Code Tester you have to modify the initialization section of your test case. Add the following code
dbms_debug_jdwp.connect_tcp(host => '', port => 4000);
The first parameter is your IP address of the client where the Code Tester IDE runs (as seen from the database server you're connected to). Because I'm running Code Tester and Oracle XE on the same machine, I use the local host address The second parameter is the default port. An alternative for the hard coded IP address is SYS_CONTEXT ('USERENV', 'IP_ADDRESS').

After the test case is executed, switch off remote debugging. Add the following code to the cleanup section:

Setting up the debugger
In SQL Developer login with the same user as Code Tester and right click on your connection, a context menu appears and select the 'Remote Debug' option. A small window with the title 'Debugger - Listen for the JPDA' (Java Platform Debugger Architecture) appears, enter the address or host name where SQL Developer should listen to connect. Use the same IP address as in dbms_debug_jdwp.connect_tcp. Also check if the port is the same.

Before switching to Code Tester again set a breakpoint in your code (and compile your code for debug) otherwise the debugger will not stop at your breakpoint. At last but not at least make sure the user has the debug connect session privilege and the debug any procedure when debugging other users objects.

Debugger meets debuggee
It is time to run your test with Code Tester. SQL Developer will stop on your breakpoint. Note: while debugging your code Code Tester will not respond. After stepping through your code press the resume button in SQL Developer to return to Code Tester. As an example I modified the code of the normal usage test case of the function qctod#betwnstr (see for an explanation and the source code How Quest Code Tester for Oracle can help you get rid of bugs in your PL/SQL procedures). In the picture below SQL Developer hits the breakpoint at line 13. In the data tab you can see all variables and their values.

This example shows how to use remote debugging with Code Tester. Instead of using SQL Developer as debugger you can also use Toad for Oracle or Jdeveloper. And also every front end can be used as debuggee for remote debugging as long the calls to dbms_debug_jdwp can be implemented. Let's start debugging!

I found the following links usefully while writing this blog entry:

An apology to Kevin Closson

Peter Khos - Tue, 2007-07-24 00:00
In my last post, I mentioned that I was going to blog about the spat between Burleson and Lewis but decided not to BUT I left a comment on Kevin Closson's blog referring to the spat. This is definitely the wrong thing to do as if I was not willing to use my blog to comment on, why should I use someone's blog to comment.Kevin, my sincere apologies (please remove all comments I left pertaining to Peter Khttp://www.blogger.com/profile/14068944101291927006noreply@blogger.com1


Subscribe to Oracle FAQ aggregator