INSTALLATION NOTES FOR METRIQ

Contents
  1. Install Options For MetriQ
  2. Interbase verses Firebird Database Servers
  3. Database versions
  4. Uninstalling Interbase and Firebird
  5. Security and data encryption/compression
  6. Troubleshooting
  7. Backup/Restore your Database


Important - Before You Begin:
If you are upgrading MetriQ and/or your Firebird/Interbase Database Manager, then you should ALWAYS! make a backup of your database before you start. It is insufficient to simply make a copy of the database .gdb/fdb file using your file manager.

If you are upgrading your database manager (Firebird or Interbase) as well as MetriQ, then you should also restore that database AFTER the new database manager has been installed See also how to Backup and Restore your database.


Note: In version 6.0 and above, MetriQ's database files have been renamed with the .FDB file extension. This is in response to connection issues in Windows XP. However, MetriQ will still run using the previous .GDB file format. If you wish to move to the new format, simply rename your current database with the .FDB file extension.

1. Install MetriQ(Recommended)

This installation will install all the software necessary to run MetriQ on a computer and will allow you to work standalone as a single user, or if preferred, to connect to a different MetriQ Database on the network and work in a shared environment. With this configuration, other users on the network can also connect to the MetriQ database on your computer.

Previous 'older' Firebird Installations: If an older version of Firebird is installed on your computer, you should first uninstall Firebird. To do this, open the control panel, locate the Firebird Applet Icon and double click to open the Firebird Server Control window. Press the Stop button and press Ok to close this window. Still in the control panel, open the Add or Remove Programs Applet. Select the Firebird icon, and press Remove. You may now continue with your MetriQ Installation.

Important Note: If you are updating your MetriQ software, it is thoroughly recommended that you back up your MetriQ database before hand.


Advanced Installation Options

- Install MetriQ Client Version

This installation configuration is for a computer that will connect to a Database Server on another computer and inter-connected via a network. To configure MetriQ to run in Client Mode, open the Control Panel and double click the MetriQ icon to open the MetriQ Applet. You will be asked to supply the following information:

  1. Server Name: This is the name of the networked server that has the Database Manager installed, as well as the MetriQ Database (see also Install MetriQ Database below)
    Port Number: Typically 3050. consult your Database Administrator if this has changed.
  2. Database File: The location of the MetriQ Database file. Typically, this would be:

    <Drive>:\Program Files\MetriQ\DBMQF\IBMetriQ.fdb or \IBMetriQ.gdb when Database Server is running the Windows operating system, and /SomeFile/IBMetriQ.gdb when on a linux server.

    Note: The folder that stores this file should NEVER be shared.

- Install MetriQ Database

Use this installation configuration to install the Firebird Database Manager and the MetriQ Database onto a networked server. All client machines can then be connected using the protocol, Server Name and Database File detailed above in option 2). The MetriQ timing engine will NOT be installed on the server.



2. Interbase versus Firebird

MetriQ uses an industrial strength database to store its data. The preferred choice is Firebird, but MetriQ will also run using Interbase 6.0.2 or greater. As a user, and with an existing installation of Interbase on the target install machine, you will need to decide if you keep the Interbase install or if you remove it and use Firebird (See also Connection Issues in the MetriQ online Help documentation).

A). Check what other software you have that uses Interbase. If none, then uninstall Interbase from your machine in favor of Firebird.

B). If you have software that uses Interbase, consult with the manufacturer of that software if it will run using Firebird. If yes, then it is suggested that you uninstall Interbase from your machine in favor of Firebird.

Remember to do a full backup of all your data before committing yourself to these changes.

3. Advanced Installation Notes

During the installation process you may be asked to update or remove installations of Interbase or Firebird. Although MetriQ will happily run with both Database Servers (beyond given version numbers), Firebird is the preferred option unless other mission critical software uses Interbase and cannot be migrated to Firebird.

Older versions of Interbase:
MetriQ will not run with versions of Interbase older than 6.0.2. If you plan to stay with Interbase, then it is suggested that you upgrade to version 6.02 or above. This version of Interbase is supplied on the Install Disk in the Tools directory, and is called IB602.exe.

Older versions of Firebird:
If you are currently using a version of Firebird that is older than 2.0, then it is suggested that you uninstall this version of Firebird in favor of the latest release. This version of Firebird is installed by MetriQ and in addition can be found in the Tools folder. Upgrades and patches can be found at the Firebird web site http://www.firebirdsql.org.


4. Uninstalling Interbase and Firebird.

In general, removing software from Windows follows a set procedure. First open the Control Panel, select the Add/Remove Programs Applet, and finally select the software icon related to the program you wish to uninstall.

Specifically for Interbase and Firebird

Windows 2000: Go Start > Settings > Control Panel. Open the Add/Remove Programs Applet. Find the icon named Interbase or Firebird. Click the Remove Button.

