One of the possible solutions is using Rscope, the other is to perform a reload 
of the database.

 

The first step is unload the database

 

  CONNECT <dbname>

  SET NULL -0-

  OUTPUT <dbname>.ALL

  UNLOAD ALL

  OUTPUT SCREEN

  DISCONNECT

  RETURN

 

Then rename the original database 

 

After having done that run the next procedure:

 

  DISCONNECT

  SET TRACE ON

  SET MESSAGES ON

  SET ERROR MESSAGES ON

  SET FEEDBACK ON

  RUN <dbname>.ALL

  SET FEEDBACK OFF

  CLS

  RETURN

 

As you can see I use the statement   set trace on

What I’ll do is running the process in debug  mode using the option ‘Execute to 
Error’

If there is something wrong it will be notified by the debugger and it is easy 
to find out where it is going wrong

 

There is an article available describing database maintenance at www. Razzak.com

http://www.razzak.com/fte/pdf/DatabaseMaintenance.pdf?s_TopicHeader=database 
<http://www.razzak.com/fte/pdf/DatabaseMaintenance.pdf?s_TopicHeader=database&s_KeyWords=&s_TopicCategory=RBG91&FromTheEdgeOrder=Sorter_TopicHeader&FromTheEdgeDir>
 
&s_KeyWords=&s_TopicCategory=RBG91&FromTheEdgeOrder=Sorter_TopicHeader&FromTheEdgeDir=

 

Generally this works well.

 

Tony

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Bruce Chitiea
Sent: zaterdag 9 juni 2012 23:57
To: RBASE-L Mailing List
Subject: [RBASE-L] - AUTOCHK / RSCOPE School

 

All:

 

*rbase 9.1(64) 9.1.5.20510

*Win7

*Non-Production Database

 

R> AUTOCHK 

... produces the error message:

 

   -ERROR- A foreign key references a table not known to be referenced. (1242)

    [OK]

   -ERROR- The number of rows counted was not expected. (1254)

    [OK]

 

The first error appears to result after the creation of a view. A foreign key 
relation between two base tables is redirected to point to the new view, even 
though that column is not referenced within the new view. (More testing 
required.) When this misdirection is corrected by redefining the foreign key in 
the base table, this error goes away in the next AUTOCHK.

 

The second error is persistent.

 

An RScope data check reveals that the row count in system files:

 

SYS_COMMENTS

SYS_COMPUTED

SYS_CONSTRAINTS

SYS_DEFAULTS

SYS_RULES

 

 

... differs from the row count expected by the structure file.

 

Two questions:

 

1) How does this happen?

2) What will I lose by running RScope Fix?

 

TIA

Bruce

 

Reply via email to