Backing up and restoring HP Systems Insight Manager 7.2 or greater database in a HP-UX or Linux Environment

White paper | HP Systems Insight Manager 7.2
13 | March 2013
9. Restore the database file from the backup created in step 6 of Saving data files for use
with Oracle.
10. At the Oracle server console, enter the following command:
set ORACLE_SID=<dbname>
Where <dbname> is the database created in step 2.
11. Create another user (user2) with the same privileges as user1 by entering the following
commands at the SQL prompt:
Create user user2 identified by passwd;
Grant dba, connect to user2 identified by passwd;
Commit;
12. Log out from the user1 account, and then log in to the user2 account.
13. Delete the user1 account, and then re-create user1 with all DBA privileges by entering
the following commands:
Drop user user1 CASCADE;
Create user user1 identified by passwd;
Grant dba,connect to user1 identified by passwd;
Commit;
14. Log out of the user2 account.
15. Import the database by using the IMPDP utility.
a. Set ORACLE_SID=<dbname>, where <dbname> is the database to be saved.
b. Log in to SQL by entering sqlplus user1/passwd as sysdba.
c. At the SQL prompt, enter the impdp command using the following parameters:
$impdp user1/passwd DIRECTORY=DATA_PUMP_DIR
DUMPFILE=USER1.DMP
SCHEMAS=user1
EXCLUDE=CONSTRAINT,REF_CONSTRAINT,INDEX
TABLE_EXISTS_ACTION=REPLACE
Note: Exception messages (for example, ORA-31684: Object type
VIEW:"HPSIM4"."R_MEDIAACCESSDEVICES" already exists) are
generated to remind you that certain object types are already present. The views
are not affected.
16. Enter the following command to count the number of rows and columns in the database
table to ensure that the tables were restored successfully:
select count(*) from user_tables or dba_tables similarly
for views, indexes