Converting a database to run on Linux

For questions and postings not covered by the other forums
Rich Cassell
Posts: 77
Joined: Mon Aug 24, 2009 11:22 pm
Location: Nottinghamshire, UK

Converting a database to run on Linux

Postby Rich Cassell » Tue Oct 12, 2010 10:29 pm

Hello,

We are currently toying with the idea of moving our test databases from a machine running Windows Server 2003 to a new machine running Linux Fedora. We are running Jade 6.2.17 and i have successfully installed the Red Hat Jade Installation onto the Linux machine ready to copy across one of the databases. We are intending to fully test the system before we continue copying the rest.

I am currently working from "Chapter 4 Converting a User Database" of the "JADE Runtime Application Guide" to help me with this task, but i thought i'd check on here if anybody has done this before and whether i am likely to hit any issues?

I understand that every system will have different uses and therefore different problems but i thought if there are any generically known problems then i can at least prepare for them! Also, can anybody offer any guidance on where i can find the "JadeConvertDb application? I have looked for it but not found it :-s... I imagine this will be glaringly obvious when i am told...

Any help, or experience, will be very appreicated.

Thanks!

Rich

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: Converting a database to run on Linux

Postby Dr Danyo » Wed Oct 13, 2010 12:57 am

Hi Rich,

A quick search of the help shows that it's an Application in the RootSchema, you can invoke it by using the JadClient command line tool e.g

To convert a user database, specify the following parameters in the jadclient program.
jadclient path=database-path
schema=RootSchema
app=JadeConvertDb
ini=jade-initialization-file
endJade
defaultPath=default-destination-map-file-directory
[codepage=codepage-identifier]
[copies=number-of-multiple-parallel-file-copies]
[existing=true|false]
[userPath=map-file-directory
[mapFile]
[overwrite=true|false]
[rebuildDicts=true|false]
[userData=true|false]
[userSchema=true|false]

regards, Dr Danyo.

Rich Cassell
Posts: 77
Joined: Mon Aug 24, 2009 11:22 pm
Location: Nottinghamshire, UK

Re: Converting a database to run on Linux

Postby Rich Cassell » Wed Oct 13, 2010 2:12 am

Thanks Dr Danyo!

I have started it on cmd prompt and it appears to be running fine.

I will update thread on whether it works!

Cheers :)

Rich Cassell
Posts: 77
Joined: Mon Aug 24, 2009 11:22 pm
Location: Nottinghamshire, UK

Re: Converting a database to run on Linux

Postby Rich Cassell » Wed Oct 13, 2010 3:33 am

Hello,

Ok this has now completed but has reported a failed database conversion. Below has been taken from the jommsg log. It actually appeared to get to the last file as well so it's strange that it hit a limit at that point...
2010/10/12 16:20:11.097 15afc-15754 PDB: Maximum allowed DB file number: 2098 exceeded - increase INI PersistentDb.FileNumberHeadroom value
2010/10/12 16:20:11.207 15afc-15754 PDB: <ServerTaskUser> encountered database error (3003)
2010/10/12 16:20:11.472 15afc-15754 JomLog: Unhandled SystemException: Exceeded maximum allowed files for database, see JadeConvertFile.log for details
2010/10/12 16:20:11.847 15afc-15754 CvtDb: [187.16] convert CANCELLED.
2010/10/12 16:20:12.019 15afc-15754 ApplicationThread: TERMINATE NON-GUI Application, schema=RootSchema, app=JadeConvertFile, lastException=0
2010/10/12 16:20:13.239 1490c-15d90 Jom: Remote process delete: node oid=[186.5], node=0x362ef10, oid=[187.16], process=0x3640f10, type=2 (non-prodn), scm=RootSchema, app=JadeConvertFile
2010/10/12 16:20:13.239 15afc-15bbc Jom: Local process delete: oid=[187.16], process=0xc64008, no=4, id=87892, type=2 (non-prodn), scm=RootSchema, app=JadeConvertFile, start time=15:08:20.350, elapsed time=01:11:52.888
2010/10/12 16:20:13.239 15afc-15754 ApplicationThread: NON-GUI Application SignOff, schema=RootSchema, app=JadeConvertFile
2010/10/12 16:20:30.576 15afc-159dc PDB: EOT <Database Worker>
2010/10/12 16:20:30.779 15afc-150e0 PDB: EOT <Bg Flush>
2010/10/12 16:20:30.779 15afc-143b0 PDB: EOT <Buffer Overlay>
2010/10/12 16:21:36.483 15afc-1a90 PDB: Database closed successfully
2010/10/12 16:21:36.889 15afc-1a90 CvtDb: Database convert *** FAILED ***

