Installing Additional Instances of Metrix on a Single Computer
If you are a Metrix consultant or developer, you may find it necessary to have more than once Metrix database on your computer at the same time. For example, if you are customizing Metrix for more than one client simultaneously, you will need to have one Metrix installation for each client.
To install multiple versions of Metrix on your computer, you will:
- Backup a default version of the "back-end" Metrix database.
- Restore that backup to your MSDE/SQL Server under a new database name.
- Copy the default Metrix front-end and customization files to a new directory.
- Connect these duplicate files to your new Metrix backend.
- Customize as necessary.
To backup and restore the backend files, you will use a text-based utility called osql.exe for interacting with your MSDE/SQL Server. (This utility is installed with MSDE. Alternatively, you can use SQL Server's Enterprise Manager utility, if you have a full version of SQL Server installed.) You will perform the rest of the procedure using Microsoft Windows and Microsoft Access.
Note: The paths and filenames below may vary, depending on how MSDE/SQL Server is installed on your computer. If you encounter errors, browse your computer's file system to locate the correct file paths for your computer.
Here is a detailed explanation of the process, using osql.exe:
- Backup the default "backend" Metrix database. You will use this database as a foundation for the database you are customizing for the client. To do so:
- Enter the "DOS command line" mode of Windows by choosing Run from your computer's Start menu and typing command into the dialog box.
- At the DOS prompt, start OSQL and connect to your MSDE/SQL Server by typing:
OSQL -U sa -P yourPassword -S (local)\Metrix
Where sa is the username of an administrator for this MSDE/SQL Server installation, and yourPassword is the password for that user. If you are accessing the server from a computer other than the one on which the server is installed, replace (local) with the name of the server.
- Enter this command:
BACKUP DATABASE dbname TO DISK = 'c:\path\to\backupfile.dat'
Where dbname is the name of the database you are backing up (by default this will be something like "MetrixV130"), and c:\path\to\backupfilename.dat is the full path to the backup file you are creating. Make a note of this location because you will need it later when you restore this file to the database server.
Note: If you do not know the name of your existing Metrix database, open Metrix using the Shift bypass Technique and choose "Connection" from the File menu.
Verifying the Name of the Metrix Database
The database name will appear in the "Select the database on the server..." dropdown box.
- To execute the command, type "go." If there are no errors, your Metrix database will be backed up to the file name you specified.
- To create the new database on your database server, use OSQL to restore the backup file you just created:
- Since custom tables, forms, and reports are stored in interactsql.adp and reportsql.adp, you must duplicate each of these files for your new Metrix installation.
- Configure the new interactsql.adp and reportsql.adp files to use the new backend database you created in step 2 above. For each file:
- Open the file.
- From the File menu, choose Connection....
- Enter your password.
- Choose or enter the correct server name in step 1, and click Refresh.
- Choose the name of the new database from the drop-down list, making sure to enter the correct username and password.
- Click Test Connection to make sure the database connection is valid.
- Click OK to save changes.
- Close the file. In the dialog that pops up, approve saving of your password.
- Use Windows' copy-and-paste functions to duplicate the core Metrix program files. By default, these can be found in c:\Program Files\fcny\Metrix. Place them in an appropriately-named folder that describes their purpose. For example, if you are customizing Metrix for the Association for Animal Rights, you could put them in the directory called c:\Program Files\fcny\Metrix\clients\aar.
Figure: Adding references to custom builds
- Customize the new Metrix.adp file so it connects to the new Metrix backend and the new interactsql.adp and reportsql.adp files:
- Open the new Metrix.adp using the shift-bypass function (see Shift Bypass Technique).
- From the File menu, choose Connection....
- Choose the name of the new database from the drop-down list, making sure to enter the correct username and password, then click Refresh.
- Click Test Connection to make sure the database connection is valid. Click OK to save and close.
- In the database window, go to the Forms tab. Click once on any form to select, and open the Code window.
- From the Tools menu, choose References.
- Un-check interactsql.adp and reportsql.adp , and close the References window, then re-open it.
- Click Browse. Find the copy of interactsql.adp you created in the procedure above, and click OK.
Note: Make sure to choose your new interactsql.adp file, not the one that was originally installed by Metrix.
- Click Browse again. Find the copy of reportsql.adp you created in the procedure above, and click OK.
- In the References dialog box, click OK to close it.
- To begin using your newly customized Metrix installation, close and re-open Metrix.adp.