Swapping your Caliber server between databases.

Occassionally, I have found it useful to create more than one versant database for Caliber (for testing, etc) then needed to switch between them, here is a brief description of how this is done:

Create a new Caliber Database with or without the sample data in it.

From the command line: dbmgr -new -sample SQMDB3 (where SQMDB3 is the new database to be created)

Additionally, if you have existing database(s) backed up in c:\caliberRM_backup, it may be a good idea to rename any existing database backup at this point to prevent any risk of it being overwritten or there being problems in backing up the existing (i.e. creating a new database in Caliber, causes a database backup to occur)

Settings -> Control Panel -> CaliberRM Server -> Global Properties -> Database Name

Set database name to the name of the newly created database (i.e. SQMDB3 in this example)

Restart the PC and the Caliber server will now be pointing at the new data. To swap back, simply change the entry in the Caliber server global properties and restart the PC again.

Posted by David Robertson on February 27th, 2008 under Borland CaliberRM | Comment now »


What to do if you’ve killed your CaliberRM installation

First of all, let me start by saying that this article is not supported or approved by Borland, feel free to use it if you think it’s useful, but it should not be considered an alternative to Technical Support (support.borland.com), but rather as a crib sheet of useful tips that may help you to get running after a serious problem 

I was playing around with my CaliberRM 2006 install again yesterday and I managed to break it (I have been running many different configurations simultaneously on the machine and peforming all kinds of customisations, so this is perhaps not a realistic scenario for an end user) and I got to thinking, how would I revive machine here without rebuilding the whole thing?

 This may seem like a strange comment, but by this point I was no longer able to connect to my local Caliber server and a complete uninstall / reinstall failed to resolve the problem, nor did simply overwriting the database, so I was kind of stuck there without a usable machine.

The initial message I was receiving when I tried to connect to my local Caliber server was ‘Could not connect to the CaliberRM server ‘localhost:20000′ Please contact your system administrator ’ with the server process showing as running locally (the Windows Task Manager was showing the process ‘caliber_srv.exe’ and the windows firewall was switched off, so the Caliber server port 20000 and the SQM Monitor port 20001 were open), so I figured that it probably wasn’t a problem with the connection between the Caliber client and the Caliber server.

Normally, such messages do not relate to problems in the product license, but I thought it prudent to check, by starting the ‘Framework Administrator’ and going to File -> Admin -> License Management. However, I wasn’t even able to connect to the server from the admin client, so this was not the root of the issue.

Having ruled out any legitimate connectivity issues, the next logical step seemed to be to look at the Versant database that the project are running on, so I started by having a look at the Diagnostics console provided by Caliber (Start->Borland CaliberRM->Administration->Diagnostic)

 Additionally, checking in the log files for the client and server (C:\Borland\CaliberRMServer\Logs for a default install path) revealed no error messages

I ran the diagnostic tool and it initially displayed a rather unhelpful blank warning message, but once I clicked through this, I could see on the console, an error message stating ‘Error connecting to the database!’

Normally in this situation, it would be prudent to contact Borland Technical support if you have a problem with production data, however, if support is not available to you, then you might be reading this in the desperate hope of getting going again.

Because I am only running this configuration locally, I thought it might be a good idea to see if recreating the database would resolve my issue. As I have the luxury of this only being a test machine, recreating the database from scratch and therefore deleting all my project data will have no impact on me, I just want to re-run CaliberRM for testing.

So, now I open a command window and type ‘dblist’ to show me a list of the existing Caliber Databases that are available for use, however, something is obviously very wrong in the database as this command fails execute and simply hangs

So I do a ‘CTRL+C’ from the DOS prompt window and terminate the task, I then try to recreate the database manually by entering: ‘dbmgr -new -sample SQMDB’ this command should normally create a new Caliber database with the package install sample data with the same name as your existing default database, therefore overwriting its complete content.

