Re: File Locks...
From: name (nospam_at_user.com)
Date: Sat, 3 Apr 2004 00:36:05 -0500
Real world association is a regular brick office with locked
file cabinets during owner determined hours.
Car insurance whatever.
> " temporarily stopOracle and Java/JRun services "
Above should still give you read access.
Stopping/killing may ultimatively restore write access.
If the paused process is still running, it could be the only
one set to unlock upon closing/stopping.
On newer systems there may be some function sharing
among "your own" dlls going on. But the "service" and
hence "security" provider will not allow circumvention
(writing to or moving files which it relies on) by pausing
log or selectively killing dependencies.
A simple word or excel file/macro/vba when in use
should warn you when an "outsider" tries to "mess" with it.
Why should this not be the case for a "service"
on Windows, Unix, Linux, or Solaris.
E.G. firewalls logs can be "copied" while in use when using
wsh, however most "packaged" software
(backup,anti-virus,disk drive CD, etc.) will not touch it,
and report it as "left out" while busy.
Locks are pretty strong and useful. Take a shell extension
that has a copy hook for explorer.exe.
You would have to reboot into dos to update to a newer version.
There is no other way of "unloading" them. And then,
they are meant to provide a certain functionality automatically.
"to move and archive their logs "
You could autostart a wbem script to monitor file change in a dir
(detection script) for e.g. a log that copies over in real time
or upon time/volume intervals.
I think even on Windows2003 Server they would call this a shadow service
and as well needed a user interfacing.
As for regular locks, those on your door.
There usually insurance is paid for "removed" locks only because
best practice accepted agreements throughout cultures and places stipulate
that the "remover" may have to go for effects and aftermath into jail.
Most late OSes and Services are pretty sophisticated and
stretched over the process timeline and don't want to be disturbed.
And there are very few people and companies who get away with
constantly shaking an apple tree to get bigger fruits.
I understand that your situation may be a hard for you.
But a decision how far to go, will even be harder.
And congratulation you entrusted the wsh community with your question.
"Phil Strack" <email@example.com> wrote in message
> Hi All-
> I'm trying to find out if there is a way that a script can identify and
> remove a file lock condition. I have several scripts that temporarily stop
> Oracle and Java/JRun services to move and archive their logs but,
> have problems with files being locked and in use. I have walked through
> script processes manually and have also encountered the lock condition but
> have been unable to identify the source. I've run some lock detection
> to determine what is imposing the lock condition and have added additional
> checks to query all of the services and processes that the services spawn
> and kill them in order to work around the locking condition but, these
> don't have scripting interfaces or CLI's I can incorporate into a script.
> The platform is Windows 2000 (and a couple of Win 2003) Servers.
> Thanks for any guidance you might be able to provide.