This chapter describes installation and configuration of the DIVArchive databases and Backup Service and includes the following information:
There are two methods for exporting the dump files:
For 7.6.2+, using DIVADBInstaller you can backup the database using data-pump export. The backup dump file has the naming convention USERNAME_Month_Date_Year_Hour-Minute-Second.DMP (for example: DIVAUSER_07_11_2018_12-32-11.DMP).
To create a backup execute DIVADBInstaller with the following:
Set --jobtype
as backup
Set the --dbdumpdirectory
location for the backup. If --dbdumpdirectory is omitted, it will default to H:/ for Windows and /u04 for Linux.
DIVADBInstaller --dbuser=DIVA --dbpass=divapass --syspass=syspass --dbhost=localhost --dbport=1521 --jobtype=backupjob --dbdumpdirectory=H:\Backup
For 7.6.1 or below, you must perform the following procedure on the source computer:
Open sqlplus
and log in as the sys
user.
Execute the following commands to create the directory object:
CREATE OR REPLACE DIRECTORY {directory_object_name} AS {'TargetPath'}; GRANT READ,WRITE ON DIRECTORY {directory_object_name} TO {source_username};
Windows Example:
CREATE OR REPLACE DIRECTORY diva_dpump_dir AS 'H:\Support\DUMPS'; GRANT READ,WRITE ON DIRECTORY diva_dpump_dir TO DIVA; exit;
Linux Example:
CREATE OR REPLACE DIRECTORY diva_dpump_dir AS '/u05/support/DUMPS'; GRANT READ,WRITE ON DIRECTORY diva_dpump_dir TO DIVA; exit;
Open a command prompt and execute the following command to export to the dump file:
expdp {source_username}/{source_user_password} schemas={source_username} flashback_time=systimestamp DIRECTORY={directory_object_name} dumpfile={dump_file_name} logfile={log_file_name}
Windows and Linux Example:
expdp DIVA/password schemas=DIVA flashback_time=systimestamp directory=diva_dpump_dir dumpfile=diva_db.dmp logfile=diva_exp.log
There are two methods for importing the database dump files:
For 7.6.2+, using DIVADBInstaller you can restore or import the DIVA database from a previous state if required. using the --jobtype=restorejob , and the dump file name using --dbdumpfilename.
To restore or import the database, execute DIVADBInstaller with the following:
Set the --jobtype
to restorejob
Specify the location of the dump file using --dbdumpdirectory
Specify the name of the dump file using --dbdumpfilename
If the source user name of the dump file is different from the --dbuser
, you must also specify the source user name using --dbimportfromuser
.
Example - Same Source User Name
DIVADBInstaller --dbuser=DIVA --dbpass=divapass --syspass=syspass --dbhost=localhost --dbport=1521 --jobtype=backupjob --dbdumpdirectory=/u04/backup --dbdumpfilename=DIVA_07_11_2018_12-32-11.DMP
Example - Different Source User Name
DIVADBInstaller --dbuser=DIVA --dbpass=divapass --syspass=syspass --dbhost=localhost --dbport=1521 --jobtype=backupjob --dbdumpdirectory=/u04/backup --dbdumpfilename=DIVA_07_11_2018_12-32-11.DMP --dbimportfromuser=DIVA_75
For 7.6.1 or below, perform the following procedures on the destination computer:
Open sqlplus
and log in as the sys
user.
Execute the following commands to create the directory object:
CREATE OR REPLACE DIRECTORY {directory_object_name} AS {'TargetPath'}; GRANT READ,WRITE ON DIRECTORY {directory_object_name} TO { destination_username};
Windows Example:
CREATE OR REPLACE DIRECTORY diva_dpump_dir AS 'H:\Support\DUMPS'; GRANT READ,WRITE ON DIRECTORY diva_dpump_dir TO DIVA; exit;
Linux Example:
CREATE OR REPLACE DIRECTORY diva_dpump_dir AS '/u05/support/DUMPS'; GRANT READ,WRITE ON DIRECTORY diva_dpump_dir TO DIVA; exit;
Open a command window and copy the exported dump file to the {'TargetPath'}
.
For example: H:\Support\DUMPS
(Windows) or /u05/support/DUMPS
(Linux)
Navigate to the %DIVA_HOME%\program\database\core\install
folder in your DIVArchive installation.
Create a DIVArchive database user with the following command:
Windows: create_diva_user.bat syspass DIVA2 divapass -useronly
Linux: create_diva_user.sh syspass DIVA2 divapass -useronly
Execute the import command as follows:
impdp {destination_username}/{user_password} transform=OID:n:type DIRECTORY={directory_object_name} dumpfile={dump_file_name} table_exists_action=replace REMAP_SCHEMA={source_username}:{destination_username} logfile={log_file_name}
Example:
impdp DIVA2/pass transform=OID:n:type DIRECTORY= diva_dpump_dir dumpfile= diva_db.dmp table_exists_action=replace REMAP_SCHEMA=DIVA:DIVA2 logfile=diva_imp.log
Before installing the new DIVArchive Oracle Database, you may be required to uninstall the existing database and database engine. If Oracle Database is already installed on the computer, then you must remove the existing database and database engine.
Use the following procedure to uninstall the existing database in Windows environments:
Caution:
Use the same Oracle Database package to uninstall the database that was used to install it.Stop all running DIVArchive services.
Export the existing database contents using the procedures previously described.
Caution:
Confirm the export completed successfully before continuing.Extract the original database .zip
file used to perform the installation.
For DIVArchive database package releases 2.3.4 and earlier, use the following commands in the exact sequence shown:
uninstall_database.cmd uninstall_engine.cmd
For DIVArchive database packages release 3.0.0 and later, execute C:\app\Oracle\product\12.1.0\db_home1\deinstall\deinstall.bat
and follow the displayed instructions.
Use the following procedure to uninstall the existing database (package release 3.0.0 and later) in a Linux environment:
Log in as the Oracle operating system user.
Open a terminal window.
Export the existing Oracle database.
Execute $ORACLE_HOME/deinstall/deinstall
and follow the displayed instructions.
You must log in to the computer as an Administrator. After you have backed up and uninstalled the existing database (see the previous sections in this chapter), use the following procedure to install the new database:
Locate the latest release of the DIVAOracle database package for Windows and unzip it.
Execute install.bat
to start the installation.
Follow the prompts through the wizard to complete the installation.
Import the previously exported data into the new database using the procedure previously described.
Assuming no errors occurred, you have successfully installed the database and imported the existing data from the original database.
Before running the installer verify the following is complete:
Yum is configured to connect to the latest release of Oracle Linux.
The recommended partitions for the Oracle Database exist. Oracle recommends partitions that dedicate the space to the Oracle Database.
/u01
partition for the Oracle Binaries
/u02
partition for the Oracle Database files (8 KB cluster size recommended)
/u03
partition for the Oracle Archive Logs (4 KB cluster size recommended)
/u04
partition for the Oracle database backups (64 KB cluster size recommended)
To begin installation, locate the latest release of the DIVAOracle database package for Linux, execute it as root
, and follow the displayed instructions.
If the shared memory on the server where the Oracle Database is installed is less than 16 GB, you must set it to at least 70 percent of your RAM.
Use the following command to confirm the computer's RAM size:
# free -m
The output will look similar to the following:
total used free shared buff/cache available Mem: 15791 186 15456 8 148 15516 Swap: 16380 0 16380
Use the following command to check your shared memory setting in MB:
# df -m /dev/shm
The output will look similar to the following:
Filesystem 1M-blocks Used Available Use% Mounted on tmpfs 7896 0 7896 0% /dev/shm
To change the size of shared memory you must add the following line into /etc/fstab
. The setting must not exceed the size of your installed memory. You must restart the computer after making this change for it to take affect.
For example, the following command will increase the size of /dev/shm
to 11GB:
tmpfs /dev/shm tmpfs defaults,size=11g 0 0
First you must configure the drive partitions for the Oracle Database as follows:
Navigate to Applications, and then Utilities.
Click Disks from the menu.
Locate your disk in the Disks dialog box. Selecting the disk will display the Device Name.
In Linux you must add the disk (that you want to add partitions to) to the partition table using the fdisk
utility. For example, fdisk /dev/xvdb1
. You can use the g
and w
options to add it to the partitions table.
Click the Plus button on the right side of the Disks dialog box to add a partition.
When the Create Partition dialog box appears create the following four partitions. For each partition leave the Erase option and Type option at their default settings, and then click Create. Repeat this step for each partition.
/u01
This partition must be 10 GB in Linux. Use the operating system default block size.
/u02
This partition must be 30 GB in Linux. Oracle recommends using an 8 KB cluster size.
/u03
This partition must be 5 GB in Linux. Oracle recommends using a 4 KB cluster size.
/u04
This partition must be either 100 GB or all of the remaining disk space. Oracle recommends using a 64 KB cluster size.
When you are done creating the partitions and returned to the Disks dialog box, click the Gears icon on the right side of the screen.
Click Edit Mount Options.
Change Automatic Mount Options to OFF.
Select the Mount at startup check box.Enter the appropriate mount point in the Mount Point field for that specific partition (/u01
, /u02
, /u03
, /u04
).
Click OK.
When this is completed successfully, all four partitions are identified and displaying their appropriate mount points in the Disks dialog box.
Use the following procedure for the Managed Disk partition (this must be 54 GB):
Locate the Managed Disk in the Disks dialog box.
Click the Gears icon on the right side of the screen.
Click Format.
Leave all settings at their defaults, but enter /managed
in the Mount Point field.
Click Format.
When asked, click Format to confirm that you want to format the disk.
Click the Gears icon.
Click Edit Mount Options.
Change Automatic Mount Options to OFF.
Select the Mount at startup check box.
Enter /managed
in the Mount Point field.
Confirm that the Filesystem Type is set to ext4.
Click OK.
Verify you have completed the following:
Pre-requisites for Installing the Oracle Database: Configure Shared Memory
Pre-requisite for Installing the Oracle Database: Creating Drive Partitions
After completing the pre-requisites, use the following procedure to install the Oracle Database Server:
Open a terminal console.
If you run in a Virtual Machine (VM), confirm that your host name is in the /etc/hosts
file using the following command:
gedit /etc/hosts
If the hosts file looks similar to this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
You must replace localhost
with your host name. For example, if the host name is clefvm015L
, it will look like this:
127.0.0.1 celfvm015L localhost.localdomain localhost4 localhost4.localdomain4 ::1 celfvm015L localhost.localdomain localhost6 localhost6.localdomain6
If you made changes to the host file save the changes and exit gedit
.
Change to the directory of the shell script for the Oracle Database Package.
Change the permissions on the shell script using the following command to make it an executable file:
chmod +x OracleDivaDB_3-0-0_12_1_0_2_0_SE2_OEL7_x86_64.sh
Execute the script as follows:
./OracleDivaDB_3-0-0_12_1_0_2_0_SE2_OEL7_x86_64.sh
If an Oracle operating system account has already been created, you may be asked whether you want to change the password. Follow the prompts if you require a password change for this account.
When prompted for a SYS
account password, ensure you use a secure password.
If at some point during the installation you receive the following error:
[FATAL] [INS-35172] Target database memory (5181MB) exceeds available shared memory (3866MB) on the system
You must run the commands below to extend your tmpfs
partition (if it is still not large enough):
Check the current size of the tmpfs
partition:
df -h /dev/shm
Extend the amount of the target database memory size as follows:
Execute gedit /etc/fstab
.
Add the following line to the bottom of the file:
tmpfs /dev/shm tmpfs defaults,size=6G 0 0
Save the file and exit gedit
.
Execute the following commands:
umount tmpfs mount -a
If the commands in Step 3 do not work, restart the computer and run the df -h /dev/shm
command again to check that the size of tmpfs
has actually increased.
Run the Oracle Database shell script again.
DIVArchive 7.6.2 has DIVADBinstaller which can install a new DIVA database or upgrade an existing DIVA database on the Oracle Database Server. For 7.6.1, you must manually create the user.
Verify Oracle Database Version
Verify the existing Oracle Database Server release before upgrading a system to DIVArchive 7.6.2. Oracle Database Server must be at a minimum of 11.2.0.4. You can verify the release level by navigating to C:\app\oracle
and opening the VERSION.TXT
file. The release number is displayed in the file.
The database installer DIVADBInstaller.bat
(Windows) or DIVADBInstaller.sh
(Linux) can be found under <DIVA_HOME>/Database/DBInstaller/bin
.
Table 2-1 DIVADBInstaller Parameters
Parameter | Description |
---|---|
|
DIVA Database username. Required. |
|
DIVA Database username password. Required. |
|
SYS Database username password. Required. |
|
Job type to executed can be one of the following:
If Jobtype is omitted, its defaults to |
|
Given a custom name for the job execution. Optional and defaults to the system timestamp. |
|
Database hostname or ipaddress. Optional and defaults to localhost. |
|
Database port. Optional and defaults to 1521. |
|
Database service name. Optional and defaults to lib5.world. |
- |
Enables secure connection to Database. Optional and defaults to FALSE. |
|
Database dump directory. Optional and defaults to H:/ for Windows and /u04 for Linux |
|
Database dump filename. |
|
Dump filename source username if differnet than --dbuser,Mandatory only for --jobtype=importjob. Defaults to NULL. |
Example Fresh Installation of DIVA Database
DIVADBInstaller --dbuser=DIVA --dbpass=divapass --syspass=syspass --dbhost=localhost --dbport=1521 --dbservicename=lib5.world --jobtype=installjob
Example Upgrade Installation of DIVA Database
DIVADBInstaller --dbuser=DIVA --dbpass=divapass --syspass=syspass --dbhost=localhost --dbport=1522 --dbservicename=lib5.world --dbsecureconnect=TRUE --jobtype=upgardejob
The database installer always backs up the existing user using data-pump export before upgrading. The backup dump file is under the --dbdumpdirectory
location on the Database server. If you omit --dbdumpdirectory
, it will default to H:/
in Windows and /u04
in Linux.
Note:
If upgrading 7.2.2 and lower using 7.6.2 installer, you must manually update the actor configuration and actor partial restore configuration in the database using the config utility. See "Actor Configuration in the Database" in the Installation Guide.The database user must be created using the DIVA
operating system user account. Use the following procedure to create the database user:
Open a terminal console.
Change to the DIVA_HOME/Program/Database/Core/Install
directory.
Execute create_diva_user.bat
(Windows) or create_diva_user.sh
(Linux), which creates the given DIVA database user and its associated tables
Usage:
create_diva_user syspasswd username userpasswd oracle_connection [-useronly|-tablesonly] [-custom_tablespaces tables_tablespace indexes_tablespace temp_tablespace] create_diva_user {DIVA|SYS} current_password new_password [-orapwd]
Parameter Definitions:
syspasswd
— Password of the Oracle 'sys' account
username
— Username to create
userpasswd
— Associated user password
oracle_connection
— Oracle TNS service name or Oracle connection string (such as IP_ADDRESS:PORT/ORACLE_SERVICE_NAME)
DIVA|SYS
— Mention either DIVA or SYS to reset the repective password in the password file
new_password
— New password
current_password
— Current password. If there is no current database password, then enter the new password for the is parameter.
-useronly
— Only creates the database user and no database objects
-tablesonly
— Only creates the database objects for the given user.
-custom_tablespaces
— Use of custom tablespaces
tables_tablespace
— tablespace for tables
indexes_tablespace
— tablespaces for indexes
temp_tablespace
— database temp tablespace
-orapwd
— Option to reset/generate password file.
With DIVA 7.6.1, a new DIVAOracle package version 3-1-0 was created:
Windows: OracleDivaDB_3-1-0_12_2_0_1_0_SE2_Windows_64-bit
Linux: OracleDivaDB_3-1-0_12_2_0_1_0_SE2_OEL7_x86_64
This new package includes the following
Secure Oracle Database listener listening on port 1522, additional on top of the regular unsecured listener listening on port 1521.
Oracle Database wallet for storing the Trust Certificate and DIVADatabaseServer Certificates. During installation DIVADatabaseServer.jks holding the default DIVA_CA trust certificate and Default DIVADatabaseServer certificate is import into the Oracle Database wallet for enabling the secure communication.
This new package also creates a secure TNSNames LIB5SSL which enables any DIVA services to connect to the oracle database securely over SSL connecting to the new secure Oracle database listener listening on port 1522 using the TNSNames.
LIB5SSL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCPS)(HOST = HOSTNAME)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = LIB5.WORLD) ) )
A new Configuration Parameter "DIVAMANAGER_DB_SECURE_CONNECT" was added to the Manager,Migrate,DBBackup configuration file to enable secure communication to database using Hostname/IPAddress and port. This parameter has no effect if using DIVAMANAGER_TNSNAME parameter in the configuration file.
Valid parameter values are:
TRUE - When set to TRUE, the DIVAMANAGER_DBPORT in the Manager,Migrate,DBBackup configuration file must point to the secure port of the Oracle Database.
FALSE (default)
The Configuration Utility and Control GUI also supports connecting securely to the database. SPMService can connect securely only using TNS names.
This section describes the procedures to migrate DIVArchive releases with Oracle 11g installed. Typically this procedure is performed to upgrade installations with legacy DIVArchive installations to a current release. See Appendix A for Oracle DIVArchive options and licensing information.
Use the following procedure to export the DIVArchive Manager and file system data from the source computer:
Stop all running DIVArchive services, and then export the database to a dump file. See Exporting the Database Dump Files.
Copy the dump file from the source computer to the target computer.
Use the following procedure to import the DIVArchive Manager and file system data to the destination computer:
Stop all running DIVArchive services.
Install Oracle 12.1 on the destination computer. See Installing the Oracle Database Server in Windows,or Installing the Oracle Database Server in Linux for instructions depending on your operating system environment.
Import the database dump file on the destination computer. See Importing the Database Dump Files.