STATUS CODE 35, 95: Certain Veritas NetBackup (tm) 6.0 commands such as nbemmcmd, bpmedia, and bpmedialist are case sensitive when entering media IDs.
Exact Error Message
requested media id was not found in the EMM database
Details:
Overview:
When running any of the NetBackup commands that query the Enterprise Media Manager (EMM) server, it is necessary to specify the proper case when entering the media ID. For example, the nbemmcmd, bpmedia,and bpmedialist commands are all case sensitive for media IDs. These commands will fail with a Status 35 if the media IDs are not entered in the proper case. This will result in the Media Manger error "volume does not exist in database". An analysis of the NetBackup logs will show a Status 95 Error "requested media id was not found in the EMM database". This will occur for both Windows and UNIX platforms. The examples in this TechNote are from a Solaris 9 master server.
Other commands such as vmquery, bpexpdate,and bpimmedia will show the proper media information regardless of what case is used to enter in the media ID. This requirement is new to NetBackup 6.0 because of the method in which the EMM server queries for media. The proper case must be used in commands to ensure a proper match in the EMM database.
Troubleshooting:
The following examples show the output of various commands when using the wrong case for media IDs. The output is from a Solaris 9 master server running NetBackup 6.0 Maintenance Pack 1. The actual media ID which should be used is ABC123.
The bpmedialist and bpmedia commands will fail with the same error when entering the wrong case for the media ID:
# bpmedialist -m abc123
requested media id was not found in the EMM database
# bpmedia -unfreeze -m abc123
requested media id was not found in the EMM database
The nbemmcmd command will fail with a media manager status 35 when entering the wrong case for the mediad ID:
# nbemmcmd -listmedia -mediaid abc123:
NBEMMCMD, Version:6.0(20050906)
The function returned the following failure status:
volume does not exist in database (35)
Command did not complete successfully.
Log Files:
The /usr/openv/netbackup/logs/admin/log.<date> will show the following errors trying to freeze media. Similar errors will appear when running the bpmedialist command to get the details for a specific media ID.
<16> freeze_unfreeze_media: (-) Translating EMM_ERROR_MediaNotFound(2005031) to 95 in the NetBackup context
<16> freeze_unfreeze_media: emmlib_MediaDBOp() failed: 95
<16> freeze_unfreeze_media: unable to freeze media abc123
<2> bpmedia: requested media id was not found in the EMM database
<2> bpmedia: EXIT status = 95
Unified logging will show that the EMM server cannot find the requested media ID:
# vxlogview -t 00:05:00
02/23/06 16:53:21.687 [MediaImpl::getMediaRecord]
<<--snip-->>
02/23/06 16:53:21.765 [DbConnection::Execute] stmt=< select count(*) FROM EMM_Media left outer join EMM_Machine on EMM_Media.OriginHostKey = EMM_Machine.MachineKey WHERE EMM_Media.MediaId='abc123'>
<<--snip-->>
02/23/06 16:53:21.784 [DbConnection::Fetch] SQL - retval=EMM_ERROR_SQLNoDataFound(2007031)
retdal=100 native=<0> sqlerror=<> sqlstate=<>
02/23/06 16:53:21.786 [MediaImpl::getMediaRecord] retval <2007031>
02/23/06 16:53:21.786 [DbConnection::rollbackTransaction] TransLevel 0
02/23/06 16:53:21.786 [MediaImpl::setMediaDBStatus] - retval = < 2005031 >
Resolution:
This issue will be addressed in the NetBackup 6.5 release and will allow upper or lower case media IDs to work for any of these commands. There are no plans to address this issue in the NetBackup 6.0 release.
Due to the way in which the EMM server handles media lookups, the proper case must be used when specifying a media ID with certain commands. If a failure is encountered when running the nbemmcmd, bpmedialist, or bpmedia commands, ensure the proper case is being used to enter the media ID.
The vmquery command will display the correct case and can be used to verify what the proper case is for a media ID:
# cd /usr/openv/volmgr/bin
# ./vmquery -m abc123
================================================
media ID: MWH002
media type: DLT cartridge tape 2 (16)
barcode: --------
media description: ------
volume pool: NetBackup (1)
The media ID: displayed will show the proper case to use for other commands such as nbemmcmd, bpmedialist, or bpmedia. Retry the failed operation using this exact media ID.
Bob Stump
VERITAS
"Ain't it the truth? Ain't it the truth?" Bert Lahr, Wizard of Oz 1939