Tuesday, May 3, 2022
Tip of the Day: Unloading Database Structure with Temporary Tables/Views
Product.......: R:BASE X.5 and R:BASE X.5 Enterprise (Version 10.5)
Build.........: 10.5.4.20421 or higher
Sections......: Commands
Keywords......: UNLOAD, Temporary, Table, View, STRUCTURE, ALL
Did you know that if there are temporary tables/views in a database
when an UNLOAD ALL or UNLOAD STRUCTURE is performed, the temporary
table/view definitions will now be included in the output?
The change was implemented for the benefit of database structures
which contain views based upon on temporary tables/views, which are
defined initially, and then dynamically deleted and recreated with
required data sets throughout an application.
With such structures in mind, when the database rebuild is performed
from an UNLOAD ALL or UNLOAD STRUCTURE errors are encountered when
rebuilding the views based upon on temporary views. Also, the order
in which the views are unloaded and subsequently rebuilt are not in
the order where those views dependent on other views are last.
Now, the following is implemented:
01.
If there are temporary tables/views in a database when an UNLOAD ALL
or UNLOAD STRUCTURE is performed, the temporary table/view
definitions will now be unloaded as well. Prior to this change, the
only way to unload a temporary table definition was to specifically
name the table in the UNLOAD command.
02.
If a table or view needed to define a view cannot be found, after the
error message about the missing item, you will get another message to
identify the view that R:BASE was trying to create.
Also, did you know that the database schema stores the internal order
in which tables and views were defined?
When the database structure is unloaded, the internal order is used
for primary key tables to be created before foreign key tables. Views
are also stored in the order of creation, where views based on other
views are unloaded after all the other views it is dependent upon.
If any view that another view it is dependent upon is deleted and
redefined, a PACK SCHEMA should be performed. Then, the view with the
dependencies should be deleted and recreated. This would place the
view with the dependencies after all the other views it is dependent
upon within the internal order.
The steps would ensure a database UNLOAD and rebuild is successful
where views with the dependencies are created last!
Very Best R:egards,
Razzak.
R:BASE Technologies, Inc.
https://www.rbase.com
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/1N2VjX-1nySo93rsV-013xhH%40mrelay.perfora.net.