Elevate Software


Login Login

ProductsBulletSalesBulletSupportBulletDownloadsBulletAbout





Home  Elevate Software Blog

Icon Elevate Software Blog

Tags Showing all blog entries tagged with "Mirroring"

Mirroring DBISAM Database Server Code
Posted by Tim Young on Wed, Jul 29 2015

You can (finally) download the promised mirroring server for DBISAM 4.35 and higher here:

Mirroring DBISAM Database Server Code

It will mirror one (and only one) database to another local or remote database, and works safely with transactions. The mirroring functionality will automatically try to open, and create if necessary, two tables in the source database:

MirrorData
MirrorLog

MirrorData Table

The MirrorData table holds any data that is pending for mirroring. The ActionType field in the MirrorData indicates the type of operation:

MIRROR_INSERT = 1;
MIRROR_UPDATE = 2;
MIRROR_DELETE = 3;
MIRROR_STARTTRANS = 4;
MIRROR_COMMIT = 5;
MIRROR_ROLLBACK = 6;

The TableName field indicates the table on which the operation occurred (if applicable). The OldValues and NewValues fields contain the record data for record operations, and the Tables field contains the list of affected tables for transaction operations.

MirrorLog Table

The MirrorLog table contains all mirroring error messages, and the date/time when they occurred.

Mirroring Parameters

The mirroring parameters are controlled via a special section in the dbsrvr.ini file. Paste the following section into your dbsrvr.ini and modify as necessary in order to properly set up and enabled the mirroring server.

[Mirror Parameters]
; Mirror update interval (default is 1000 milliseconds)
Mirror Update Interval=1000
; Max mirror failure retries (default is 4)
Mirror Max Fail Retries=4
; Mirror session type (0=Local 1=Remote)
Mirror Session Type=0
; Mirror remote session host name
Mirror Remote Host=
; Mirror remote session address
Mirror Remote Address=127.0.0.1
; Mirror remote session port
Mirror Remote Port=12005
; Mirror remote session service name
Mirror Remote Service=
; Mirror remote session user name
Mirror Remote User=Admin
; Mirror remote session password
Mirror Remote Password=DBAdmin
; Mirror ping interval (default is 30 seconds)
Mirror Remote Ping Interval=30
; Mirror database (directory if session is local, database name if session is remote)
Mirror Database=c:\mirrortarget
; Name of database to mirror
Mirrored Database=Source
; Tables to mirror, comma-separated, or single asterisk (*) for all tables (default)
Mirrored Tables=*

The Mirror Max Fail Retries determines how many times the DBISAM Database Server will attempt to retry a mirroring operation before it suspends mirroring. If mirroring is suspended, then stopping/starting the DBISAM Database Server will allow the mirroring to resume. However, if the error being experienced is fatal, such as a key violation, you will need to manually edit the MirrorData table and edit/remove the offending mirroring operations in order to allow the mirroring to successfully resume.

If you have any questions or problems, just let me know. If everyone likes this, I can see about making it a more permanent part of DBISAM so that it shows up in the Server Administration Utility, etc.

Tags: DBISAM, Mirroring, ReplicationPermanent Link 0 Comments


Image