6

My friend who recently left our organisation also left his ClearCase view undeleted.
Now we wanted to delete it.

I was trying to delete but it did not allow. It said:

Unable to remove "\\hostname\viewsharefolder\Viewname.vws" 
Operation not permitted

Can administrator only delete his views?

If I deleted the (.vws) folder associated with view, for ex: "Components_int.vws", will it be enough?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230
  • I have edited my answer to reference some perl script which will do the removal job nicely. – VonC Mar 20 '12 at 07:21

1 Answers1

11

Yes you can (for any view, snapshot or dynamic, UCM or base ClearCase).

You also can remove it without ever accessing it. (So removing the view storage isn't enough, or even necessary)

If you still have access to the view storage:

cleartool rmview theViewToRemove

If there is any access/right issue when trying to remove said view:

cleartool lsview -l theViewToRemove # get its uuid
cleartool rmtag -view theViewToRemove
cleartool unregister -view -uuid uuid_of_viewToRemove

That second solution is very handy in that you don't need access to the view storage.
You simply remove reference to that view in the central registry of ClearCase (specifically the view_object and view_tag files of your ClearCase registry server)


Tamir Gefen mentions in the comment the IBM script rmview.pl, which is also mention in the SO question "Delete ClearCase Views Script".

A simpler script is in my answer of that same question: "muke_view.pl"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Again: those operations are for ClearCase admin only. – VonC Mar 20 '12 at 06:52
  • You can find a free script that covers all steps mentioned by VonC. Google 'rmview.pl' – Tamir Gefen Mar 20 '12 at 07:10
  • 1
    @TamirGefen: yes, that script is in SO question http://stackoverflow.com/questions/4318279/delete-clearcase-views-script. My answer in that same question (`nuke_view.pl`) is a simpler version of it. – VonC Mar 20 '12 at 07:22
  • 1
    They can also work for a non-admin user if, for example, you were to lose the view information accidentially (e.g., hard disk crash, system restore, etc.). – Travis Sep 16 '12 at 20:44
  • @VonC Not only for the ClearCase admin. If you can su or login as the user who created it you can delete it. – Juan Jimenez Apr 14 '23 at 13:14
  • 1
    @JuanJimenez I agree. You can tell I was doing that mainly from Windows ;) – VonC Apr 14 '23 at 14:36