In this case however, the command simply hung, offering me no help.

So the last step to this is to run the uninstaller for CaliberRM, having already tried this to no avail, I backed up my complete Windows registry, then used ‘regedit’ to deleted the folder ‘CaliberRM’ from HKEY_LOCAL_MACHINE\SOFTWARE\BORLAND\CaliberRM, in general you should be very reluctant to try modifying the Windows registry yourself as it can have serious consequences for your pc.

Additionally, it’s a good idea to delete the remaining folders for the additional components of the server and client (as appropriate) as the existance particularly of a db directory in the server folder can cause problems recreating a new database. (i.e. delete c:\Borland\CaliberRmServer and C:\Program files\Borland\CaliberRM to delete client files)

As I also happen to know that Caliber tries to take a backup of any existing database during the install, I need to rename or delete the folder ‘C:\CaliberRM_Backup’ as this can cause problems for the installer.

I now re-ran the CaliberRM installer and voila! everything’s working again, perfect.

Now you can use the server again and if you need to restore a backup of your database, you can do so onto the new install.

That’s it for now

Posted by David Robertson on February 11th, 2008 under Borland CaliberRM | 2 Comments »


CaliberRM and MPX Multicast Part 2: Running the Message Broker and Multicast on a separate Machine

For the second part of this article, I have been re-configuring my system in order to run CaliberRM with MPX running remotely on a second PC in a local network

I did a test run of the altered configuration by doing the following:
Installed Message Broker and Multicast service on a different machine which was reachable over the network (now the Caliber Server is on machine 1 and the Message Broker and Multicast Service on machine 2)

I then disabled my existing services on the standard ports to make sure no confusion was caused by this.

This time I decided to choose non-standard ports for both the Message Broker and the Multicast Service (6101 for MB and 6111 for Multicast)

Machine 1 has IP address: 191.168.1.2
Machine 2 has IP address: 191.168.1.3

STMessageBroker67.ini, now has the following content:

setopt conn_names                tcp:192.168.1.3:6101
setopt client_keep_alive_timeout 30.0
setopt client_read_timeout       45.0
setopt client_max_buffer         10000000 /* ~10 MB */
setopt multi_threaded_mode        TRUE
setopt client_threads            5
setopt server_threads            2
setopt max_server_conns          10     /* Connections with other MBs */
setopt max_client_conns          2000   /* All other connections to this MB */
setopt enable_control_msgs       echo
//I have set logging on to files on the c:\ drive although this is not mandatory
setopt trace_file c:\mpx_msg_brkr_trace.txt
setopt trace_flags timestamp
setopt trace_level debug
 

STMulticastService67.ini has the following content:

setopt server_names              tcp:192.168.1.3:6101
setopt conn_names                pgm:192.168.1.3:tcp.6111
//setopt conn_names                pgm:_node
setopt client_keep_alive_timeout 30.0
setopt client_read_timeout       45.0
setopt group_names               Starbase
setopt enable_control_msgs       echo
setopt group_threshold           1
setopt _group_flush_interval     2.0
//I have set logging on to files on the c:\ drive although this is not mandatory
setopt trace_file c:\mpx_multicast_srv_trace.txt
setopt trace_flags timestamp
setopt trace_level debug

Stop the Message Broker and multicast services that I have run locally.
Windows Services -> StarTeam Message Broker 6.7 - stop
Windows Services -> StarTeam Multicast Service 6.7 - stop

Disable firewall on appropriate ports as necessary (6101,6111)

In the Control Panel Caliber Server settings swap the server name for the IP address of the machine where the new Message Broker can be found (i.e. 191.168.1.3 and port 6101)

Now restart the StarTeam Message Broker Service, then the StarTeam Multicast Service, then log onto a Caliber client and you’re done

Posted by David Robertson on November 20th, 2007 under Borland CaliberRM | Comment now »


