Cleartool commands in CCRC server side? - clearcase

Am using Clearcase Remote Client(CCRC) and do not have admin rights. Original Clearcase supports 'cleartool' command line interface where as CCRC uses 'rcleartool'. Now, there are some trigger scripts to be placed at the vob level by the admin. Whether at the server side, 'cleartool' commands will work or 'rcelartool'? Only for the client it will be'rcleartool' instead of 'cleartool'?

there are some trigger scripts to be placed at the vob level by the admin.
That would use the mktrtype command, which is a cleartool only command (not rcleartool version)
Even the client-side mktrigger has no rcleartool equivalent.
On the server side, an admin would have access to cleartool and can use those two commands.

It is especially important to note that -- in the case of web and automatic views -- triggers do not execute on the "client" host. They execute on the WAN server. This places a number of limitations on what the triggers can do. For example, all interaction has to be through "clearprompt" commands as interactive triggers are not otherwise supported in web and automatic views.
TO directly answer the question as I read it, the triggers would
have to be placed using cleartool commands at the WAN server or some other LAN client.
need to use cleartool commands (or some other LAN-client API) to query ClearCase and not "rcleartool."
would need to ensure that any interactive elements detect they are running beneath the WAN server (CCASE_WEB_GUI EV set to 1), and use clearprompt as appropriate.

Related

Set clearcase config spec and update snapshot view that exists on another machine

I need to create a simple script (batch, python etc.) which I can run from my windows machine that will set the config spec and update the snapshot view that exists on some other machines.
Is there a clearcase command that do that ?
Or should I use psexec or something similar that will run the command on each machine ?
Thanks
There are two issues:
how to contact and run remote commands on other machines?
Considering recent Windows 10 come with SSH integrated with Git for Windows, or even OpenSSH server, you could use that for other Linux machines.
For other Windows machines, psexec or winrs are possible alternatives (See also WMI or ControlUp).
But unless you can open a remote session as admin, you won't probably have access to the snapshot view, which could be created in the Windows User profile (protected).
what ClearCase command to run?
Probably cleartool setcs (I mentioned here a snapshot view would always be updated after a setcs)

Reformat Load fails in Clearcase 7.1.26

This is a follow on from op - Moving Vobs between Win and AIX
Due to the aix and win vob servers sharing resources (common CC reg & Common Admin PVOB on the Aix box) we need to amalgamate these vob servers onto the AIX server as a precursor to our ultimate move to new servers at CC8.
on the Win VOb Server we have locked the vob, run vob_siddump then a reformat dump of the vob.
Then using xcopy we copied the dumped vob.vbs from Windows to AIX vob server run the fix_prot on the new server.
But when we run the reformatvob -load it goes through it's steps Shows "Loader Done" then shows the following errors
Error from vob database /vobstore/vobs/vobname.vbs.
Error Trouble Opening the VOB Database /vobstore/vobs/vobname.vbs,
Error Trouble Loading versioned object base /vobstore/vobs/vobname.vbs.
Because of the shared registry is this due to the existing registry entry and we need to unregister and then rmtag before registering and tagging fresh or do we need to do anything further?
Clearcase logs on aix vob server show:
DB Log - Error process not running on registery specified hostname (old win vob server)
Vob Log - shows unix UID and GID messange and Warning unable to verify mount options in vob tag registry Clearcase Object not found
David, there are a few things you need to do here:
unregister the VOB and remove all the tags that refer to the old server
reregister and retag the vobs at the new location.
If you can't register the VOB, run fix_prot -r -root ... to reset the ownership and try again.
run vob_sidwalk to remap object ownership.
run it again with -recover_filesystem to reset container ownership. Alternatively run checkvob -pool -protections -fix -force {vob storage dir}.
The last step really needed to be started on the Windows side before this started. Essentially, you needed a sid dump file to turn into the map file that the sidwalk needs (unless you want to remap everything to the VOB owner...)
The complete procedure to follow is at Moving VOBs between Operating system types You may want to start fresh from there if you still have the VOB located in the old location.

How to Create a Dynamic view in ClearCase 8 on Machine where I dont have ClearCase Server installed?

I need to create a Dynamic view on a machine where I have installed only ClearCase 8.0 client. I have ClearCase 8.0 server installed on another machine and my requirement is to have dynamic view on both server and client to be in sync. on Server i have already created the Dynamic view but not able to create the same(may be with same name) on Client machine.
This is basically required to execute the lsactivity command using the cleartool command to get the list of files associated with the specific activity and then I need to fetch only those files from the server repository to my snapshot view which is on client machine.
but not able to create the same(may be with same name) on Client machine.
This is normal: the view registry contains is based on the name of the views as id.
You should be able to start your dynamic view on the client if the view storage is accessible from said client (and you are on a LAN, not WAN).
If not, the easiest way to go forward is to create a second dynamic view, with a different name but with the same config spec.
As they are both dynamic views, they will be in sync.

is it possible execute a perl script with admin rights or as a specific user?

I'm writing a perl script in which I've to shutdown my mssql server ,do some operation and then I've to restart it.I know 1 way is to use netstat to stopt the service but I cann't use that. So I tried installing DBI and DBD::ODBC module.
More info here :Shutdown MSSQL server from perl script DBI
But when I trying to shutdown my server using this command
$dbh->prepare("SHUTDOWN WITH NOWAIT ");
It's not working for me :
I got this response from the community
SHUTDOWN permissions are assigned to members of the sysadmin and serveradmin fixed server roles, and they are not transferable. I'd consider it unlike(hopefully) that perl is run with this rights.
So please tell me is there a way to run the above command as these users ? or what can I do other than this . Note that I have a constraint tha tI cann't simply stop it as windows service.
If the scripts are executed through a web browser then the user executing the scripts will be defined by the web server. It will probably not be a good idea to fiddle with this user. Just leave things as they are.
What you can do is to create a Perl script that is being run by a privileged user on a consistent basis with CRON.
This script being run by CRON can check for specific content like a file which has been written by a script where the user executing the script has lesser privileges.
So the way it could work is as follows:
You execute browser.cgi through a browser to do a specific task.
browser.cgi writes instructions to a file.
Every 1 minute priveleged.cgi executes via CRON. (The root user could execute priveleged.cgi)
priveleged.cgi reads the file browser.cgi has written for instructions and starts and stops services according to the instructions.

How to load two vobs in a view where both vobs are in different registry and vob servers?

I would like to know:
How to Load two vobs in two different views where both vobs are in different registry and vob servers in a single client windows machine?
Different registry??? I dont think thats possible, because in the first place the View will not be the same across different registry.
Different VOB server in the same registry is not an issue, just load it normally.
Maybe I misunderstood your problem.
You need:
to pick one registry server
declare (mktag and register) the other vob from the other registry server in the first one
make sure the global path of the other vob is accessible from your client and from the first vob server (Windows to Unix can work, with, for instance, Samba. But if your VOB server, the one that you pick, is a Unix one, it won't be able to access VOB managed by a Windows Vob server)
Note: the hard part is to mktag and register the other vob in your registry server: you cannot do it in command line, because it will try to modify some files in the vob storage (which your first registry server has no right to do)
You can however do it graphically:
launch ccadminconsole.msc
Select the 'Registry' section:
create a new VOB object

Resources