<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: to delete a file locked by user in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927784#M71454</link>
    <description>I remmember I've seen this question before and likely somewhere else, quite recently, but I cannot remember where....&lt;BR /&gt;With the chance of repeating myself:&lt;BR /&gt;&lt;BR /&gt;FIRST of all determine WHO is holding the file. Since this is a cluster, it can be one, or more proces(ses) on any node.&lt;BR /&gt;So what you need to do first is&lt;BR /&gt;&lt;BR /&gt;$ PIPE SHOW DEVICE/FILES &lt;DISK where="" file="" resides=""&gt; | SEARCH SYS$PIPE &lt;FILE you="" want="" to="" delete=""&gt;&lt;BR /&gt;&lt;BR /&gt;If the file resides on a directory that includes a logical (or is one itsel), you may use that logical. VMS is intelligent enough to translate ;-)&lt;BR /&gt;&lt;BR /&gt;If you find a line with the user, notify that user that he is required to stop the program or function he's working in.&lt;BR /&gt;If it a batchjob, you have to stop it.&lt;BR /&gt;If it is a detached process, you need to stop it.&lt;BR /&gt;If you find a line of this file but no user mentioned, the file might be installed. You first have to deinstall the file before you can delete it.&lt;BR /&gt;&lt;BR /&gt;Another source is $ ANALYZE/SYSTEM and find out who's accessing the file but you will have to check each process (I think).&lt;BR /&gt;&lt;BR /&gt;Reboot would only be feasable if the file is not in use by anyone, not installed or otherwise in use - NOWHERE in the cluster. Worst case, you would need to reboot each machine.&lt;BR /&gt;Nevertheless: I would not recommend it, and certainly not for this type of issue. If you are really need it deleted, I would strongly syggest to make a crasdump before reboot. That is: of aall the nodes. Afterwards, I'd log a caal at HP to examine the issue, and they would like to have the dumps. &lt;BR /&gt;Therefore, I would want to be absolutely sure that it really is a VMS issue, and not a user's error. Just because of the cost involbed.&lt;/FILE&gt;&lt;/DISK&gt;</description>
    <pubDate>Wed, 21 Sep 2005 13:43:08 GMT</pubDate>
    <dc:creator>Willem Grooters</dc:creator>
    <dc:date>2005-09-21T13:43:08Z</dc:date>
    <item>
      <title>to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927778#M71448</link>
      <description>Hi, &lt;BR /&gt;I am running openvms V 7.3-2 on a 3 node cluster system. I am trying to delete a file however when I give the command&lt;BR /&gt;&lt;BR /&gt;del FILENAME.EXT;1  &lt;BR /&gt;it give the message &lt;BR /&gt;file currently locked by a user and it does  not allow me to delete it. I have tried loggin in from sys admin and deleting. &lt;BR /&gt;&lt;BR /&gt;I also did &lt;BR /&gt;&lt;BR /&gt;set prot o:rwed FILENAME.EXT&lt;BR /&gt;set file /owner=USER (but it gave here file locked)&lt;BR /&gt;&lt;BR /&gt;I was able to rename the file but not delete it.&lt;BR /&gt;&lt;BR /&gt;Please let me know how to go about this problem.Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Nipun&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Sep 2005 08:28:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927778#M71448</guid>
      <dc:creator>nipun_2</dc:creator>
      <dc:date>2005-09-21T08:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927779#M71449</link>
      <description>A process still has that file open. Try&lt;BR /&gt;$ MCR SYSMAN SET ENV/CLUSTER&lt;BR /&gt;SYSMAN&amp;gt; DO PIPE SHOW DEVICE/FILES devicename | SEARCH SYS$INPUT filename&lt;BR /&gt;&lt;BR /&gt;to see which process still has the file open.&lt;BR /&gt;&lt;BR /&gt;You can rename the file because that changes the directory entry not the file.</description>
      <pubDate>Wed, 21 Sep 2005 08:38:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927779#M71449</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2005-09-21T08:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927780#M71450</link>
      <description>Nipun,&lt;BR /&gt;&lt;BR /&gt;"currently locked by another user" simply means that the file is held open by another process in a mode incompatible with the attempted access (in this case DELETE).&lt;BR /&gt;You'll have to wait until that process releases the file, and then try to delete it.&lt;BR /&gt;Regards,&lt;BR /&gt;Kris (aka Qkcl)&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Sep 2005 09:01:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927780#M71450</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2005-09-21T09:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927781#M71451</link>
      <description>&lt;BR /&gt;The term 'locked by other user' really means it. It might be more clear to write that as 'opened by an other stream'. That stream might be idle but it has aquired the right to use the file so it would be wrong to yank away the file. That other user can be the same username, it can even be the same process. For example:&lt;BR /&gt;&lt;BR /&gt;$ open/write x tmp.tmp&lt;BR /&gt;$ dele tmp.tmp.&lt;BR /&gt;%DELETE-W-FILNOTDEL, error deleting U$1:[HEIN]TMP.TMP;1&lt;BR /&gt;-RMS-E-FLK, file currently locked by another user&lt;BR /&gt;&lt;BR /&gt;As replied earlier, you can use SHOW DEV/FILE to find out which process has the file open. You then may have to kill that process to delete the file. In the case of the example above a simple 'close x' will do the trick.&lt;BR /&gt;&lt;BR /&gt;If you want to delete a write accessed file (using RMS) which allows other writers, then you will have to open it with SHR=UPD, then set FOP=DLT and close. Thise will "mark the file for delete". The actual delete will happen when the last accessor closes the file. You may also want to check out the ACP QIO interface for more tricky stuff.&lt;BR /&gt;&lt;BR /&gt;If the write does not allow sharing then you'll have to shoot the writer (process).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Sep 2005 09:15:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927781#M71451</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-09-21T09:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927782#M71452</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You may also find out, that the file is locked by process which is not possible, for some reason, kill by STOP command. Then the reboot is the option. &lt;BR /&gt;&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 21 Sep 2005 12:44:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927782#M71452</guid>
      <dc:creator>Mike Reznak</dc:creator>
      <dc:date>2005-09-21T12:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927783#M71453</link>
      <description>&lt;BR /&gt;Nah, rebooting a VMS cluster (member) is never a reasonable option.&lt;BR /&gt;&lt;BR /&gt;Just not deleting the file would seem far easier. Just rename it and walk away, hoping nobody saw you :-).&lt;BR /&gt;&lt;BR /&gt;If it contains data that needs to be erased, then open it with a program using and ACP QIO with FIB$V_NOLOCK set in FIB$L_ACCTL.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Sep 2005 12:53:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927783#M71453</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-09-21T12:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927784#M71454</link>
      <description>I remmember I've seen this question before and likely somewhere else, quite recently, but I cannot remember where....&lt;BR /&gt;With the chance of repeating myself:&lt;BR /&gt;&lt;BR /&gt;FIRST of all determine WHO is holding the file. Since this is a cluster, it can be one, or more proces(ses) on any node.&lt;BR /&gt;So what you need to do first is&lt;BR /&gt;&lt;BR /&gt;$ PIPE SHOW DEVICE/FILES &lt;DISK where="" file="" resides=""&gt; | SEARCH SYS$PIPE &lt;FILE you="" want="" to="" delete=""&gt;&lt;BR /&gt;&lt;BR /&gt;If the file resides on a directory that includes a logical (or is one itsel), you may use that logical. VMS is intelligent enough to translate ;-)&lt;BR /&gt;&lt;BR /&gt;If you find a line with the user, notify that user that he is required to stop the program or function he's working in.&lt;BR /&gt;If it a batchjob, you have to stop it.&lt;BR /&gt;If it is a detached process, you need to stop it.&lt;BR /&gt;If you find a line of this file but no user mentioned, the file might be installed. You first have to deinstall the file before you can delete it.&lt;BR /&gt;&lt;BR /&gt;Another source is $ ANALYZE/SYSTEM and find out who's accessing the file but you will have to check each process (I think).&lt;BR /&gt;&lt;BR /&gt;Reboot would only be feasable if the file is not in use by anyone, not installed or otherwise in use - NOWHERE in the cluster. Worst case, you would need to reboot each machine.&lt;BR /&gt;Nevertheless: I would not recommend it, and certainly not for this type of issue. If you are really need it deleted, I would strongly syggest to make a crasdump before reboot. That is: of aall the nodes. Afterwards, I'd log a caal at HP to examine the issue, and they would like to have the dumps. &lt;BR /&gt;Therefore, I would want to be absolutely sure that it really is a VMS issue, and not a user's error. Just because of the cost involbed.&lt;/FILE&gt;&lt;/DISK&gt;</description>
      <pubDate>Wed, 21 Sep 2005 13:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927784#M71454</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2005-09-21T13:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: to delete a file locked by user</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927785#M71455</link>
      <description>thanks for your responses. I renamed the file and somehow next day I was able to delet the renamed file.&lt;BR /&gt;&lt;BR /&gt;Nipun</description>
      <pubDate>Thu, 29 Sep 2005 08:35:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/to-delete-a-file-locked-by-user/m-p/4927785#M71455</guid>
      <dc:creator>nipun_2</dc:creator>
      <dc:date>2005-09-29T08:35:21Z</dc:date>
    </item>
  </channel>
</rss>

