May 16th, 2013
Microsoft introduced database mirroring in SQL Server 2005 to increase database availability. Database mirroring maintains two copies of a single database on different server instances. One instance is the primary or principal server, the other instance is the standby or mirror server. If the principal server goes down the mirror server can take over with no loss of committed data.
All SQL Server databases record data changes in a transaction log before any changes are made to the actual database. In database mirroring, the principal server writes the transaction log buffer to disk and simultaneously sends it to a mirror server. The transaction log records are then replayed on the mirror server to keep the two database instances in sync. A third (optional) server witnesses the health of the principal and mirror servers to enable automatic failover.

Setting Up Mirroring in your DataFlex application
- Create the principal and mirror databases.
- Enable FULL Recovery Model.
- Create listening endpoints.
- Backup the principal database
- Restore the backup to the mirror.
- Enable the mirroring session.
- Use the Mertech SET_MIRROR_SERVER command to define the failover server.
Note: For additional details see the Mertech whitepaper Database Mirroring with Mertech Flex2SQL for MS SQL Server
Summary
Fast failover with minimal data loss has traditionally involved higher hardware cost and greater software complexity. Database mirroring, however, can fail over quickly with no loss of committed data, does not require proprietary hardware, and is easy to set up and manage. Using SQL Server Mirroring, you can ensure that your application is up 24/7.
Posted in Development Tools | No Comments »
April 30th, 2013
Background
The Mertech Flex2SQL GUI migration tool and Mertech drivers use 01/01/0001 as the default NULL value for DataFlex DF_DATE and DF_DATETIME fields to be consistent with the DataFlex dummy zero date setting.
Note: The MSSQL drivers use 01/01/1753 as the default null value.
Note: The MySQL drivers (Windows versions 12.0.6020.0 and 12.1.6020.0 and SCO version 11.0.5702.1) were modified in March of 2012 to use 00/00/0000 as the default NULL value.
Problem
Crystal Reports versions 9.0 and above have a lower date bound of 01/01/0100.
Solution
A solution is provided by Crystal Reports and described in ADAPT00175452 Patch ID: 36375929:
Read the rest of this entry »
Posted in DB2, Flex2Crystal, Flex2SQL, MySQL, Oracle, PostgreSQL | No Comments »
April 30th, 2013
Problem
A customer reported a problem synchronizing two MySQL databases. One database resides on the Web and the other database resides on a PC. The databases are updated independently and each uses the auto increment RECNUM column as a unique index. When a two-way synch is performed between the databases, duplicate records are flagged because records in each database were assigned the same RECNUM value.
Solution
Eliminate the auto increment option for RECNUM and assign odd RECNUM values for one environment and even for the other.
Read the rest of this entry »
Posted in Code Examples, MySQL | No Comments »
March 28th, 2013
There are many new features in Crystal Reports 2011, but here are the top 5 that we think are most relevant to our community.
Read the rest of this entry »
Posted in Flex2Crystal | No Comments »
February 28th, 2013
Improper selection of the client or server language, territory, or character set can result in a garbled text display on the client and corrupted or truncated data being stored in the database.
- LANGUAGE specifies the language used to display messages, day names, and month names
- TERRITORY specifies monetary and numeric formats, and conventions for calculating week and day numbers
- CHARACTERSET controls how characters are mapped for storage. Single-byte character sets (like, WE8ISO8559P1 or WE8MSWIN1252) store each character in one byte. These character sets can be used if your language only contains ASCII characters like A-Z,a-Z,0-1 and ./?,*# etc. National character sets (like AL16UTF16, AL32UTF8, or UTF8) use multi-or variable-byte encoding, so each character can occupy 1, 2, 3 or more bytes. For example, AL32UTF8 and UTF8 encode ASCII characters in one byte, special characters (like ç, ñ , é) in two bytes, some multilingual characters in three bytes, and certain mathematical symbols in four bytes.
Read the rest of this entry »
Posted in Error Messages, Flex2SQL, Oracle | No Comments »