CaliberRM and MPX Multicast Part 1: Configuring Caliber RM with MPX and Multicast using your local PC and the standard ports

Just as with StarTeam, it is possible to configure Caliber RM to run with an MPX server and the Multicast service. In order to do this, you would need to do the following:

Install a Caliber Server

From the Caliber Server config MPX tab (Control Panel -> Caliber Server -> MPX Tab), enable the MPX and add the name of the machine on which it is installed and a port number (5101 by default)

One way to test that this first part had been configured correctly is to then try logging onto the Caliber Server from the Caliber Client (you should see a message saying "MPX Support was enabled, but client failed to connect to MPX Server <<server name>> on port 5101")

Install the StarTeam Message Broker

Install the StarTeam Message Broker, which, if you can’t find it anywhere else, download a trial version of StarTeam from Borland.com, extract the zip into a temp directory and from the bundled files, select only to install the MPX components. Choose all default options during install (for this example, I used MessageBroker 6.7, which is shipped with ST2006 but previous versions should also work)

Now you need to configure the STMulticastServiceXX.ini file which by default install, will exist in c:\program files\Borland\Message Broker 6.7

Leave everything else, but comment out any lines with the params:

setopt server_names

setopt conn_names

and add the following two lines to your ini file:

setopt server_names tcp:_node:5101

setopt conn_names pgm:_node:5104

Now restart your MessageBroker and Multicast services (control panel->Administrative Tools->Services)

Important: You must stop and start the MessageBroker service, before the Multicast service.

That’s it!

If you log on to the Caliber client now you should see a small yellow lightning flash in the bottom right hand side of the client, this indicates that MPX is enabled and working

Posted by David Robertson on November 14th, 2007 under Borland CaliberRM | Comment now »


What to do if a new StarTeam Server Configuration is not created correctly

Sometimes when a new StarTeam server configuration is being created, the operation does not complete correctly (for example if you have insufficient available disk space (min 300mb of available free space by default), you choose a database or dsn name that already exists, etc) in this case, the StarTeam server configuration is not completed correctly and is not shown on the Server console but there are traces of it still on the system which make the environment a bit untidy or prevent you from creating further configurations correctly on your system.

When you create a new StarTeam Server configuration, the new server configuration wizard is a GUI front end on to the following operations:

  • Creating a new database on your database server (Oracle, SQL server/MSDE) and creating the user to login to that database
  • Setting up a hive configuration and the location for information which will be stored in the StarTeam repository.
  • Creating the ODBC connectivity to the new database, so that your windows configuration can readily talk to the new configuration
  • Creates (as necessary) the data and transaction log files for the database

These are therefore conceivably the items which you would need to delete manually afterwards if you are having problems. To do this you follow these steps:

  1. Delete the ODBC connection from windows (from Control Panel->Adminstrative Tools->Data Sources ODBC->System DSN) it’s a good idea at this point to make a backup of the database and make a note of all the ODBC connections that exist in case you delete the wrong one (this will make any currently running configurations unusable). This is also a good time to confirm the names of database logins and connections that will need to be deleted from the database.
  2. Using a database administration tool e.g for SQL Server I used SQL Server Manangement Express (or request the help of your DBA as necessary) delete the user name which you created for the new configuration in the database. Then delete the database for the new configuration itself (Again, it’s a very good idea to backup your database before you do this, particularly if you’re running live configurations concurrently on the same StarTeam server)
  3. Look for your incomplete hive-index.xml which relates to the configuration you have tried to create, if you have not chosen the name hive-index.xml for this file, one good way of finding it is to search for an xml file on your system with an element called ‘StarTeamHiveIndex’. This file provides the information about where the repository directory was created (be careful here again that you do not delete any valid repositories that exist on your system)
  4. Delete the Data Files and Transaction log files from the disk as necessary (in the case of MSDE/SQL server, these are files with the extension .LDF and .NDF)
Posted by David Robertson on October 17th, 2007 under Borland StarTeam | Comment now »


