WhereScape RED metadata can be restored from a prior backup. For Oracle data warehouses, the restore can take place either from UNIX or through the WhereScape RED tool. The same set of files as defined in the backup section are used for both restores and can be moved between the Windows and UNIX environments. For SQL Server data warehouses, the restore must take place in a Windows environment either through the WhereScape RED tool or manually.

Note

If transferring the export files via ftp, ensure that the file.exp and .bcp files are transferred in binary mode and that the other files are transferred in ASCII mode.

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. Refer to 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.

Oracle Windows Restore

Select the menu option Backup/Restore Metadata (from Oracle Export) to begin the restore process.
A dialog box will appear. The word RESTORE needs to be entered along with the User Name and Password where the metadata is to be restored to. The User Name does not have to be that of the current metadata repository, but it must be a valid repository. If a restore is being performed to a repository that differs from that of the backup then the 'imp_full_database' database privilege may be required.

Once the OK button is clicked, a new dialog box will appear asking for a selection of the export file. Browse to the directory where the export is located and select the export file. Once the export file is selected, the import will begin. A dialog box will appear to show the results of the import.

Oracle UNIX restore

The UNIX restore is actioned via the meta_restore_010.sh shell script. This script expects the export file to be located in the wsl/export directory, so it may need to be un compressed and moved to this directory if not already present.
Execute the meta_restore_010.sh shell script. You will be prompted to enter the backup file name. Once successfully entered a username and password to be restored into are requested and the restore commences. 

SQL Server Windows Restore

Select the menu option Backup/Restore the metadata (from Sql server bcp) to begin the restore process.
A dialog box will appear. The word RESTORE needs to be entered along with the connection, User Name and Password where the metadata is to be restored to. The metadata will always be restored to the dbo schema. The connection does not have to be that of the current metadata repository, but it must be a valid repository.

Once the OK button is clicked, a new dialog box will appear asking for a selection of the export directory. Browse to the contents of the directory where the export is located. Once the export directory is selected, the import will begin. A dialog box will appear to show the results of the import.

DB2 Windows Restore

Select the menu option Backup/Restore metadata (from DB2 export) to begin the restore process.
A dialog box will appear. The word RESTORE needs to be entered with the User Name and Password for DB2. If using a trusted connection to DB2, the username and password should be left blank. The metadata schema should also be entered. The schema does not have to be that of the current metadata repository, but it must contain a valid repository.

Once the OK button is clicked, a new dialog box will appear asking for a selection of the export file. Browse to the directory where the export is located and select the export file. Once the export file is selected, the import will begin. A dialog box will appear to show the results of the import.

  • No labels