It refers to a "FileNumberHeadroom" value of the [PersistentDb] section in the INI file - this value is not specified in the INI file in use so i assume it will be a default value. What is this value?

Any help in getting this working would be great!

Cheers,

Rich

murray
Posts: 144
Joined: Fri Aug 14, 2009 6:58 pm
Location: New Plymouth, New Zealand

Re: Converting a database to run on Linux

Postby murray » Wed Oct 13, 2010 7:52 am

Hello,
It refers to a "FileNumberHeadroom" value of the [PersistentDb] section in the INI file - this value is not specified in the INI file in use so i assume it will be a default value. What is this value?
Any help in getting this working would be great!
It's documented inJADini.pdf (ch 1, p33), which says the default is 2048. It would pay to read the associated description as it probably relates to what you are doing.
Murray (N.Z.)

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Converting a database to run on Linux

Postby BeeJay » Wed Oct 13, 2010 7:54 am

From the JADEini.pdf Help file:

FileNumberHeadroom
Value Type Integer
Default 2048

Purpose
The FileNumberHeadroom parameter specifies by how much the highest allocated file number can be increased in the current database server session (in the JADE development environment or by using the jadload or jadloadb program) without restarting the database server. The highest database file number cannot be greater than 65,484.

Parameter is read when…
The database server node is initialized; for example, when you restart the database server.

Hint
If you anticipate that you will add database files that would increase the highest used file number by more than 2,048 in the current work session, increase this value so that you do not have to restart the database server. (Exception 3003 is raised when the value defined for this parameter is exceeded in a work session.)

Cheers,
BeeJay.

Rich Cassell
Posts: 77
Joined: Mon Aug 24, 2009 11:22 pm
Location: Nottinghamshire, UK

Re: Converting a database to run on Linux

Postby Rich Cassell » Fri Oct 15, 2010 1:45 am

Hi Murray / BeeJay,

Thank you both for your info on the FileNumberHeadroom value.

After 4 different attempts (on different copies of the same database) i managed to find a number which allowed the conversion to complete. Out of interest, the number of files was 3908....

Thanks again for your help!... Now i have to actually get it to work :P .


As a point, i know you the help PDF had a brief description of what it is, but can anybody give me a very basic idea of what it means by "file number"? I figured originally it was the number of objects / dictionaries in the c_system folder... but that is only 503 in this case... I then figured it may be the number of files in the entire database/server/ folder... but that is less than 2000....

The reason i am interested is this isn't our smallest database so it would be good to have a way of getting the required value before running the JadeConvertDb application.

Cheers! :D

Rich

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Converting a database to run on Linux

Postby BeeJay » Fri Oct 15, 2010 7:57 am

See if the following code helps.

Cheers,
BeeJay.

Code: Select all

vars dbFile : DbFile ; fileCount : Integer ; highestFileNumber : Integer ; highestFileName : String ; begin foreach dbFile in DbFile.instances do fileCount := fileCount + 1 ; if dbFile.number > highestFileNumber then highestFileNumber := dbFile.number ; highestFileName := dbFile.name ; endif; endforeach; write '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'; write 'File count = ' & fileCount.String ; write 'Highest file number = ' & highestFileName & ' (' & highestFileNumber.String & ')'; write '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~';

GerardO'Brien
Posts: 12
Joined: Tue Jul 07, 2009 9:49 am

Re: Converting a database to run on Linux

Postby GerardO'Brien » Fri Oct 15, 2010 8:16 am

BJ's code should help you.

What you are providing is the highest file number you want or need the database file access array to be indexable by.

In the old days it was dynamically resized, and that involved locks and maneuvers affecting everything accessing files on the off-chance the array would need extending by some file add or another. And so everything suffered a performance penalty so the 'off-chance' event could be handled. Now that array is a fixed size.

When you are loading a schema from somewhere or someone else it will have file numbers in the databaseFileDefinitions that are relative to the system the schema was extracted from and these numbers are almost always inconsistent with your own system's file numbering. It is good practice to check and edit file numbers in .scm files when loading a borrowed schema because if a number specified can be used, it will be used.

Rich Cassell
Posts: 77
Joined: Mon Aug 24, 2009 11:22 pm
Location: Nottinghamshire, UK

Re: Converting a database to run on Linux

Postby Rich Cassell » Mon Oct 18, 2010 11:24 pm

Thanks BeeJay for the code! It's very useful :).

Thanks also Gerard for your detailed description! It's good to know for anytime we do use borowed schemas.


Cheers guys ;)


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 23 guests