What to do if your StarTeam Server Configuration can’t be Administered from the Server Console (version 2005R2 onwards)

The most likely reason for this happening is that there is some problem with the xml configuration files that you StarTeam server console is using.

The Server console itself looks at a file named starteam-servers.xml which using a default install in windows XP pro will be placed in c:\documents and settings\user name\application data\borland\starteam\ This contains a list of the servers that will be shown in the Server console. However, if the file starteam-server-configs.xml (by default, installed in c:\program files\borland\starteam server) does not exist, or contains insufficient data (see article http://blogs.codegear.com/davidrobertson/2007/09/11/38931 for more info) then it will not be possible to edit these configurations. This can be particularly confusing if you have multiple installed versions of the StarTeam server on one machine or you have recently upgraded a server version and are now using a different directory structure.

Posted by David Robertson on October 17th, 2007 under Borland StarTeam | Comment now »


What to do if you accidentally delete the starteam-server-configs.xml file

Don’t panic, it is possible to get your configuration working again after deleting the contents of your starteam-server-configs.xml file (which thanks to a combination of Windows Vista and Macromedia Dreamweaver, I managed to do on a test system I was using)

First, you will need to retrieve so information about you StarTeam database itself, so for this you will need to use a database client of some kind. I downloaded SQL Server Management Studio Express from MSDN for this.

This article deals with an example of StarTeam 2006 running on unsupported Windows Vista Enterprise pointing at an MSDE database, but the details for other db configurations are largely identical.

Lookup the login that your starteam server is using to talk to your StarTeam database by going to your Windows ODBC datasources (From Administrative Tools in the Windows control panel, for example) In the System DSN tab, you’ll find a login in for the StarTeam database that the Server uses, you’ll also need to remember the password for this user (or if you ignored the security warnings when creating your server configuration initially, you can test the connection with a blank password) probably, depending on the version of StarTeam that you have installed, the login will be something like the following :

starteam_stardraw90_login (for ST2006)
starteam_stardraw80_login (for ST2005R2)
starteam_stardraw70_login (for ST2005)

(presuming you installed the standard StarDraw configuration and used that configuration, otherwise the database login will be whatever you named it during

the server configuration creation process, although it should still be shown in the Windows System DSNs for ODBC so you can get a big hint by looking there) Once you’ve accessed the database, you’ll need to retrieve the ServerGuid for your server configuration, to do this, simply run the following statement to return the serverGUID for your configuration

select F3 from s0

It is not recommended under any circumstances to change any of the values in the database, as it may have future impacts to your repository.

Now you can start recreating your starteam-server-configs.xml. The best way to do this correctly is to create a new dummy server configuration for the StarTeam server admin console at this point, this creates another valid configuration (particular to your system) in your now blank starteam-server-configs.xml file, which you can then copy and modify with the correct values to restore the old configuration. Additionally, you can use the xml snippet below to help you:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<StarTeamServerConfigurations version="1.0">

  <Configuration name="StarDraw">
    <option name="ServerGuid" value="be5ff3b0-c719-49c6-a1a1-f493764a03f5"/>
    <option name="CreatedByBuild" value="9.0.225"/>
    <option name="RepositoryPath" value="C:\Program FilesBorlandStarTeam Server 2006SamplesStarDraw Repository"/>
    <option name="LogPath" value="C:\Program FilesBorlandStarTeam Server 2006SamplesStarDraw Repository"/>
    <option name="Initialized" value="1"/>
    <option name="ServiceMode" value="0"/>
    <option name="Sample" value="0"/>
    <option name="DBType" value="2"/>
    <option name="DBCreated" value="1"/>
    <option name="DBServerName" value="StarDrawDB90"/>
    <option name="DatabaseName" value="starteam_stardraw90_db"/>
    <option name="DBUserName" value="starteam_stardraw90_login"/>
    <option name="DBPassword" value=""/>
    <option name="DBMinimumConnections" value="0"/>
    <option name="DBMaximumConnections" value="0"/>
    <option name="ListenIP" value=""/>
    <option name="MinCommandThreads" value="0"/>
    <option name="MaxCommandThreads" value="0"/>
    <option name="NotificationLocale" value=""/>
    <option name="Status" value="Running"/>
    <option name="PID" value="-1"/>
    <option name="Endpoint" value="49201"/>
    <option name="FileAllowCheckoutTrace" value="0"/>
    <option name="FileEnableCheckoutTrace" value="0"/>
  </Configuration>

</StarTeamServerConfigurations>
So, so far you should have the configuration name and the ServerGuid part of this file. The CreatedByBuild tag is simply a reference to the version of the StarTeam server that you are using so it better to use the server’s default value on most occasions, unless you know that your configuration was created on a previous version of StarTeam, then simply enter your version number here. If you’re not sure where your repository path is, this should point to the folder which contains the file Server.en-US.Log and the folders DefaultHiveIndex, HiveIndex, Notifications, Trace folders. For the StarDraw sample repository, this is:

C:\Program FilesBorlandStarTeam Server 2006SamplesStarDraw Repository

The dbservername, databasename and dbuserpassword with be the same as you used to login to the database to retrieve the ServerGUID, dbtype =2 is for MSDE, PID value should be set to -1 initially.

That’s it. Now start your StarTeam server configuration, then I recommend you back everything up properly in case it happens again :-)

