Question
· Apr 28, 2016

Can I migrate a cache.dat file from a Windows instance to a RHEL instance of Caché?

If I have a cache.dat file from a Windows 2012 (64-bit) machine and I want to mount it on a Caché instance running on RHEL, will it work? Assume the versions of Caché are the same.

Discussion (6)0
Log in or sign up to continue

It should work going from Windows to RHEL without conversion. 

Going from the same version of Cache to the same version, e.g. 2015.1 to 2015.1 should work without any changes.  Going to a newer version, one should follow the appropriate upgrade procedures in the documentation for the particular version.

Going back versions can present multiple problems and is not recommended.  If you were to want to go from say 2015.1 to 2014.1, you would most likely want to export and import data, classes and routines.  From one version to another, new keywords and classes, etc may have been added that are not compatible with older versions.

Some platforms do have different endian versions, for example, going from Windows to AIX on PowerPC requires the cvendian tool to be run to convert the the endian versions.

Here is an example of using cvendian to convert the endian of a CACHE.DAT file:

c:\C2K1522\bin>cvendian

Usage:  cvendian [-option] file1 [file2 ... file8]

        -option = -b[ig], -l[ittle], or -r[eport]

Note:  Running without an argument shows you usage

c:\C2K1522\bin>cvendian c:\C2K1522\mgr\user\CACHE.DAT
This database is little-endian.
This database has a block size of 8192 Bytes.

This database has 1 map.
The last block is 18432.

Original manager directory is c:\c2k1522\mgr\user\
18000 blocks (97%)
Done converting c:\C2K1522\mgr\user\CACHE.DAT to big-endian

c:\C2K1522\bin>

Note:  cvendian is an executable in the bin directory of you cache installation

The CACHE.DAT file should be dismounted before cvendian is run against it.

Also, if you do not know the endian of your two machines you can check fairly easily in cache like so:

%SYS>D ^%ST w %ST("indian")

It will display a 1 or a 0 depending on the endian of the system.  Systems with matching endians do not need a conversion to be run in order to use each others databases