Unloading and Reloading a Database
Unloaddb creates command files enabling a DBA to completely unload and reload a database. Unloaddb works in the same way as copydb except that unloaddb unloads all objects in the database of which you are the DBA, not just the ones you own.
With unloaddb, you can completely unload a coordinator database and move it to a different place. Ingres Star catalogs can be replicated so that the distributed database is always accessible despite node failure. For a full explanation of unloaddb and all its flags, see the Command Reference Guide. This section explains how unloaddb functionality changes when used with Ingres Star.
The unloaddb command does not do the actual unloading but creates SQL commands in two files in the current directory:
• unload.ing, which contains SQL instructions to read sequentially through the database copying every table into its own file in the named directory
• reload.ing, which contains SQL instructions to reload the database with information contained in the files created by the unload.ing file
When you use unloaddb with a distributed database, you must use the command twice:
1. You use unloaddb against the distributed database.
This unloads the registrations of locally stored tables and views and distributed view definitions. Unloaddb does not unload the actual tables that may be stored anywhere in the distributed environment, only their registrations. In this respect, the unloaddb command works differently when used against a distributed database as compared to a local database. Because of this, you do not need to run unload.ing. You need run only reload.ing against the newly created distributed database.
2. You use unloaddb against the coordinator database.
This unloads the user tables and data and the front-end object catalogs.
The tables that are unloaded are the tables resulting from a create table statement at the Ingres Star level when a local database is not specified for the table's storage and the table is therefore stored in the coordinator database.
Accordingly, using unloaddb twice, you do not get all the tables that Ingres Star points to. You get the tables in the coordinator database, the distributed views in the distributed database, and the registrations in the distributed database that are linked to all the locally stored tables that make up the distributed database, and the front-end catalogs.
IMPORTANT! Because unloaddb must be run on the distributed database and the coordinator database separately, be careful not to unload the coordinator database in the same location as the distributed database in order to prevent files from being overwritten.
Last modified date: 01/30/2023