To create a Oracle backup file (dump) of your Bizagi database follow the steps described below.
For doubts on the purpose of a backup, and details on what information is stored at the backup file, refer to How to create a backup of your Bizagi database.
When using Oracle as the database for your Bizagi project, creating backups and restoring them is done (and referred to) through Oracle's Export and Import utilities.
For this you will need to consider in the machine creating the export:
1. Matching client versions in export and import.
It is required that the Oracle client's version used in the export matches the client's version used in the import.
2. Compliant character sets
Ensuring that the character sets configured in each client, are the same one or compatible ones, is a requisite for Oracle’s export and import utilities to maintain the integrity of the information (otherwise, any of this information contained in the database can result altered).
These need to be compatible between the database instances.
3. Oracle home setting.
If you have a unique Oracle home environment variable, you may disregard this consideration.
On the other hand, if you have more than 1 Oracle client installed where you will use the export and import utilities, you will need to make sure that the ORACLE_HOME environment variable is properly set to the Oracle client used by Bizagi.
It is highly recommended that an experienced user (i.e, a DBA or a person having an advanced knowledge on Oracle), carries out the export and import commands. This is so, due to 3 main reasons:
1. The export and import utilities are run in a DOS command with use of command line parameters, which are familiar to a DBA.
You may choose to use a parameters file if considered useful.
Note that there is more than one way to use Export or Import capabilities, such as the use of RMAN, however this article illustrates the way as recommended by Bizagi. You may use RMAN as long as you are an experienced user with the capability of guaranteeing that the complete information will be considered for backup and restore purposes.
2. Managing an Oracle database of a Bizagi project will require at some point to have at hand, authorized credentials to connect as a user with system privileges (for example, using the BizagiAdmon user).
3. After performing both the export or import of an Oracle database, it is imperative to review the execution logs, so that any possible errors and warnings thrown in the export and import are handled and solved, or verified as "OK".
For example regarding errors, an issue that can show up and that needs immediate resolution, is when a tablespace in Oracle runs out of space (when these cannot be extended) in an import. This type of error will not stop the import, but can leave the information incomplete (without integrity).
For example, warnings which may be ignored are those stating:
ORA-31684: Object type USER:"%USER_NAME%" already exists
And on the other hand, some warnings which require resolution actions are those stating:
ORA-39082: Object type ALTER_PROCEDURE:"%PROCEDURE_NAME%" created with compilation warnings
Creating a database backup (using datapump expdp)
The Data Pump utility provides a mechanism for transferring data objects between Oracle databases.
We will illustrate how to use the Datapump export utility to backup all the information in a Bizagi project from into a dmp file.
To use Oracle’s DataPump export utility for a Bizagi project, the following steps are carried out:
1. Preparing the backup directory
To make use of the DataPump export, you will need to specify as a parameter the directory in which the .dmp backup will be located.
To do this, first connect to your Oracle instance with the BizagiAdmon user by using a sqlplus:
In this sqlplus command, consider that:
•%BIZAGIADMON_USER_PASSWORD% is the password for the BizagiAdmon user.
•%DATABASE_SERVER% is the name of the Oracle database server.
•%SERVICE_PORT% is the port number in which the Oracle database services are listening.
•%SERVICE_NAME% is the alias to your database instance.
Once connected, you may look up the created directories for your database instance in which you will also find Bizagi's backup path:
If you wish to manually create a different directory to use another physical path for your backup and log, you may do so by running the sqlplus lines as shown below:
Once you have at hand the name of the directory you will use, log off (disconnect) from your Oracle instance’s BizagiAdmon session.
2. Opening a command prompt
A command prompt is used to execute the export commands.
To do this, launch a DOS command prompt:
Then, browse to your Oracle client home path, and into its "bin" folder:
3. Using the DataPump export utility
The characteristics of the import operation are determined by the export parameters you specify.
To do this, input the following command line from the bin folder location:
expdp USERID=BizAgiAdmon/%SCHEMA_USER_PASSWORD% SCHEMAS=%SCHEMA_USER_TO_EXPORT% DIRECTORY=%BIZAGI_BACKUP_PATH% DUMPFILE=%EXPORT_FILE% LOGFILE=%EXPORT_LOG%
In this command line, consider that:
•%SCHEMA_USER_PASSWORD% is the password for the user with system rights (BizAgiAdmon).
•%SCHEMA_USER_TO_EXPORT% is the name of the Bizagi project.
•%BIZAGI_BACKUP_PATH% should be "BizAgiBackupPath" by default if no customization was done, according to step #1 (this parameter is the name for the directory on which the backup is located).
•%EXPORT_FILE% is the path and filename in which the exported information was saved (the .dmp created when running the export).
•%EXPORT_LOG% is the path and filename in which the import log will be recorded. This file commonly uses the .log file extension.
For more information about Oracle's DataPump import and export utility (available from Oracle 10g version databases), refer to external links from the source: http://www.orafaq.com/wiki/Data_Pump.
4. Reviewing the DataPump export log
After the export execution it is necessary to check for and solve any possible unexpected errors.
To do this, go through the log recorded in the previous step once the export has finished.
This log will be located as the path and filename specified as "%EXPORT_LOG%".
Take into account that the export utility will use the character set defined for your Oracle client.
Therefore, and as mentioned at the prerequisites section, this character set should be the same one (or a compatible one) to that one defined for the database server. In addition to this, the character set must also be the same one or a compatible one to those involved when using the import utility.
The final .dmp file contains the backup information.
You may also compress the .dmp file into a zip to shrink its size.
To learn how to restore this backup file, refer to Oracle restore.