To set up multi-company with separate schemas (table ownership)

Specify database table ownership using the -o option to xdbcutil when creating your system catalog.

For example, there could be two tables named AcctTbl — one owned by company01 and one by company02.

Filename      Database Name    Owner Table name
ACCT01 dd company01    AcctTbl
ACCT02 dd company02 AcctTbl

On the command line, you specify:

xdbcutil -d <catalog_dir> -x <xfd_dir> -o <owner's name> -a xfdname#tablename#filename

Or in this case:

xdbcutil -d c:\data\dict -x c:\data\XFD -o company01 -a mainxfd#accttbl#acct01 
xdbcutil -d c:\data\dict -x c:\data\XFD -o company02 -a mainxfd#accttbl#acct02

Then you can access all the data files with one SQL query to one data source name (DSN), like this:

SELECT * FROM company01.accttbl UNION SELECT * FROM company02.accttbl WHERE .....

You can also use a SYNONYM for company01.acctbl, such as acctab:

CREATE SYNONYM acctab FOR company01.acctbl;
Note: If you don't want a table owner to be listed publicly in applications like Microsoft Access, specify “-o “ ” ” when loading the table with xdbcutil and set the IGNORE_OWNER variable to 1 (on, true, yes) in your configuration file.