——————————————————– 

 Edit 10th April 2008:

 Just as an addition to this post, I recently had problems recreating a ST2006R2 and ST2008 using this method as I needed an encrypted password string in the DBPassword field which I was unable to successfully recreate using online encryptors from the original password (I couldn’t work out the algorithim in other words, despite knowing the original password) so this article may not be valid for 2006R2 and 2008 versions.

I haven’t had time to fully investigate this issue further, but presumably one way to recreate a correctly encrypted password in order to recreate the complete xml file would be to recreate a new server configuration from scratch and during the db creation step, enter your db password for the new config, then the password that is encrypted for the new config, can just be copied and pasted from the server configs xml file for the new config to the one you’re trying to resurrect, no guarantees though as I haven’t tried this to verify it.
 
Interestingly enough, the error message created by the server when I tried to start the server either without the password or with the incorrect pasword was ‘There are not enough pooled connections available’ which wasn’t actually the root cause of this problem, this tip may help if you are trying to start your server and are receiving this error message.

Posted by David Robertson on September 11th, 2007 under Borland StarTeam | 1 Comment »


Sharing StarTeam Items vs. Creating Reference Views

Many times I have seen confusion in the use of sharing items within StarTeam.

Sharing creates static references to a single configuration item, which is not confusing to UNIX users but can result in some unexpected behaviour to those who simply expect the action on the item to be replicated everywhere that item is shared in the system. Imagine simply that you have one item called text.txt and you share this item into another folder. Now if you modify the content of text.txt in either the share or the original file the changes will be propogated in the share, this is probably what you would expect.

The confusion arises then if I decide to delete the original file, then the shared file is not deleted. This because your file text.txt has a unique address in the database (which starteam uses) and what you are in fact viewing in the StarTeam client is a reference to that database object, hence when I delete what I believe to be the original file, what I am in fact doing is deleting one refernce to an address, the shared file is not deleted because not all of the addresses are deleted when the original file (named the root share) are deleted.

If you find yourself reading this after having already got yourself tied into a knot with this then the following pieces of information can help you to source an otherwise quite cryptic problem:

In the StarTeam client, select an additional field to show (by clicking on the field and selecting ’show fields’ and choosing ’share state’ from the list of available fields) this can help you to see if the item you are looking at is a derived share or the root share of an item. If it is not the root share, you can then find the location of the root share by selecting the file in question and clicking on the reference tab which will allow you to see the ancestry of the file itself (i.e. in which view it originated, etc)

