" /> Status for Andrew DeFaria: April 9, 2006 - April 15, 2006 Archives

« April 2, 2006 - April 8, 2006 | Main | April 16, 2006 - April 22, 2006 »

April 15, 2006

Production User Database Migrated

  • Managed to migrate the production user database
  • Clearquest desktop users need to upgrade their software. Meantime they can use the web interface
  • Verified cqd and triggers work
  • Documented how to switch a desktop to the new server
  • Documented how to build on the new server

Time Spent: 4 Hours

Production User Database Migrated!

More progress in this area.

I decided to try to use the Sybase Central tool to see if I could verify or otherwise fix this potentially bad database. I also looked at running Chkdisk as the eventlog was reporting some bad sectors on the disk. Unfortunately chkdisk cannot fully check the disk since the database is on the C drive and the C drive is currently busy. Normally you just set a flag and chkdisk will run after next boot. But such a chkdisk will take a long time on a big disk.

Meantime in Sybase Central I decide to do fresh backups of the databases which seem to go OK. These backup databases look no different really than the regular databases so I run validate on the backup database. Hmmm.... Doesn't seem to have any errors. So I tried the installutil copyuserdb to copy the backup database as if is was the real production database to the new server. Hmmm.... That worked!

Next I had to go into Clearquest Maintenance Tool and select Schema Respository: Upgrade: Selected Connection and upgrade the production user database. That worked!

