How to delete clearcase views created by other users?
Asked Answered
M

1

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?

Mesentery answered 20/3, 2012 at 6:45 Comment(1)
I have edited my answer to reference some perl script which will do the removal job nicely.Input
I
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"

Input answered 20/3, 2012 at 6:47 Comment(6)
Again: those operations are for ClearCase admin only.Input
You can find a free script that covers all steps mentioned by VonC. Google 'rmview.pl'Bunt
@TamirGefen: yes, that script is in SO question #4318779. My answer in that same question (nuke_view.pl) is a simpler version of it.Input
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.).Dehaven
@Input Not only for the ClearCase admin. If you can su or login as the user who created it you can delete it.Greedy
@JuanJimenez I agree. You can tell I was doing that mainly from Windows ;)Input

© 2022 - 2024 — McMap. All rights reserved.