You may well find that using sharing creates too many redundant references to files on your system and confuses your users, in this case, consider using instead ‘reference views’ (this is a StarTeam view type which allows you to look at items in another view exactly as they are, i.e. if they are deleted in the main view, they are deleted in the reference view and vice versa)

Posted by David Robertson on August 24th, 2007 under Borland StarTeam | 2 Comments »


Reporting Options in StarTeam

StarTeam offers many ways to report on your items or your configurations, in this article, I am aim to discuss the various advantages and disadvantages of the various approaches.

StarTeam Standard Reports

Borland StarTeam comes with several reports ready to use out of the box, these are simple and quite powerful if used effectively. They can be quickly selected and generated based on either the current selection or all items and generate a html report , the basic types available out of the box are:

Default, Detail, Detail with Description, Grouping Summary, Links, Summary, Summary with description

The standard reports can be used in combination with active filters and queries to narrow down the selection of items to be reported on.

Exporting StarTeam Attributes to an Excel spreadsheet

A perhaps not so widely used option for reporting is that of Attributes being exported. StarTeam allows any of the available attributes of a specified item (or the complete set or selection, again using queries and filters), The export does not give a direct report output, but gives an intermediate csv style format of the specified attributes and selection of items that can be readily used in for example an excel spreadsheet. This can be particularly useful in a scenario where your StarTeam report, will form only a part of a larger report, or you do not have a license for Business Objects or a need to use the StarTeam DataMart in its entirety.

Modifying the StarTeam Standard reports to create your own custom ’standard’ reports

In addition to the Standard reports in StarTeam, it is also possible to create your own ‘Standard’ report by copying and modifying the templates that can be found in the ‘reports’ directory of your StarTeam installation. This is not a particularly straightforward option for the person building the report, but can be useful if most of the reporting is done by users who are non-technical and most of the reporting will be the same time after time. The customization of these reports is done by the manipulation of html files that are located in the install directory of StarTeam in a folder named “reports“. There are 4 files for each standard report, I did try to create new types of standard reports but for a reason that I did not have time to diagnose, this did not seem to be possible, so I simply decided to overwrite one of the existing reports with my customization and let StarTeam pick it up. The file extensions for the reports are the following: .title, .grpinfo, .group and .end report. Once you have manipulated these files, simply save them back in the reports directory and they will be ready for use.

StarTeam DataMart

The StarTeam DataMart is the most powerful method of reporting, and allows cross-project reporting. Extracts are taken from the database, then used in a report generating tool such as Business Objects.

Posted by David Robertson on May 23rd, 2007 under Borland StarTeam | 2 Comments »


Deciphering a confused configuration that contains lots of shared items

Try to be careful how you use shares and where you use them as they can be very useful but they can also make a configuration behave in an unexpected or inconsistent way.

If you find yourself in a situation where you have created some shares through your project and you are no longer sure where they are or where they started from or went to, you can use a combination of show fields and the reference tab to clean things up a bit.

To show the share state of a file, you could right click on the headings of the details pane and choose ’share state’, this would then show you whether your file has been shared or not by showing one of the following values:

Root Share: The location from where the file was originally shared

Derived Share: The location to which a file has been shared to

Not Shared: The item has not been shared

Additionally, it is possible to see more precisely what the exact relationship of the shares is in a more comprehansive way by using the ‘references’ tab on a selected item. as shared items in branched views will not conform the branch notation which non-shared files would display under the same circumstances.

Posted by David Robertson on May 4th, 2007 under Borland StarTeam | 2 Comments »



Server Response from: dnrh1.codegear.com

 
© Copyright 2008 Embarcadero Technologies, Inc. All Rights Reserved. Contact Us  |   Site Map  |   Legal Notices  |   Privacy Policy  |   Report Software Piracy