How to clean up an IBM InfoSphere DataStage Operations Console DSODB and troubleshoot istool ODBAdmin command issues
Question
How to clean up an IBM InfoSphere DataStage Operations Console DSODB and troubleshoot istool ODBAdmin command issues?
Answer
You can use the istool ODBAdmin command with the purgedb parameter, or SQL queries, to delete historical data from the operations database. There is no automatic method for deleting or archiving historical data. So you must set up a method to manage the size of the operations database as documented here.
Before performing the clean up operation, it is recommended that you run the istool ODBAdmin countdb command to size what is selected in the ODB and also to ensure that records are selected using the correct server and engine names for deletion:
istool ODBAdmin countdb server selector time_range output
For example,
cd <ISInstallDir>/Clients/istools/cli/
where ISInstallDir is the InfoSphere Information Server installation path which defaults to C:\IBM\InformationServer for Windows or /opt/IBM/InformationServer for Linux and Unix.
istool ODBAdmin countdb -domain server1 -server server1 -authfile authfile -upto 15 -days -verbose
Operations Database Maintenance Report - Content
Generated at: 2013-12-16 07:31:16
Run on server: server1
Constraints:
Limited to data before:
Number of engines in report:1
Engine: SERVER1.IBM.COM
Number of nodes for this engine: 1
...
Summary:
Table: HostDetail rows: 2
Table: ResourceUsage rows: 81758
Table: ResourceSnap rows: 1
Table: ParallelConfig rows: 1
Table: JOBRUN rows: 350
Table: JOBEXEC rows: 85
Table: JOBSTAGE rows: 585
Table: JOBLINK rows: 364
Table: JOBRUNSTAGE rows: 3015
Table: JOBRUNLINK rows: 2080
Table: JOBRUNPARAMS rows: 228
Table: JOBRUNLOG rows: 2100
Table: JOBRUNUSAGE rows: 5598
Table: DATALOCATOR rows: 75
End of content report.
Count completed successfully....
Note the name of the engine (or engines) given in the report, and enter them in the purgedb command's -engine option exactly as reported; for example:
istool ODBAdmin purgedb -domain server1 -authfile authfile -engine SERVER1.IBM.COM -runs -upto 15 -days -verbose
If your operations database schema is in DB2 or Oracle database then it is recommended that you apply JR46761 index patch. There are two independent JR46761 patches:
1. patch_JR46761_index_server_all_[version] (recommended for DB2 or Oracle ODB only)
2. patch_JR46761_timeout_all_all_[version] (optional for Client, Services and Engine tiers) *
(Note that these patches need to be requested from IBM Support.)
The queries run by the purgedb command can take a long time for a large ODB in the absence of certain indexes. The default timeout period for istool ODBAdmin purgedb command is 5 minutes. If the time taken running the query from the purgedb command exceeds 5 minutes, the command will time out with an error before it starts deleting anything. The index patch significantly reduces the deletion time for both istool ODBAdmin purgedb command and SQL queries.
* If after applying the JR46761 timeout patch, the istool command does not produce any output when run as a non-root user, please follow the steps in technote 1676349 to resolve.
Examples to troubleshoot errors from istool ODBAdmin purgedb/countdb command:
1. ERROR : Unable to execute the command with the given data [ CORBA MARSHAL 0x4942f89a No; nested exception is ]
Cause 1: The purgedb/countdb command has timed out
Resolution: Apply the JR46761 index patch which provides support for DB2 and Oracle indexes on the engine tier. Note that there is a manual step that must be performed before the patch is effective.
If the selected data is huge it may still not be capable of being deleted within 5 minutes, even after applying the index patch. In this case you can apply the JR46761 timeout patch to increase the timeout value. The patch provides a configurable timeout option for the istool ODBAdmin purge/countdb command.
Cause 2: Mismatch of the istool components between different tiers
Resolution:
- Ensure services, engine and client tiers are at the same release and patch level
- Ensure prerequisite patches, there are any, are applied before applying a new patch
2. Unable to execute the command with one of the errors below:
ERROR : Unable to execute the command with the given data [ Connection refused to host ]
ERROR : Unable to execute the command with the given data [ CORBA MARSHAL 0x4942f89a No; nested exception is ]
ERROR : Unable to execute the command with the given data [ The agent at hostname ]
Cause: ASB Agent is not running
Resolution: Start the ASB Agent
On Linux and Unix
- Run the NodeAgents.sh start command as root
- <ISInstallDir>/ASBNode/bin/NodeAgents.sh start
On Windows
- Start the ASB Agent service using the Windows Services dialog
- Start > Control Panel > Administrative Tools > Services
- Select 'ASB Agent' > Start
3. ERROR : IO exception occurred while trying to connect to socket server
Cause: ODBQueryApp is not running
Resolution: Start the AppWatcher process
On Linux and Unix
- Run DSAppWatcher.sh -start command as dsadm or an equivalent user
- cd <ISInstallDir>/Server/DSODB/bin
- ./DSAppWatcher.sh -start
- ./DSAppWatcher.sh -status
If ODBQueryApp is not running
- ./DSAppWatcher.sh -start ODBQueryApp
On Windows
- Start the AppWatcher service using the Windows Services dialog
- Start > Control Panel > Administrative Tools > Services
- Select 'DataStage AppWatcher Service' > Start - Start a Command Prompt run as administrator, and verify with the DSAppWatcher.sh -status command
- Log in as an administrative user
- Start > Accessories > Command Prompt > Run as administrator
- cd <ISInstallDir>\Server\DSODB\bin
- DSAppWatcher.sh -status
If ODBQueryApp is not running
- DSAppWatcher.sh -start ODBQueryApp
4. Unable to execute the command with the errors below:
ERROR : Server [domainname] not found.
ERROR : Unable to execute the command with the given data [ servername ]
Cause: The specified domain, server or engine can't be reached
Resolution: Ensure domain, server and engine names are correctly entered in the command, and that computers on services, engine and client tiers are properly configured as documented here