Link to home
Start Free TrialLog in
Avatar of mmatharu
mmatharu

asked on

trying to delete oci.dll

I had a bad installation of oracle 9i and i have deleted all the folders and file but one wich is c:\oracle\ora92\bin\oci.dll

and when i try and delete i get a error

"cannot delete oci: Access is denied.
Make sure the disk is not full or write-protected and that the fil,e is not currently in use."

I have deleted all the registery items and stopped all the services that use oracle and still cannot delete them.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the process explorer (link on that page) is a gui version that should do the same job...
Avatar of asifsharaz
asifsharaz

mmatharu

nothing to do seriously just change the file name if the system allows u to change the name of file .then after changing the filename try to delete the file .


HAVE GOOD TIME

ASIF SHARAZ
just restart ur system :-)
these kind of problems will definitely get solved simply by restarting the system..
actually what happens some process will lock the file.. even if u delete registry entries, the process wont get killed.. so once u restart ur m/c, it will get killed and the u can delete the file..

please let me know if this resolves the issue..

bye,
Ravindran
I've found a combination of the above posts work best:
rename the file, then reboot/delete.
Iam still thinking whether rename is needed.. The main reason is that some process did not get killed and was still using the dll.. Once we restart the machine, the process does not exist anymore and hence the dll should be deletable..
i dont know why we really need to rename the file..
>>i dont know why we really need to rename the file..

Just in case a non-Oracle process is locking it.  For example:  IIS can lock certain Oracle files.  When you reboot and IIS re-starts, it can lock the file again.  If the file isn't there, it can't lock it and you can delete it.
If it has locked the file then how will it allow to rename?? this is what is confusing me :-(
It's a windows feature.  You can't delete it but it will let you rename it.
BUT I THINK WE CAN DO IT AS IN MY FIRST POST BY CHANGING THE FILE NAME .IT WILL ALLOW US TO DELETE THE FILE BY CHANGING THE FILE NAME

LET WAIT FOR THE AUTHOR'S COMENT THAT DID HI GOT THE SOLUTION WITH CHANGING THE FILE NAME .HE CAN TELL US AFTER PRACTICALY DOING THIS CHANGING THE FILE NAME,  WEITHER THE SYSTEM ALLOWS HIM TO DELETE THE FILE OR NOT?????
asifsharaz , slightwv , ravindran_eee:
before you start flaming here:

files can indeed be locked by processes so deleting directly is impossible.
the trick to rename the file does work in most cases, but not always, depending on the lock type on the file.

That is why my suggestion uses the process explorer that shows all file locks, so you can see without doubt which process actually locks the file.
rename+delete is for those that don't know how it works, but might be the fastest solution.
Thanks mom/dad/???.....      ;)

oci.dll is a common locked file when manually removing Oracle.  I use the GUI from sysinternals for many things but I've found that it really isn't worth it for the few Oracle dlls that you can't delete.  I'm thinking that oci.dll is locked by a system process that you can't stop.

P.S.
I didn't think rav and myself were even close to a disagreement.....
The only way I have found was to identify the process which locks the file. (Use the tool proposed). Rebooting will not help, a windows process is locking it.

Kill the process (CTRL-ALT-DEL then terminate). Since it is a windows process and necessary for Windows to continue working properly, this will leave you 30seconds to delete it before your system reboots.

Kind of a wierd work-around, but it does work fine.
mariec: iam not sure whether the workaround given by u will work.. bcoz if it is a system process, then u will be getting to error message 'Acces denied' error message while trying to TERMINATE it.. terminating a process is different from killing a process.. probably u will have to kill the process..
i dont know why u call this as the "only way".. i still believe just a reboot will do..
I guarantee it does work for me. I've done it many times on my own computer and other test PCs. I also did TERMINATE the process and did not get an access denied error. Just an error saying that this process is necessary for the system and windows will reboot in 30sec....29...28...

Reboot alone does not help in my case, a windows process locks it right away upon restart. Of course, I might have something specific installed which locks it. Depends on your own environment and programs installed.

In any case, I did specify that this is the "only way" that "I" have found. I didn't say it was universal. You're free to try it.
sorry. Used wrong user... A collegue was using my PC before and didn't logout.

mariec
Stopping the service "Distributed Transaction Cooridinator"  msdtc.exe allowed me to delete the file