Backing Up and Restoring Data > Importing the Oracle Database
  
Version 10.0.01
Importing the Oracle Database
IMPORTANT: The process described below deletes your existing Storage Viewer database. Before you try to import the Reporting Database, you should verify that you have no other options for recovery and that you have a valid database export. Contact the Global Support Center, as HDS prefers to walk you through this process step‑by-step.
Some common problems include:
Importing unsuccessful backups. Ensure that your backups were successful before you accidently import old data.
Importing more than what you need. Don’t restore the entire database or import all database tables if you only need to restore one database table. Import only what you need.
IMPORTANT: Before restoring user objects, stop the Tomcat and Portal processes using Starting and Stopping Portal Server Software.
To import your latest successful export of the Oracle database:
1. Log on to the database server.
In a Linux environment, log on to the database server as user aptare.
In a Windows environment, log on to the database server as a user who is a member of the ORA_DBA group.
2. At the command line (Linux):
SQL> sqlplus "/ as sysdba"
SQL> drop user portal cascade;
SQL> drop user aptare_ro cascade;
SQL> @/opt/aptare/database/ora_scripts/create_portal_user.plb;
SQL> @/opt/aptare/database/ora_scripts/create_aptare_ro_user.plb
At the command line (Windows):
SQL> sqlplus "/ as sysdba"
SQL> drop user portal cascade;
SQL> drop user aptare_ro cascade;
SQL> @C:\opt\oracle\database\ora_scripts\create_portal_user.plb
SQL> @C:\opt\oracle\database\ora_scripts\create_aptare_ro_user.plb
3. Edit the import_scdb.par file to specify a value for path_to_backup_directory. The import_scdb.par file contains the following parameters:
Table 2 import_scdb.par File
USERID=system/aptaresoftware
FROMUSER=portal
TOUSER=portal
BUFFER=128000
IGNORE=Y
COMMIT=N
GRANTS=Y
ROWS=Y
INDEXES=Y
CONSTRAINTS=Y
LOG=/path_to_log/import_scdb.log
FILE=/path_to_backup_directory/scdb.exp
4. Run the following commands:
On Linux (as user, aptare):
/opt/aptare/oracle/bin/imp {full_path_and_file_name_of_export_file} parfile=/opt/aptare/database/tools/import_scdb.par
On Windows:
C:\opt\oracle\bin\imp {full_path_and_file_name_of_export_file} parfile= C:\opt\oracle\database\tools\import_scdb.par