Migrating databases
Use the Server Administration tool to migrate from any database to any other database supported by the StarTeam Server. For example, you can use the migrate feature to migrate an Oracle or PostgreSQL database to a Microsoft SQL Server database. The migrate operation adds information about the new server configuration to the starteam-server-configs.xml file.
Note: You can perform this operation only if the server configuration is not running.
Preparing for database migration
- Prior to migrating to another database, ensure that you have allowed enough table space for the database. Twenty data files of 1 GB each is a good foundation. If the tablespace size is too small, the database continues to extend the tablespace, reducing the performance.
- Create a backup of the database you plan to migrate. Also ensure that you have backups of the files and folders in the server configuration repository.
-
Ensure that the database to be migrated is still in good repair by doing one or both of the following:
- Run Vault Verify.
- Run any verification tools provided by your database vendor.
-
Do one of the following:
- Manually create a database or schema user as the recipient of the migrated data. See the StarTeam Installation Guide for details. Make sure that you note the names provided for the server name, and the user name and password for the database or schema user. At a minimum, this user must have permission to create tables and stored procedures (if the database supports stored procedures).
- Use the Server Administration tool to automatically create a database or schema user as the recipient of the migrated data.
- Plan the database migration for a time at which it will inconvenience few users. A server configuration cannot be running while the database is being migrated. Advise team members ahead of time that you plan to make the transition, let them know the time at which it will take place, and request that they check in their files.
Migrating a database
-
Open the
Server Administration tool, and select the desired server configuration from the server pane.
Note: The server configuration cannot be running during a database migration.
- Click the Migrate Database button, or choose from the main menu. A message warns you that you cannot migrate a server configuration if the server is not registered.
- If your server is registered, click Yes. The Create a New Target Configuration for Migration wizard opens.
-
In the first page of the wizard,
Select Target Configuration for Migration, do the following:
- Type the name for the new server configuration in the Target Configuration name field.
- Click Next. The second page of the wizard, Type New Configuration Data, opens.
- Indicate the type of database in the Database type list.
-
Do one of the following:
- (Default and recommended action): Check Create new StarTeam database.
- Clear the check box if you have already manually created a database or schema user for this migration.
- Click Next when this information is complete.
- From this point on, the dialog boxes are the same as those that display when you create a server configuration.
Completing the migration
-
Disable the prior server configuration. This action prevents the server configuration from being started and accessed accidentally.
- In the Server Administration tool, select the prior server configuration.
- Click the Disable Server button or choose . The status icon to the left of the server configuration name changes to a disabled icon.
Caution: Both the old and the new server configurations access the same vault, cache, and attachments folders. However, they do not access the same database. Continuing to use the prior server configuration will lead to vault verification errors and must be avoided.
-
Empty the Cache folder for the hive before starting the new server configuration. By default, the Cache folder is a child folder of the hive folder, under the repository root folder.
-
After verifying that the new configuration works correctly, delete the:
- Prior server configuration
- The database that it used
-
(Optional). The Z99 table is a temporary table that records the progress of the database migration. If the migration process stops before completing, it uses the Z99 table to determine the point at which it should resume the migration when you restart the process. If your migrate process did not complete properly, you can review the following columns to determine how far the migration process has progressed.
- Column 1 contains the source table name.
- Column 2 contains the ID of the last record copies.
- Column 4 contains either a Y or N, indicating whether the table copy is complete.