Troubleshooting Oracle in DataProtector Ux
Troubleshooting Oracle in DataProtector Ux
Copyright 2004
Page 1 of 1
Table of Contents
Page
Introduction
1. Checking the Oracle8/9 Side of the Integration.
1.1. Verify that you can access the Oracle8/9 Target Database.
1.2. Verify that you can access the recovery catalog.
1.3. Verify that the TNS listener is correctly configured for the Oracle8/9 Target Database and
for the recovery catalog database.
1.4. Check if your Oracle network path configuration is exported correctly.
1.5. Assign any special (non-default) Oracle environment settings.
1.6. Verify that the Oracle8/9 Target & Recovery database are configured to allow remote
connections with system privileges.
1.7. If you are using the recovery catalog database, verify that the Target Database is registered
in the recovery catalog.
1.8. Verify backup and restore directly to disk using a Recovery Manager channel type disk.
1.9. Test the oracle side of the configuration.
2. Configuration Problems.
2.1. Verify that the Data Protector software has been installed properly.
2.2. Verify that the Data Protector Database Library is linked with the Oracle8/9 executable.
2.3. Verify permissions of the Oracle home directory.
2.4. Verify the ownership of the Oracle binary.
2.5. Verify the permissions of the current user account.
2.6. Examine the system errors.
3. Backup Problems.
3.1. Perform a filesystem backup of the Oracle8/9 Server system.
3.2. Check your Oracle8/9 Server configuration.
3.3. Verify Data Protector internal data transfer using the testbar2 utility.
3.4. Start an Oracle backup directly to disk, using Recovery Manager channel type disk.
3.5. Check if the target database is in archivelog mode (required for online backup).
3.6. Known backup problems.
4. Restore Problems.
4.1. Verify that an object exists on the backup media.
4.2. Simulate a restore session.
4.3. Ensure that the database is in the correct state.
4.4. Check your environment variables.
4.5. Try using the RMAN CLI to restore the database items.
4.6. For Zero Downtime or Standalone Backup sessions, try to put the database into the Open state
manually.
4.7. Known restore problems.
4.8. Examples of an Oracle8/9 Database Restore.
Supported versions
Copyright 2004
Page 2 of 2
Introduction
This document will help you in identifying the problem area in the Oracle8/9 integration in Data Protector, and it will help
you troubleshooting the problem.
Before starting your troubleshooting, be sure to consider the following:
Ensure that all the Data Protector II official patches are installed. A list of the latest patches is available
on the Web at HP Services and Support Center.
Refer to the HP OpenView Data Protector Software Release Notes for a description of general Data
Protector limitations, problems and workarounds as well as the list of available Data
Protector Patches.
IMPORTANT
When you plan to use Oracle8/9 after you have removed the Data Protector Oracle8/9 Integration, then take note of the
following:
After uninstalling the Data Protector Oracle8/9 integration on an Oracle8/9 server system, the Oracle8/9 server software
is still linked to the Data Protector Database Library. You must rebuild (Oracle8.x) or relink (Oracle8i or Oracle9i) the
Oracle8/9 binary to remove this link. If this is not done, the Oracle8/9 server cannot be started after the integration has
been removed.
Please refer to Using Oracle8/9 After Removing the Data Protector Oracle8/9 Integration in the Unix integration guide
for more info.
Note
Whenever RMAN is run outside of Data Protector, which is currently true for restores, always set the two variables
appropriately prior to running the command :
export OB2APPNAME=<ORACLE_SID>
export OB2BARLIST=<OmniBack II barlist>
Depending on the Oracle version running, the exporting of the above variables might not work and thus it is crucial to use
the parms option on the allocate channel command in the RMAN run command to pass the variables into the environment
as in the following example :
allocate channel dev_1 type sbt_tape
parms
ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=<ORACLE_SID>,OB2BARLIST=<OmniBack II barlist>);
Copyright 2004
Page 3 of 3
TABLESPACE_NAME
STATUS
---------------------------------------------------SYSTEM
ONLINE
RBS
ONLINE
TEMP
ONLINE
TOOLS
ONLINE
USERS
ONLINE
Copyright 2004
Page 4 of 4
1.2.Verify that you can access the recovery catalog (if used).
1.3.Verify that the TNS listener is correctly configured for the Oracle8/9 Target Database and for
the recovery catalog database (This is required for properly establishing network).
Export <ORACLE_HOME> as described in 1.1.
Start the listener from the <ORACLE_HOME> directory:
bin/lsnrctl80 status <service>
exit
Example of the command output:
Note that with Oracle8i and Oracle9i, the lsnrctl and not the lsnrctl80 command is used.
If it fails, start up the TNS listener process and refer to the Oracle documentation for instructions on how
to create a TNS configuration file (LISTENER.ORA).
Copyright 2004
Page 5 of 5
1.6.Verify that the Oracle8/9 Target and Recovery catalog database are configured to allow
remote connections with system privileges.
Export <ORACLE_HOME > as described in 1.1.
Start the Server Manager (Oracle8) or SQL Plus (Oracle9i) from the <ORACLE_HOME> directory:
For Oracle8:
bin/svrmgrl
For Oracle 9i: bin/sqlplus /nolog
Copyright 2004
Page 6 of 6
1.7.If you are using the recovery catalog database, verify that the Target Database is registered
in the recovery catalog:
Export <ORACLE_HOME> as described in 1.1 and start the Oracle8 Server Manager or Oracle9i SQL
Plus:
For Oracle8:
bin/svrmgrl
For Oracle 9i: bin/sqlplus /nolog
At the SVRMGR (Oracle8) or SQL (Oracle9i) prompt, type:
connect <Recovery_Catalog_Login>;
select * from db;
exit
If this fails, start the configuration using Data Protector or refer to the Oracle8/9 documentation for details
about how to register an Oracle8/9 Target Database in the recovery catalog database.
1.8.Verify backup and restore directly to disk using a Recovery Manager channel type disk.
If you are using the recovery catalog, export <ORACLE_HOME> as described in 1.1 and start Recovery
Manager as follows:
bin/rman target <Target_Database_Login> rcvcat \
<Recovery_Catalog_Login> cmd_file=rman_script
If you are not using the recovery catalog, export <ORACLE_HOME> as described in 1.1 and start
Recovery Manager as follows:
bin/rman target <Target_Database_Login> nocatalog \
cmd_file=rman_script
An example of the RMAN script is presented below:
run {allocate channel dev0 type disk;
backup tablespace <tablespace_name>
format <ORACLE_HOME>/tmp/<datafile_name>;}
Copyright 2004
Page 7 of 7
After a successful backup, try to restore the backed up tablespace by running the following restore script:
run {
allocate channel dev0 type disk;
sql alter tablespace <tablespace_name> offline immediate;
restore tablespace <tablespace_name>;
recover tablespace <tablespace_name>;
sql alter tablespace <tablespace_name> online
release channel dev0;
}
If this fails, refer to the Oracle8/9 documentation for details about how to execute a backup and restore
directly to disk using the Recovery Manager.
$ cd /applications/ORA8/app/oracle/product/8.0.4
$ export
ORACLE_HOME=/applications/ORA8/app/oracle/product/8.0.4
$ bin/rman target sys/manager@TOP rcvcat rman/rman@TCAT;
Recovery Manager: Release 8.0.4.0.0 - Production
RMAN-06005: connected to target database: TOP
RMAN-06008: connected to recovery catalog database
RMAN> register database;
RMAN-03022: compiling command: register
RMAN-03023: executing command: register
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;::
RMAN> resync catalog;
RMAN-03022: compiling command: resync
RMAN-03023: executing command: resync
RMAN-08002: starting full resync of recovery catalog
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Copyright 2004
Page 8 of 8
Copyright 2004
Page 9 of 9
Example:
$ chatr oracle
oracle:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib/librt.2
dynamic /usr/lib/libnss_dns.1
dynamic /usr/lib/libdld.2
static /usr/lib/libc.2
shared library binding:
immediate nonfatal
static branch prediction disabled
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
data page size: D (default)
instruction page size: D (default)
$ vi rman_command_script
run {
allocate channel dev_1 type disk;
allocate channel dev_2 type disk;
full
filesperset 1
(database format
'/app/oracle/tmpbc/TOP_%s:%t.dbf');
}
$ bin/rman sys/manager@TOP nocatalog cmdfile
rman_command_script
Recovery Manager: Release 8.0.4.0.0 - Production
RMAN> run {
2> allocate channel dev_1 type disk;
3> allocate channel dev_2 type disk;
(Refer to Oracle manuals for further instruction)
Copyright 2004
Page 10 of 10
Start restore.
Create restore script
Start restore
Example:
$ vi rman_command_script
run {
allocate channel dev_1 type disk;
allocate channel dev_2 type disk;
restore database;
release channel dev_1;
release channel dev_2;
}
$ bin/rman sys/manager@TOP nocatalog cmdfile rman_command_script
2. Configuration Problems
IMPORTANT
If you have encountered any errors up to this point when performing the procedures described in the previous
section, please contact Oracle8/9 support. The respective tests must be done before you even start checking the
Data Protector Oracle8/9 configuration.
2.1.Verify that the Data Protector software has been installed properly.
Prequisite when doing an upgrade/ installation:
You need to shut down any running Oracle8 databases on the Oracle8 servers to be integrated before
upgrading or installing the Data Protector Oracle8 integration, and restart them after the upgrade or
installation is complete.
When performing an upgrade:
The Oracle 8/9 integration is upgraded automatically during the client upgrade. After the upgrade
procedure has completed, some additional steps have to be performed manually to finish the upgrade.
For the upgrade procedure, refer to Upgrading to Data Protector A.05.10 in the HP OpenView Storage
Data Protector Installation and Licensing Guide.
When performing an installation:
Install the Data Protector Oracle8/9 integration software on your Oracle8/9 Server system either locally,
from the CD-ROM, or remotely, using the Data Protector GUI. You must install the following Data Protector
software components on the Oracle8/9 server system:
Oracle8 Integration
Disk Agent
Media Agent (if you have devices connected to the system)
Copyright 2004
Page 11 of 11
2.2.Verify that the Data Protector Database Library is linked with the Oracle8/9 Executable.
Refer to the Oracle linking whitepaper:
Oracle with Omniback/Data Protector on UNIX systems
This whitepaper can be found on http://support.openview.hp.com/dataprotector_docs.jsp .
Copyright 2004
Page 12 of 12
====================
Parsing options:
'-perform:checkuser' :OPT_PERFORM: 'CHECKUSER'
=======================
[Normal] Parsing environment options.
[Normal] Performing common initialisation.
[Normal] Getting cell server host from config file.
[Normal] Performing cell server connection initialisation.
[Normal] Getting current user information.
[Normal] Testing if user can see private BAR objects.
[Normal] Testing if user can perform restore.
[Normal] Check user successfully finished.
-----------------------------------------OmniBackII testbar finished.
------------------------------------------
If the user account holds all required permissions, you will receive only NORMAL messages displayed on
the screen.
For example, if user dizdar, on Oracle8 client system.com, is not in the operator or
admin group, you get the following error:
[Critical] From: [email protected] "" Time: 08/06/98 17:35:37
[131:53] User "[email protected]" is not allowed to perform a restore.
Refer to the HP OpenView Storage Data Protector UNIX Integration Guide for additional information
about right privileges.
Copyright 2004
Page 13 of 13
3. Backup Problems
At this stage, you should have performed all the verification steps described in the previous sections. After this,
proceed as follows:
IMPORTANT
It is possible to receive a *RETVAL*0 even though the backup still fails. This can happen
due to the fact that the backup owner is not the Oracle dba user.
Copyright 2004
Page 14 of 14
3.3.Verify Data Protector internal data transfer using the testbar2 utility.
Before you run the testbar2 utility, verify that the Cell Manager name is correctly defined on the
Oracle8/9 Server system. Check the name of the Cell Manager system in the file.
For HP-UX and Solaris systems, this file can be found at:
/etc/opt/omni/cell/cell_server
For other UNIX systems, this file can be found at:
/usr/omni/config/cell/cell_server
Then run the following command:
For HP-UX and Solaris systems:
/opt/omni/bin/testbar2 -type:Oracle8 -appname:<ORACLE_SID> \
-bar:<backup_specification_name> -perform:backup
For other UNIX systems:
/usr/omni/bin/testbar2 -type:Oracle8 -appname:<ORACLE_SID> \
-bar:<backup_specification_name> -perform:backup
Switch to the Data Protector Manager and examine the errors reported by the testbar2 utility by clicking
the Details button in the Data Protector Monitor context.
If the messages indicate problems on the Data Protector side of the integration, proceed as follows:
Create an Oracle8/9 backup specification to back up to a null device or file. If the backup
succeeds, the problem may be related to the backup devices. Refer to the HP OpenView Storage
Data Protector Administrators Guide for instructions on troubleshooting devices.
3.4.Start an Oracle backup directly to disk, using Recovery Manager channel type disk.
If this test fails, then it may not be a Data Protector problem.
Example:
Logon as the Oracle user.
Start backup to disk using RMAN.
Create rman backup command script:
$ vi bkp_command_script
run {
allocate channel dev_1 type disk;
allocate channel dev_2 type disk;
full
filesperset 1
(database format '/app/oracle/tmpbc/TOP_%s:%t.dbf');
}
$ bin/rman sys/manager@TOP nocatalog cmdfile rman_command_script
Start restore to disk using RMAN.
Copyright 2004
Page 15 of 15
3.5.Check if the target database is in archivelog mode (required for online backup).
logon as the Oracle user
export ORACLE_SID of target database as described in 1.1.
start Server Manager and connect internal
type "archive log list;" in order to get archivelog status of target database.
SVRMGR> archive log list;
Example:
No Archive Mode
Disabled
/applications/ORA8/app/oracle/admin \
/TOP/arch
270
272
Copyright 2004
Page 16 of 16
Copyright 2004
Page 17 of 17
4. Restore problems
You should have performed all the verification steps described in the previous sections. Proceed with the points below.
If youre not sure what or how to restore an Oracle database, then do check the chapter 4.8 Examples of an
Oracle8/9 Database Restore first. This will give some examples of how you should perform a restore.
4.3.Verify Data Protector internal data transfer using the testbar2 utility.
Once you know the information about the object to be restored, you can simulate a restore using the Data
Protector testbar2 utility.
Before you run the testbar2 utility, verify that the Cell Manager name is correctly defined on the
Oracle8/9 Server system.
Check the name of the Cell Manager system in the cell_server file.
For HP-UX and Solaris systems:
/etc/opt/omni/cell/cell_server
For other UNIX systems
/usr/omni/config/cell/cell_server
Copyright 2004
Page 18 of 18
Test Data Protector internal data transfer using the testbar2 utility:
For HP-UX and Solaris systems:
/opt/omni/bin/testbar2 \
-type:Oracle8 \
-appname:<ORACLE_SID> \
-perform:restore
-object:<object_name> \
-version:<object_version> \
-bar:<backup_specification_name>
For other UNIX systems:
/usr/omni/bin/testbar2 \
-type:Oracle8 \
-appname:<ORACLE_SID> \
-perform:restore \
-object:<object_name> \
-version:<object_version> \
-bar:<backup_specification_name>
IMPORTANT
The hostname should not be specified in the object option. It is automatically provided by testbar2. You
should see only NORMAL messages displayed on your screen, otherwise examine the errors reported by
the testbar2 utility by clicking the Details button in the Data Protector Monitor context.
If the messages indicate problems on the Data Protector side of the integration, proceed as follows:
Run the omnidb command to view the objects in the database.
Copyright 2004
Page 19 of 19
4.7.For Zero Downtime or Standalone Backup sessions, try to put the database into the Open
state manually (after using the Data Protector Restore GUI for Oracle to recover and restore).
If you have used the Data Protector Restore GUI for Oracle to recover and restore a Zero Downtime
Backup (ZDB) session or a standalone backup, and you see the following error message:
Oracle Error: ORA-1589: must use RESETLOGS or NORESETLOGS option for database open.
Open a SQLplus window and use the following command:
SQL>sqlplus/nolog
SQL>connect as sysdba
SQL>alter database open no resetlogs/resetlogs;
If this does not work try using the following command:
SQL>alter database open resetlogs;
Copyright 2004
Page 20 of 20
Copyright 2004
Page 21 of 21
Copyright 2004
Page 22 of 22
You can also save the script into a file and perform a full database restore using the saved files.
The procedure in such cases is as follows:
1. Create a file restore_database in the /var/opt/omni/tmp directory.
2. Start the full database restore.
a. If you are using the recovery catalog database, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD rcvcat \
rman/rman@CATAL cmdfile=/var/opt/omni/tmp/restore_datafile
b. If you are using control files, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD \
nocatalog cmdfile=/var/opt/omni/tmp/restore_datafile
Point-in-Time Restore
To perform a point-in-time restore, you also need to restore and apply the archive logs to the specified
point in time. To perform a point-in-time database restore, follow the steps below:
1. Log in to the Oracle 8/9 RMAN:
a. If you are using the recovery catalog database, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD rcvcat \ rman/rman@CATAL
b. If you are using control files, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD nocatalog
2. Start the point-in-time restore:
run{
allocate channel <dev1> type <sbt_tape> parms
ENV=(OB2BARTYPE=Oracle8 \
OB2APPNAME=<ORACLE_SID>);
set until time Mar 14 2001 11:40:00;
restore database;
recover database;
sql alter database open;
release channel <dev1>;
}
3. After you have performed a point-in-time restore, reset the database in the Recovery Catalog.
You can also save the script into a file and perform a point-in-time restore using the saved files.
Follow the steps below:
1. Create a file restore_PIT in the /var/opt/omni/tmp directory.
2. Start the point-in-time restore.
a. If you are using the recovery catalog database, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD rcvcat \
rman/rman@CATAL cmdfile=/var/opt/omni/tmp/restore_PIT
b. If you are using control files, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD \
nocatalog cmdfile=/var/opt/omni/tmp/restore_PIT
Copyright 2004
Page 23 of 23
Tablespace Restore
If a table is missing or corrupted, you need to perform a restore of the entire tablespace. To restore a
tablespace, you may take only a part of the database offline, so that the database does not have to be in
the mount mode. You can use either a recovery catalog database or control files to perform a tablespace
restore. Follow the steps below:
1. Log in to the Oracle 8/9 RMAN:
a. If you are using the recovery catalog database, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD rcvcat \
rman/rman@CATAL
b. If you are using control files, run the following command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD nocatalog
2. Start the tablespace restore.
a. If the database is in the open state, the script to restore the tablespace should have the
following format:
run{
allocate channel <dev1> type <sbt_tape> parms
ENV=(OB2BARTYPE=Oracle8, \
OB2APPNAME=<ORACLE_SID>);
sql alter tablespace TEMP offline immediate;
restore tablespace TEMP;
recover tablespace TEMP;
sql alter tablespace TEMP online;
release channel <dev1>;
}
b. If the database is in the mount state, the script to restore the tablespace should have the
following format:
run{
allocate channel <dev1> type <sbt_tape> parms
ENV=(OB2BARTYPE=Oracle8, \
OB2APPNAME=<ORACLE_SID>);
restore tablespace TEMP;
recover tablespace TEMP;
release channel <dev1>;
}
You can also save the script into a file and perform a tablespace restore using the saved
files. The procedure in such cases is as follows:
1. Create a file restore_TAB in the /var/opt/omni/tmp directory.
2. Start the tablespace restore.
a. If you are using the recovery catalog database, run the following
command:
<ORACLE_HOME>/bin/rman target sys/manager@PROD rcvcat \
rman/rman@CATAL cmdfile=/var/opt/omni/log/restore_TAB
Copyright 2004
Page 24 of 24
Copyright 2004
Page 25 of 25
Copyright 2004
Page 26 of 26
Supported Versions
OD/DP version
Oracle type
Omniback 3.5
Oracle Version
Oracle 8.0.x /
Recovery Manager
Oracle 8.1.x /
Recovery Manager
Oracle 8.1.6
Windows 2000
Oracle 8.0.x /
Recovery Manager
Oracle 8.1.x /
Recovery Manager
Omniback 4.1
Copyright 2004
Operating System
Oracle 8.0.x /
Recovery Manager
Page 27 of 27
Copyright 2004
Oracle 8.1.x /
Recovery Manager
Oracle 9i / Recovery
Manager (6)
Oracle 8.0.x /
Recovery Manager
Oracle 8.0.1 /
Recovery Manager
Oracle 8.0.x /
Recovery Manager
Oracle 8.1.x /
Recovery Manager
Oracle 9i / Recovery
Manager (6)
Page 28 of 28
Oracle 8.0.x /
Recovery Manager
Oracle 8.0.1 /
Recovery Manager
Oracle 8.0.x /
Recovery Manager
Oracle 8.1.x /
Recovery Manager
Oracle 9i / Recovery
Manager (6)
Copyright 2004
Oracle 8.0.x /
Recovery Manager
Oracle 8.0.1 /
Recovery Manager
Page 29 of 29
Oracle 9i / Recovery
Manager
Copyright 2004
Page 30 of 30