1 INTEGRATE Moves data definitions between an Oracle Rdb database and the data dictionary. You can use the INTEGRATE DATABASE statement in either of these ways: o To copy the data definitions from an existing database into a data dictionary entity (INTEGRATE DATABASE IN PATHNAME) o To copy the data definitions from a data dictionary entity to a database (INTEGRATE DATABASE FROM PATHNAME) Example: RDO> INTEGRATE DATABASE 'DISK2:[DEPT3]PERSONNEL' cont> IN PATHNAME 'DISK1:[DICTIONARY]CORP.PERSONNEL' RDO> COMMIT 2 More You must have the Oracle Rdb READ privilege for a database to use the INTEGRATE DATABASE statement. If the data dictionary was not installed when a particular database was created, you can use the INTEGRATE statement to build the dictionary definitions from the database. You can also periodically use the INTEGRATE statement to ensure that the database and data dictionary definitions remain synchronized with each other. INTEGRATE starts a transaction which can be completed by a COMMIT or canceled by a ROLLBACK statement. 2 Format (B)0INTEGRATE DATABASE qqqqqqqqqqqqqqqqqqqk lqqqqqqqqqqqqqqq source-db-filespec q> IN PATHNAME qq> target-dict-pathname qqqk mq> target-db-filespec q> FROM PATHNAME qq> source-dict-pathname qu lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqq> mq> DB_HANDLE IS qqq> db-handle qj 3 source-db-filespec A full or partial OpenVMS file specification, enclosed in quotation marks, specifying the source of the database definitions. 3 target-dict-pathname The data dictionary path name for the dictionary entity in which the database definition will be created again. You can specify a full data dictionary path name or a relative data dictionary path name. 3 target-db-filespec A full or partial OpenVMS file specification, enclosed in quotation marks, specifying where the data dictionary definition will be created. 3 source-dict-pathname The data dictionary path name for the dictionary entity from which the database definition will be copied. You can specify a full data dictionary path name or a relative data dictionary path name. 3 db-handle A name that you assign to the database. 2 Examples Example 1 The following statement creates the data dictionary definitions for the PERSONNEL database in 'DISK1:[DICTIONARY]CORP.PERSONNEL': RDO> INTEGRATE DATABASE cont> 'DISK2:[DEPT3]PERSONNEL' cont> IN PATHNAME 'DISK1:[DICTIONARY]CORP.PERSONNEL' RDO> COMMIT Example 2 This example shows how to specify a database handle for a database. Because one database is already invoked, you must specify a database handle with the INTEGRATE DATABASE statement. RDO> SHOW DATABASES Database with filename personnel RDO> INTEGRATE DATABASE 'DISK2:[DEPT3]ACCT' cont> IN PATHNAME cont> 'DISK1:[DICTIONARY]CORP.ACCT' DB_HANDLE IS CHECKS RDO> COMMIT RDO> SHOW DATABASES Database with filename personnel Database with db_handle CHECKS in file acct Example 3 The following example shows the steps you use to create the definitions in the same data dictionary entity. Assume the corrupt data dictionary entity is in 'DISK1:[DICTIONARY]CORP.PERSONNEL'. In the example, the RMU/DUMP /USERS command displays no active users of the database. $ RMU/DUMP/USERS PERSONNEL No active users $ RDO:== $RDO $ RDO RDO> INTEGRATE DATABASE 'PERSONNEL' cont> IN PATHNAME 'DISK1:[DICTIONARY]CORP.PERSONNEL' RDO> COMMIT Example 4 This example shows how to override the database definitions with the data dictionary definitions. In this example, the definitions stored in the data dictionary DISK1:[DICTIONARY]CORP.NEW.PERSONNEL replace the definitions in the target database, PERSONNEL. RDO> INTEGRATE DATABASE 'PERSONNEL' cont> FROM PATHNAME 'DISK1:[DICTIONARY]CORP.NEW.PERSONNEL' RDO> COMMIT