Window XP/Vista (Classic View): Go Start > Control Panel. Open the Add/Remove Programs Applet. Find the icon named Interbase or Firebird. Click the Remove Button.

Window XP/Vista (Classic View): Go Start > Control Panel. Open the Add/Remove Category. Find the icon named Interbase or Firebird. Click the Remove Button.

5. Security and data encryption/compression

If you require a secure connection between a Firebird Server and its remote clients, we recommend the use of a third party tool to provide encryption and data compression. One such product is ZeBeDee found at http://www.winton.org.uk/zebedee.

Synopsis:
ZeBeDee is a software tool to establish an encrypted, compressed “tunnel” for TCP/IP or UDP data transfer between two systems. ZeBeDee works in both Linux and Windows platforms, it’s completely free for commercial and non-commercial use, and it’s distributed under the terms of the GNU General Public License.

6. Troubleshooting

Unable to connect to the Database?

  1. Make sure the Firebird Database Manager is correctly installed. Open the Control Panel and locate the Firebird Icon. If not found, Firebird has not been installed. From the installation disk, open the folder called tools. Run the firebird installer Firebird-2.0.1.12855-1-Win32.exe. When done, retry your database connection.
  2. Make sure the Firebird Database Manager is running as a service. Open the Control Panel and locate the Firebird Icon. Double click the icon to open the Firebird Server Control. If the Firebird icon has a red cross, click the button labeled Start.
  3. Make sure your connection string from your machine to the Firebird Database Manager is correct. For this you will need to specify the following:
    • the name of the Server used to house the Firebird Database Manager (This is either the name of the server or its dotted ip address).
    • the folder location of the .FDB or .GDB database files.

    Examples:

    For a standard standalone install your settings should be something like:

    Server: (n/a); Folder location: c:\Program Files\MetriQ\DBMQF\IBMetriQ.FDB

    For a Client/Server connection to a Server named Mars.

    Server: Mars; Folder location: c:\Program Files\MetriQ\DBMQF\IBMetriQ.FDB

    For a Client/Server connection to a LINUX server named 173.43.2.99

    Server: 173.43.2.99; Folder location: /DBFiles/IBMetriQ.FDB

 


7. Firebird Backup and Restore

To backup and restore your MetriQ database you either:

1. Use MetriQ's Applet (Opened from within the Windows control panel on the Server). However, you can only use this option if you installed MetriQ on the Server (the applet does not need to be registered to use it). Click on the Help pages from within the Applet for more information on Backup and Restore. Note: If you installed MetriQ as a standalone, this will be the preferred option.

2. Use GBAK. This will typically be used if you did not originally store MetriQ on the Server (say for example you are using Linux as the OS for the Server) and as such do not have access to MetriQ's Applet. You can also use the Backup.bat and Restore.bat dos batch files that are installed by MetriQ into the /DMBQF directory. However, you most probably will need to change various settings depending on your own database location - see the gbak options below.

Using GBAK:

GBAK is able to perform a backup while the database is running, so there is no need to shut down the database during a GBAK backup. GBAK creates a snapshot of the database at the time it starts running - however, you may notice a perfomance degradation during the backup process , so it is a good idea to backup at night.

General Syntax:

gbak <options> -user <username> -password <password> <source> <destination>

Backup:
For backups, <source> is the database you want to back up, <destination> is the file name of the backup file. MetriQ uses the .MQF extension for the backup. Note: Only SYSDBA or the database owner can perform a backup.

Restore:
For restores, <source> is the backup file and <destination> is the name of the database that is to be built up from the backup file. You will have to specify the -C option for restore. For restore, ALL USERS MUST be logged off the database otherwise you risk database corruption.

General Options

-pa[ssword] <password>
Database password
-role <role>
Connect as role
-se[rvice]
  <hostname>:service_mgr
Backup: Creates the backup file on the database server, using the Service Manager.
Restore: Creates the database from a backup file on the server, using the Service Manager.
-u[ser] <username>
Database user name
-v[erbose]
Verbose output of what GBAK is doing
-y <filename>
Redirect all output messages to <filename>
The file must not exist before running GBAK!
-y suppress_output
Quiet mode
-z
Show GBAK version and server version

Backup Options

-b[ackup_database]	
Back up. This switch is optional.
-co[nvert]
Converts external tables to internal tables
-e[xpand]
Creates an uncompressed backup
-fa[ctor] n
Blocking factor for tape device
-g[arbage collect]
Does not perform garbage collection (sweeping) during backup
-ig[nore]
Ignores checksum errors while backing up
-l[imbo]
Ignores limbo transactions while backing up
-m[etadata]
Only backs up metadata (schema). No table data will be stored.
-nt
Non-transportable format (use only when you know you will restore on same platform and database version)
-t[ransportable]
Creates a transportable backup (transportable between platforms and server versions)

