David Underhill · May 5

Should the "Resource" for a local Database be stored centrally or with the DAT file?

I am sure I came across this in the past with Cache and just saw this again in IRIS.

When rebuilding or swapping a DAT file for a database it retains the Resource of the DAT file, not the Resource of the Database it is being used for.

For instance, if I have a local Database called APP with a resource %DB_APP and I want to refresh the data from another Database called TEST that has a Resource %DB_TEST I can just copy the DAT file from the TEST folder to the APP folder.

No Database settings are changed and it is all done with either IRIS down or the databases dismounted.

If you now look at the Database settings for the APP database it has the %DB_TEST resource not the %DB_APP it had before.

This is not necessarily a common occurrence and can obviously be handled but it something that can catch people out and not initially noticed.

What is peoples preference, should it keep the Resource for the Database settings or the DAT files?

For me, personally, I would prefer to keep the settings separate from the DAT file.

0 84
Discussion (5)0
Log in or sign up to continue

Every Database in Caché or IRIS has a "NickName" (TEST, APP, USER, *TEMP, ..)
The file location is just a pointer related to the location of the file used
Similar Resource is an attribute to this "NickName".  and NOT to the related file
Changing it affects user access, but doesn't care at all about the file location.
The *.DAT file has no information about Resources or its NickName.  

Way back in the past, when file sizes were limited by file systems, there were
"Continuation" Files for Cache.DAT. Those knew the starting Cache.DAT.
But this is decades back and gone and doesn't exist anymore. 

Hi, that was my understanding but I have seen resource issues caused by moving CACHE.DAT in the past and recently had an odd issue on IRIS then did the below to test it.

I just copied the IRIS.DAT from the USER database folder, which has the %DB_USER resource, to another database folder which had %DB_%DEFAULT and afterwards the other database had %DB_USER instead of %DB_%DEFAULT and so it seems the Resource does move with the DAT file.
The copy was done manually with windows file copies while IRIS was down and no config changes made.

This is all viewing the database resource via the portal in  System > Configuration > Local Databases

The name of the security resource associated with the (CACHE|IRIS).DAT file is embedded in the label block in the database itself.

Thanks for the explanation, I assumed it worked something like that.

Do you agree with that approach though or would you prefer something more like Robert's description?

In my mind you don't create a database based on a specific file so the DAT should be swappable and retain the database settings, other database settings work that way.