I checked the Clearquest web (http://sons-sc-cc/cqweb/login) and the new database is indeed there and working!

Clearquest Desktop Clients Need to Upgrade

Problem: Clearquest 2002.05.00 desktop clients cannot access this new database!

I tried creating a connection profile to this new database and then importing it on the old server running 2002.05.00.This did not work! Later I read in the Rational Suite Migration Guide:

Your network environement can contain misxed versions of ClearCase and ClearQuest clients (where some clients are at v2003 and some clients are at ealier versions) if these products are in a standalone environment, that is:

....

If your vendor database is SQL Anywhere, you do not plan to upgrade to SQL Anywhere 8.0 until all ClearQuest clients and databases have been upgraded to version 2003.

So we'll have to upgrade desktop clients to 2003.06.00! Luckily people can use the Clearquest Web Client...

Clearquest Daemon Works with Minor Tweaks

Checked that cqd and cqc work with the new server. All that need to be changed is to change the default server from sons-clearcase -> sons-sc-cc in cqc.pm.

Checked and Triggers Work in New Environment

I was able to check to see that the triggers function in the new environment.

Switching Your Desktop to the New Server

Use the following steps switch your desktop to the new server:

  1. Stop all Clearcase activity. Close any Clearcase Explorer windows and any shells in Clearcase views.
  2. In a Cygwin shell type ct umount -all to unmount all vobs.
  3. Go to Control Panel: Clearcase
  4. Click on the Services tab then Stop Clearcase
  5. Click OK to the dialog saying Clearcase has stopped
  6. Click OK to close the Clearcase Control Panel Applet
  7. Start the Clearcase Control Panel again
  8. On the registry tag, change the registry server to sons-sc-cc
  9. Click OK to close the Clearcase Control Panel again
  10. On the Registry tab click the drop down arrow for Windows Region. You should see the new SC region. Select it.
  11. Click on Apply
  12. Click on the Services Startup tab and then Start Clearcase
  13. Close the Clearcase Control Panel
  14. Start a Cygwin shell and type ct hostinfo -l. You should see something like:

    [ccadmin] adefaria:ct hostinfo -l
    Client: adefaria
      Product: ClearCase 2002.05.00+
      Operating system: Windows NT 5.1 (build 2600) Service Pack 2
      Hardware type: Pentium
      Registry host: sons-sc-cc
      Registry region: SC
      License host: sons-clearcase
    

    As you can see we are now pointing to the sons-sc-cc registry host and the SC region. Sons-clearcase is still the license server at this time. Type ct lsview and you should see:

    [ccadmin] adefaria:ct lsview
      official             \\sons-sc-cc\Views\SALIRA\ccadmin\official.vws
      3.1.ccadmin     \\sons-sc-cc\Views\SALIRA\ccadmin\3.1.ccadmin.vws
      szhu_view_2     \\sons-sc-cc\Views\SALIRA\szhu\szhu_view_2.vws
        

    A noticeably smaller list of views that are on sons-sc-cc in the SC region

Follow a similar set of steps to switch back to the old registry server (sons-clearcase) and region (US). No reboots required (provided you properly stop Clearcase and do things like get out of views and umount vobs).

Attempting an Official Build on sons-sc-cc

This procedure can be done either by following the procedure above to switch your desktop to the new server or simply use rsh/telnet to log into sons-sc-cc. Once there:

  1. Make user that the 3.1.ccadmin view is started
    $ ct startview 3.1.ccadmin
    
  2. Make sure the salira vob is mounted:

    $ ct mount \\salira
    
  3. Change directory to the build area:

    $ cd /dview/3.1.ccadmin/salira/neopon/build
    
  4. Type make:
    $ make
    

April 12, 2006

More fun with SQL ANYWHERE

Attempting to transfer databases using MS Access

OK, trying this methodology:

  • Used installutil copyschemarepo command to copy schema.db -> schema.mdb
  • Moved schema.mdb to new server
  • Used installutil copyuserdb command to copy salira_test.db -> test.db.
  • Moved test.db to new server
  • Tried several times to use installutil command to copy salira_bugs.db (the production database) -> bugs2.db. System aborted several times. Not sure if this is due to bad disk blocks or not. This is a major problem as this is the data we care about.

Back on the new server:

  • If I do Connection: New and point to the schema.mdb file it wants to overwrite it! Instead I did File: Import Profile of a profile of the old databases. Of course these say SQL_ANYWHERE. I change this to MS_ACCESS and point to the schema.mdb file and this seems to work.
  • Attempt to do Schema Repository: Move. In doing so I set the Physical Database Name by browsing to the folder via the ellipsis button. This leaves me with D:\Clearquest\schema.db. Clicking on Finish give ms:
    The filename you have specified is not a Share. If other users will need access to this database, you should browse through "Network Neighborhood" to place is in a share. Continue with this name?
    I select No because I do want other users to be able to access this database. Next I change the D:\Clearquest\salira.db -> \\sons-sc-cc\Clearquest\schema.db and click Finish. At this point I get a error dialog stating that it was "Unable to connect to the database server". After much scratching of the head I realize that I should use D:\Clearquest\schema.db, ignore the warning, then go back in and set the Physical Database Name to \\sons-sc-cc\Clearquest\schema.db.

    Oh, a side issue: After failing using a Physical Database Name of \\sons-sc-cc\Clearquest\schema.db the Rational Clearquest Maintenance Tool still creates a schema.db file. If you go Back and correct the Physical Database Name to a local path and click Finish you'll get a database I/O error. Turns out you have to remove this schema.db file first. These two (what else could I call them but) BUGS caused me to lose many hours of sleep.

    Managed to move the schema.mdb -> schema.db.
  • Switching to the Clearquest Designer now to Database: Update User Database Properties. As I only have the test.mdb file to convert I change the user database properties for the test database.
  • Now I select Database: Move User Database to move the test user database to SQL_ANYWHERE

At this point I'd like to run Clearquest Designer and do Test Work so I can at at least verify that I can access the converted to SQL_ANYWHERE test.db. Unfortunately there is a checked out version of the schema in the schema database that I copied over and I'm not the owner of that checked out schema. And I can't login as that user.

By chance I tried Schema Repository: Upgrade: Selected connection in the Clearquest Maintenance Tool and in stepping through those dialog boxes it say "The schema repository that you want to upgrade has checked-out schemas. If you continue the upgrade process, the checked out schema versions cannot be upgraded and will be deleted from the system". I continue onward and manage to "upgrade" the schema and test database. I proceed into Clearquest Designer and manage to Test Work and viola! I got it up. I am nothing if not tenacious!

Total Time: 2 hours

April 11, 2006

Build bugs, Test suite still not runing nightly

  • Fixed bug with saving test.log where I was attempting to save it before I returned from the subroutine. We now save the test.log even if test suite is successful. This is good because continuous building reuses the view area thus destroying any test.logs created before.
  • Fixed bug in build::CheckForShutdown where we called LogEvent without a $log parameter. This caused CheckForShutdown to abort the build while in CIT daemon mode and thus we didn't see the error. It also left the shutdown file thus subsequent starts merely shutdown (actually aborted) until one manually removed the shutdown file. Bad bug! Bad, bad!
  • Looking into why the test suite works when called at the Build.pl level but fails when called from the streamBuild.pl level.

More SQL Anywhere Wrestling

  • Installed SQL Anywhere 8.0.3 Patch to fix problem with Services folder not appearing in Sybase Central
  • Spent time trying to figure out how to get a service configured. Eventually figured out that I need to specify -n <machine> as part of the parms or starting the service would just hang
  • Instructions given from Rational spoke of converting databases on a single server. This is not what we are doing there. Tried various things in an attempt to extend the directions to two servers and get the installutil command to run. Nothing was working.
  • Scoured the Rational documents and the net for "preparedbforupgrade" - turned up little except some guys personal web site talking about how the Rational Suite - Upgrade Guide describes the upgrade procedure with two servers and here's the single server procedure. That's nice, and it's pretty much the exact technote that the Rational support engineer pointed me to. However where's the double server procedure!
  • Scoured the Rational site, this time for Rational Suite - Upgrade Guide. Found it! It was a in a pdf file! Apparently the Rational site search engine doesn't search inside pdf files. They should take a lesson from Google! Also searched the system for this pdf file (rs_upgrade.pdf) and it was not on the system. Now why isn't it part of what gets installed?
  • Started doing the steps for converting the database as described in the Rational Suite - Upgrade Guide. See below for more.

Time Spent: 4 hours

Still issues with SQL Anywhere upgrade

According to the Rational Suite - Upgrade Guide I need to import the connection profile from the SQL Anywhere 5.0 server then update it to add on the new SERVER_VER connection option (I believe I need to specify SERVER_VER=8.0.3 since I've now patched to 8.0.3) then save that connection profile. If I change the database server name to the new name but leave the Physical Database Name pointing to the old server then I get an error. If I change the database server name and point the Physical Database Name to a copy of the schema.db on the new server I can't connect either. If I leave those pointing to the old server and only add on the SERVER_VER parm then the connection updates. But now access to Clearquest fails on the old server complaining that SERVER_VER is invalid! How are you supposed to do this?!? Step by step instructions would be great!

Even if I were to be able to get the above done I would hesitant to perform the next step because it describes using the Clearquest Maintainance Tool to move the schema and user databases!

Move your schema repository. In the ClearQuest Maintenance Tool, in the Existing Connections area, select the connection to your existing SQL Anywhere 5.0 databases, then click Schema Repository > Move. Enter database information for a new database under your SQL Anywhere 8.0 server. For example, enter a different filename in the same directory as the existing database. Click Finish.

I don't want to move databases - I want to simply copy them. Moving them would mean that current production would have to halt until I got it back up and running on the new server.

April 10, 2006

Save the logfiles! IFrames

  • Changed the build process to save the test logfile
  • Changed the build_status to use an iframe for the continuous log file

April 9, 2006

SQL Anywhere

  • Attempted to migrate Clearquest databases to new server. I was unable to. I've opened up a PMR with IBM Rational #8552849R and expect to get email from them tomorrow.
  • Attempting to switch the machine adefaria over to this newly created registry server (sons-sc-cc). Decided to reboot the machine. It never came back up! If you can boot this machine that would be great. You might need to go into the Clearcase Control Panel and set the registry server back to sons-clearcase and set the region to US. It might require a reboot to be effective. Why, when I rebooted it, it failed to come back up?

Time Spent: 4 hours

Migrating databases to new SQLAnywhere 8.x

Spent most of the day banging against SQL Anywhere. We need to migrate the databases (both the schema.db and the salira_bugs.db) to the new server. With the new server comes new DBMS software (Sorry but SQL Anywhere 5.5.05 which is what you have on sons-clearcase is being sunsetted anyway).

Now I've done some extensive Clearquest work over at Broadcom it was all MS SQL based in the back end.

The first problem I have is that there is not service for SQL Anywhere like there used to be over on sons-clearcase. I managed to find C:\Program Files\Rational\SQLAnywhere8\win32\dbeng8.exe and dbsrv8.exe and that appears to be the process to start, there still isn't any automatically starting service for SQL Anywhere 8. That plus when run it prompts with a dialog box that queries about the database to use. I was always under the impression that a DBMS server just runs for any and all databases on the machine. I can just specify the server and leave the database blank but other times when running Sybase Central it complains that it can't start the DB server.

I thought that I could simply use Sybase Central to backup the databases on sons-clearcase then use the restore function of Sybase Central on sons-sc-cc. There are also options like Migrate Database, etc. to deal with differences in databases between old and new versions of SQL Anywhere. All of these had problems for me...

Backup/Restore

I backed up the salira_bugs.db file over to \\sons-sc-cc\Clearquest\backup\salira_bugs.db. Next I attempted to restore it on sons-sc-cc I get "Unable to start database server".

Connect to backup database

When I attempt to simply connect to that db I get:

You are attempting to connect to a version 5.5.03 database running on a version 8.0.2-3601 server. In order for the Sybase Central to use this database, the database must be unloaded and reloaded into a new database (Sybase Central only supports version 7.0.0 and later database). The Unload Database wizard can step you through this process, after which Sybase Central will diconnect from this database.

Do you want to unload and reload this database? (If not, Sybase Central will disconnect from this database now.)

If I step through this wizard I eventually get:

java.lang.UnsatisfiedLinkError: unloadDatabase
Could not unload the database 'salira_bugs'.

Migrate Database

If I attempt to Migrate Database I get a message saying "You must be connected to the database to which you want to migrate" which, of course, I can't...

Creating and Erase Database

I have not managed to create a database through Sybase Central (but I have been able to create it through Clearquest Maintainance Tool and the Clearquest Designer - see below). When I try I get: Unable to start database server.

For databases created via Clearquest tools I cannot erase them using Erase database. Instead I get the same thing: Unable to start database server. So far when I need to delete a database I merely remove the databse files themselves.

I can create a schema database and even user databases through the Clearcase Maintainance Tool and Clearquest Designer respectively. But we don't want a new schema nor empty user databases - we want to migrate the old scheme that has our modifications and we want to migrate our old database!

Moving Databases

There's also an option to move a database from one server to another. Now I don't want to move databases right yet - I want to copy them. However this move seems to copy the database and then lock the original database. So I tried it out on the test2 database. Effectively you go into the Clearquest Designer on sons-clearcase and then select Database: Move Database then go through the dialog box specifying that you want to move the database over to sons-sc-cc. That works and test2.db does appear over on sons-sc-cc. But when I attempt to connect to it Sybase Central again goes through the unload/load procedure which fails the same way as described above.