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> xfdname#tablename#filename
Or in this case:
xdbcutil -d c:\data\dict -x c:\data\XFD -o company01 mainxfd#accttbl#acct01 xdbcutil -d c:\data\dict -x c:\data\XFD -o company02 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 AND company02.accttbl WHERE .....
You can also use a SYNONYM for company01.acctbl, such as acctab:
CREATE SYNONYM acctab FOR company01.acctbl;