Thursday, May 14, 2009

Determining which process has locked a .dll

Working in a windows environment I occasionally run into an issue with a .dll that I'm trying to delete being locked by another process. I see this frequently when trying to remove files from my target system before a clone. There are a couple of ways you can determine which process has the .dll locked. A quick command line way to do it is tasklist /m <.dll in question>.
For instance tasklist /m CORE40.dll.

If the .dll is locked I would see output such as the following:
Image Name PID Modules
========================= ======== ====================
msdtc.exe 1152 CORE40.dll

You can also check out Metalink Note 454040.1 for a script (prepatch.bat) that will identify similar information for you.

Friday, January 23, 2009

Recreating Global oraInventory

I ran into a situation recently in one of our 11i environments where the Global oraInventory was missing. A missing oraInventory can cause issues when applying patches, so I wanted to correct the issue proactively. Luckily the Local oraInventory was still intact. Looking on Metalink I found Note: 295185.1 which describes how you can recreate the Global oraInventory. The note talks about downloading a patch, but more than likely you already have OUI 2.2, so you probably won't need it.

The steps are pretty simple:
1. Source your Applications environment file.
2. Change to your $IAS_ORACLE_HOME/appsoui/setup directory.
3. Execute the perl script "perl OUIsetup.pl"