11. Completing a Vision Application : Copying Applications into Different Databases
 
Share this page                  
Copying Applications into Different Databases
To copy an application from one database to another, use the copyapp command. The copyapp command copies information about an application as stored in the Ingres system catalogs. If the -s flag is specified, copyapp also copies the source code files for Custom frames and the application's compiled forms.
The copy process involves two steps:
copyapp out
This command transfers application data from the old database to an intermediate text file. Do not edit this file, because the application data is stored in a fixed order.
copyapp in
This command transfers application data from the text file to the new database.
The copyapp command notifies you if components in the new and old databases have the same names. By default, copyapp does not copy the component if there is a name conflict. If you use the -r flag, copyapp replaces the component in the new database with the same-named component from the old database.
Similarly, you can replace an existing application by using the -r flag. By default, the copyapp in operation does not copy the application if an application by the same name exists in the database.
The copyapp command does not transfer database tables, or other database components, such as rules. In order for your application to work correctly, you must be sure that the database contains the correct components.
You cannot use the copyapp command to merge applications. Use the iiexport and iiimport commands to copy components from one application to another.
You can also copy individual components of an application--such as forms and reports--from one database to another using copyform, copyrep, and similar utilities. To copy database tables, you can use the copydb and unloaddb utilities. See the Database Administrator Guide for more information about any of these utilities.
The following sections describe the two steps of the copyapp operation.