Backing up and restoring HP Systems Insight Manager 7.x or greater data files in a Windows environment

White paper | HP Systems Insight Manager 7.x
14 | March 2013
8. Enter the following command:
set ORACLE_SID=<dbname>
9. To avoid the problem of empty tables not being exported, identify the empty tables by
entering the following commands in sqlplus:
Sqlplus <dbuser>/<dbpassword>
where <dbuser> is the user name used by HP SIM to connect to the HP SIM database, and
<dbpassword> is the password for this user, as shown below.
Figure 10: Identifying empty tables
10. It is possible that statistics have not been updated in your Oracle database. To update
statistics, run the following query:
exec
dbms_stats.gather_schema_stats(‘<dbuser>’,dbms_stats.auto_samp
le_size);
In the query, enter the database user name in uppercase letters. For example, if the database
user name is 'test2', enter 'TEST2' in the query because that is how it is stored in the
database.
The query would look like this:
exec
dbms_stats.gather_schema_stats(‘TEST2’,dbms_stats.auto_sample_
size);
Figure 11: Updating the Oracle database statistics
11. After ensuring that the statistics are up-to-date, run the following query to locate empty
tables:
Select table_name from dba_tables where owner=’<dbuser>’ and
num_rows=0;