peter Maher
31st March 2023, 15:13
Hi All

I hope someone can advise.

I have ODBC access to BAAN.
Is there a sql statement I can run to extract the table definition, column name ,type , table join if FK and description etc?

I do not have user access to BAAN only ODBC (SQL) access as I am a report writer.

Many thanks in advance.

Kind Regards.

mark_h
3rd April 2023, 21:26
I don't have a sql statement to run but I would look at ttadv420(table definitions), ttadv421(indexes) and ttadv422(table fields). Of course you will need to know which VRC is active for a table. I can't imagine doing this without baan access. Plus these tables are in company 000. So in pl/sql ttiitm001101.t$copr would reference a production table with information and some thing like select * from baan.tttadv420000 would get the tools tables. Hopefully someone can give you more information.

OmeLuuk
4th April 2023, 15:27
.... Hopefully someone can give you more information. Think of Baan as being a relational database management system that not only stores the predefined data in predefined tables but also stores the database structure itself in so called "tools tables" together with almost all that is needed to use that database system. Look at this as Data Dictionary.

Downloading the structure itself is quite a feat, specially when you know a bit of the complexity that is possible with the so called derivation structure, as some stored tools components are not used because another component (database record) takes precedence. Like an update on a table is used instead of the primary record, given the update is present. Or customizations that take precedence over a standard component.

When you want only the current database structure (and its limitations) specially for one table, you better search for the RDD file, which is short for Runtime Data Dictionary ("the current version in a machine (and human) readable version without database access") for the current Package Combination.

These files (one per table with the current settings and one for the domains per package) are located in ${BSE}/dict/.

Those files give good insight in the database structure.

Bruce21
28th April 2023, 12:17
i have written a tool which will read and transform the data dictionary of ln - result is a view which is "human-readable". if you are interested please let me know.
Features out of the box includes like fieldnames in selectable language , enum and datetime conversion, mssql/oracle support and some more