On Fri, Feb 4, 2011 at 8:11 AM, Jim Belisle <[email protected]> wrote:
> Which tool would I use to find out the offending views?
>
>
Jim,
I'm assuming you have a "before" and an "after" copy of the database.
- Connect to "before".
- At R> Prompt, type these commands:
- OUTPUT ViewsBefore.TXT
- LIST VIEWS
- OUTPUT SCREEN
- (This gives you an alphabetical list of views from before the
unload.)
- Connect to "after".
- At R> Prompt, type these commands:
- OUTPUT ViewsAfter.TXT
- LIST VIEWS
- OUTPUT SCREEN
In notepad or RBEdit or printed on paper, compare the lists of views. When
you find a view that did not survive the RELOAD, connect to "before" again,
and type:
LIST VIEW missingviewname
Study the SELECT command, after the FROM keyword, to find the views that are
referenced. That views that are referenced are *now* in the after database
(unless they, also referred to views, not just tables.), because your
original load ran all the way to completion.
While still connected to "Before", build a little file that recreates this
view:
OUTPUT viewname.VIE
UNLOAD STRUCTURE FOR viewname
OUTPUT SCREEN
Use RBEdit to remove the CREATE SCHEMA command from viewname.vie (which will
refer to the "before" database name)
Connect to the "after" database, and run the viewname.VIE file.
Repeat this process for each missing view in the after database, but save
the VIE files. You can just run them again after the next reload.
Bill