Restore Options

-bu[ffers]
Set cache size for restored database
-c[reate_database]
Restore to a new database (the target database file MUST NOT exist)
-i[nactive]
All indexes will be restored as INACTIVE
-k[ill]
Does not create shadows that are defined in the backup
-mo[de] read_write
Restores to a read/write database (This is the default)
-mo[de] read_only
Restores to a read-only database
-n[o_validity]
Does not restore validity constraints. So you can restore data that does not meet these constraints and could not be restored otherwise.
-o[ne_at_a_time]
Restores one table at a time. You can use this to partially restore databases with corrupt table data
-p[age_size] <size>
Sets page size of new database. <size> can be one of 1024, 2048, 4096, 8192. Default is 1024.
-r[eplace_database]
Restores over an existing database. This can only be performed by SYSDBA or the owner of the database that is overwritten. Do NOT restore over a database that is in use! [Firebird 1.0, 1.5]
-rep[lace_database]
New abbreviation for the old -replace_database [Firebird 2.0]
-r[ecreate_database] o[verwrite]
[Firebird 2.0] Restores over an existing database. This can only be performed by SYSDBA or the owner of the database that is overwritten. Do NOT restore over a database that is in use!

-r is equivalent to -c. Only the "overwrite" option will restore over an existing database.

-use_[all_space]
Normally, on restore, database pages will be filled to about 80 %. With the use_all_space option, database pages will be filled to 100 %. (Useful for read-only databases which will see no more modifications.)

Examples

A "normal" Backup:

gbak -v -t -user SYSDBA -password "masterkey" dbserver:/db/warehouse.fdb c:\backups\warehouse.fbk

Backup with output to a logfile

del c:\backups\warehouse.log
gbak -v -t -user SYSDBA -password masterkey -y c:\backups\warehouse.log dbserver:/db/warehouse.fdb c:\backups\warehouse.fbk

A "normal" Restore

gbak -c -v -user SYSDBA -password masterkey c:\backups\warehouse.fbk dbserver:/db/warehouse2.fdb

Restore to an already existing database (Firebird 2.0)

gbak -r o -v -user SYSDBA -password masterkey c:\backups\warehouse.fbk dbserver:/db/warehouse.fdb

Firebird 2.0

Firebird 2.0 does not allow normal database access to the security database. Its name is now security2.fdb

The only way to access the security database is via the Service Manager. As GBAK can also use the Service Manager (Option -se), you can run a backup using this option. However, the backup file will also be written to the server machine.

General Syntax:

gbak <options> -user <username> -password <password>
-se <servername>:service_mgr <sec-db-name> <backup-filename>

Example:

gbak -v -t -user sysdba -password masterkey
-se dbserver:service_mgr c:\Programme\Firebird2\security2.fdb C:\Backups\Security2.fbk

(in this case, Security2.fbk will be written to the C:\Backups folder of dbserver)

When your database server listens on a non-default port:

gbak -v -t -user sysdba -password masterkey
'-se dbserver/3051:service_mgr c:\Programme\Firebird2\security2.fdb C:\Backups\Security2.fbk

Restoring the Security Database

It is not possible to restore the security database while Firebird is running. In case your security database gets destroyed, this is what you can do:

  • Stop the Firebird service/daemon

  • Replace the current security database with a new one. If anything else fails, re-install the Firebird server

  • You should now have a working SYSDBA login and password. If not, re-install the Firebird server ...

  • Start the Firebird service/daemon

  • Using GBAK, restore your backup of the security database to a temporary place (like C:\Temp\security.fdb)

  • Stop the Firebird service/daemon again

  • Now copy the file from the temporary place to the correct place in the Firebird folder

  • Start the Firebird service/daemon

  • Now you should have your "old" security database back.

See also MetriQ Applet, Database Security, Connection Issues, Installing MetriQ, Firewalls, System Requirements, Troubleshooting, Multi-User Environment

Disclaimer:

METRIQ SHALL NOT BE LIABLE TO THE LICENSEE FOR ANY LOSS OR DAMAGE WHATSOEVER OR HOWSOEVER CAUSED ARISING DIRECTLY OR INDIRECTLY IN CONNECTION WITH THIS LICENCE, THE SOFTWARE, USE OF THE SOFTWARE, THE LICENSEE’S INABILITY TO USE THE SOFTWARE OR ANY OTHER ACTION OR RESULT RELATED TO METRIQ SOFTWARE, EXCEPT TO THE EXTENT TO WHICH IT IS UNLAWFUL TO EXCLUDE SUCH LIABILITY UNDER THE APPLICABLE LAW.

Please refer to the licence agreement for full details of the licence

© MetriQ Limited 2004-2007

  MetriQ time tracking software - not a timesheet in sight!
©Copyright 2004-2007 MetriQ Limited All Rights Reserved. MetriQ Software is Patent Pending