Kbase 19211: How To Identify Application Tables In A Version 9 Database
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.x
SYMPTOM(s):
Table <table name> and its indexes can be modified or dropped only by SQL92. (6547)
CAUSE:
The Progress Version 9.x database has many more non-application tables in it than in previous versions (non-application tables refer to metaschema and system tables, that are not part of the application).
The tables support the SQL-92 engine for the database. Some users access the metaschema tables for information on the tables that make up their application. The new Version 9.x tables might make some of these programs break.
FIX:
The Version 9.x metaschema can be viewed as two parts:
- The Progress, or 4GL that the Progress client accesses.
- The SQL-92 part that is accessed by the SQL-92 engine (ODBC and JDBC access).
The 4GL part still has metaschema tables starting with '_'. They are all numbered less than 0. In the past, this provided two search criteria for identifying the application tables:
- FOR EACH _file WHERE _file._file-name < '_' :
- FOR EACH _file WHERE _file._file-number > 0 :
With the Version 9.x database, there are some system tables that do not begin with '_' and have a file number > 0.
There is a new field in the Version 9.x _file table called _owner. This can be used to identify the tables that belong to the 4GL part of the database. All 4GL tables are owned by "PUB". So, the criteria for findind the user-defined tables in the database are:
- Tables where _file._owner = "PUB"
- Tables where the file-number is > 0
FOR EACH _file WHERE
_file._owner = "PUB" AND
_file._file-number > 0:
NOTE: When you try to update fields in _file that correspond SQL-92 tables, you get the following error message:
Table <table name> and its indexes can be modified or dropped only by SQL-92. (6547)
If you receive this error message, use the _owner and _file-number fields to filter tables that can be updated by the 4GL.