Welcome to OWSUG.ca Sign in | Join | Help
DPM Issue with false tape inventory jobs

After replacing a tape library with a new one, DPM still tries to perform daily inventory job on the missing library. These are nag failed jobs and don't accurately reflect real problems with the current library that is working.

Resolution:

Disable the tape inventory jobs associated with the missing tape library using the following  script


IN THIS EXAMPLE, WE HAVE ONE LIBRARY WITH FIVE TAPE DRIVES.

MAKE A BACKUP OF YOUR CURRENT DPMDB by running dpmbackup -db  from command prompt.

1) Copy the  "SQL script to modify"  found below into notepad.
2) Open sql management studio.
3) Highlight the DPMDB database.
4) Press the "NEW QUERY" and execute the following Query:

-Select libraryid, GlobalLibraryID from dbo.tbl_MM_Library where isoffline='true'and description = 'TapeLibrary'

It should return a single row something like this:
LibraryID                              GlobalLibraryID
139859e0-f6ab-471a-9dad-f9c13c68f22d   0e867b9c-9f23-4317-88b4-6b437fa0e222

-In the notepad that has the sample sql script:

- Find, Replace tbl_MM_Library_TAPELIBRARY-ID with LibraryID GUID returned 139859e0-f6ab-471a-9dad-f9c13c68f22d.
- Find, Replace the tbl_MM_Library_GLOBALLIBRARY-ID with the GlobalLibraryID GUID Returned 0e867b9c-9f23-4317-88b4-6b437fa0e222

5)  Run the following QUERY:   Substituting the LibraryID GUID with the LibraryID GUID returned from the above Query.

select Driveid from dbo.tbl_MM_drive where libraryid = '139859e0-f6ab-471a-9dad-f9c13c68f22d'
DrIveID
f634984f-9f3b-48af-87af-1f37c516e9f9
277e2a0e-2c70-432b-b7dc-2e1a5ff3f218
6148fdba-1a5e-401a-bac1-484934638408
61c8c1cf-eb07-4635-bcf3-49b7c3d02f43
8826ef5a-1f1a-4495-a677-50215e0962b6

In the notepad that has the sample sql script:

- Find, replace the dbo.tbl_MM_TapeDrive_DRIVEID-1 with f634984f-9f3b-48af-87af-1f37c516e9f9
- Find, replace the dbo.tbl_MM_TapeDrive_DRIVEID-2 with 277e2a0e-2c70-432b-b7dc-2e1a5ff3f218
- Find, replace the dbo.tbl_MM_TapeDrive_DRIVEID-3 with 6148fdba-1a5e-401a-bac1-484934638408
- Find, replace the dbo.tbl_MM_TapeDrive_DRIVEID-4 with 61c8c1cf-eb07-4635-bcf3-49b7c3d02f43
- Find, replace the dbo.tbl_MM_TapeDrive_DRIVEID-5 with 8826ef5a-1f1a-4495-a677-50215e0962b6

6) In the notepad that has the sample sql script. REMOVE ANY LINES FOR DRIVES THAT ARE NOT USED

and also delete the comments  " <<<remove if not used".

IE: In a Single drive library, Remove EXTRA values for the following, and remember to remove the

"," in the last entry, other wise you will get error "Incorrect syntax near ',' when the script is

executed.

    'dbo.tbl_MM_TapeDrive_DRIVEI-DX'

7) Now copy and paste the resulting script into the query window and execute it.   This should

prevent any future inventory jobs from running.

============== SCRIPT TO MODIFY =============================

update dbo.tbl_MM_Library

Set

IsEnabled='False',
IsOffline='True',
NeedsFastInventory='False'

where GlobalLibraryId in
(
    'tbl_MM_Library_GLOBALLIBRARY-ID',

)

update dbo.tbl_MM_Drive

Set

IsOffline='True'

where LibraryId in
(
    'tbl_MM_Library_TAPELIBRARY-ID',
)

update dbo.tbl_MM_Slot

Set

IsPresent='False'

where LibraryId in
(
'tbl_MM_Library_TAPELIBRARY-ID'
)

update dbo.tbl_MM_TapeDrive

Set

IsEnabled='False'

where DriveId in
(
  'dbo.tbl_MM_TapeDrive_DRIVEID-1',
  'dbo.tbl_MM_TapeDrive_DRIVEID-2',   <<<remove if not used
  'dbo.tbl_MM_TapeDrive_DRIVEID-3',   <<<remove if not used
  'dbo.tbl_MM_TapeDrive_DRIVEID-4',   <<<remove if not used
  'dbo.tbl_MM_TapeDrive_DRIVEID-5'    <<<remove if not used

)

Update       dbo.tbl_JM_JobDefinition

Set

IsDeleted = 'True'

WHERE     (Type = 'bfa93eb9-5bfc-4942-b263-c48f84ee6717')
AND (IsDeleted = 'False')
AND (Xml LIKE '%LibraryId="tbl_MM_Library_TAPELIBRARY-ID"%')

================== END OF SCRIPT  ======

Published Tuesday, May 26, 2009 2:05 PM by islam

Comments

Anonymous comments are disabled
Powered by Community Server, by Telligent Systems