Last DB Modification ?

rzr

Member
OE 10.1C, Windows

How do I find when was the last date/time schema was modified?
We are getting CRC errors and I'm trying to recompile each program that reports an CRC error now.
Before I begin a full recompile, I wanted to know if it is possible to check when the last schema change was made and "if possible" what they were?
There are _File._Last-modified & _Field._Last-modified fields in metaschema but looks like these fields never got populated.
 
AFAIK, unless you've enabled auditing with a corresponding auditing policy or you've rolled your own process to audit such events there is no way. AFAIK the database does not provide such information out-of-the-box - it only provides the last update time stamp which is not tied to any particular type of change.

Heavy Regards, RealHeavyDude.
 
I wrote a script to compare the _File and _Field records from dev and test databases. There were schema changes done on dev database over this weekend on few tables.
I ended up doing a full compile of dev.

Question - If there was a schema change on only one or two existing tables (like field additions / drop) then is it possible to find all impacted program from any sort db / table usage tool or metaschema tables, i'm trying to do away with full dev compile for small schema changes?

Right now I can only think of grep'ing for that table/field to find the list of impacted tables or invest in 3rd party tool like Pro4M that will give me details such a these.
 
I'm sure it's possible to do what you want, but in all honesty I think a full recompile after schema changes is by far and away the safest option.
 
The TABLE-LIST attribute on the RCODE-INFO system handle returns a comma-separated list of all tables referenced in the r-code file specified.
Code:
 ASSIGN RCODE-INFO:FILE-NAME = yourRFile.r.
MESSAGE RCODE-INFO:TABLE-LIST VIEW-AS ALERT-BOX INFO.
Probably this is more what you are looking for ...

Heavy Regards, RealHeavyDude.
 
Thanks RHD. TABLE-LIST attribute is good. Now all I need to do is to read this value for all the .r's in my dev source code, pull those in to a temp-table (s).
And then query this temp-table to see what are all the programs that reference a specific table.
 
You could even check each individual r-file because the TABLE-CRC-LIST attribute on the RCODE-INFO system handle will return a comma-separated list of the CRC value for each table referenced in the r-code file specified by the RCODE-INFO:FILE-NAME attribute. You could compare that value against the ones stored in the _File. The only weakness is that you don't catch CRC changes in the indexes because they have their own CRCs and the RCODE-INFO system handle won't give you the same type of information for indexes as it does for tables.

Heavy Regards, RealHeavyDude.
 
Back
Top