Restoring metadata
A backup of a metadata repository can be restored over the top of an existing repository. This action replaces the existing repository in its entirety. The restore of repositories is covered in an earlier section, but its uses in the promoting of code are discussed here. This restore process does not affect any existing database tables or any compiled procedures, so it can be used as a means of updating a metadata repository, albeit by replacing that repository. It is often a good method to choose when first establishing a new repository. For example if we have a development repository and want to create a production environment the steps may be:
1 Backup the development repository, using either the UNIX or Windows repository backup. See the previous sections.
2 Create a new repository using the Setup/Administrator utility.
3 Log on to the newly created repository.
4 Restore the backup of the development repository into the new repository. For Oracle this requires the database privilege 'imp_full_database', or the dba role.
5 Modify any connections, set any default values, alter any table sizes or extents.
6 Create the tables.
7 Compile all procedures.