Monday, April 22, 2013

Backup Exec 2012 - Removing Tape Drives that will not delete


So I ran into an issue where I could NOT delete an orphaned tape drive in BackupExec 2012. I replaced a defective drive in the tape library and the old drive remained listed in the console under devices. I updated to the latest service packs and looked through the Symantec forums forever and couldn't find the resolution. The drive was always listed as active. I removed any references to it within any jobs, rebooted the server multiple times, removed drivers, etc. No luck no matter what I did. Because it was "active" i could pause it or take it offline, but I was never allowed to delete it!

Before doing ANYTHING below, I suggest following the directions here to backup your database: http://www.symantec.com/business/support/index?page=content&id=TECH83082

Anyway, on to the show.

So, I logged into a server with SQL Server Management Studio and connected to the database (I just happened to have a SQL server running in our production environment :)

 I connected to the BackupExec server with the credentials I always use (My Windows Login in this case) using Management Studio.

I then did a simple query to find the devices in the database that were listed. I clicked "New Query" and typed this below:

        select * from Device where DeviceID not like 'null'      <--"! Execute" from the tool bar.

I then made a note of the DeviceGUID here of the stubborn device that would not delete. It looked something like this "EFACE2BA-1C4A-4ABF-8660-7B92F70165F9". Then I deleted the device entry from the table like this:

      delete from Device where DeviceGuid like 'EFACE2BA-1C4A-4ABF-8660-7B92F70165F9'          

Again Executing the line above with the "! Execute" from the tool bar.

The message read something like '1 row(s) affected" or something.

Closed out of the Management Studio. Exited of the Backup Exec console and re-launched it. Went to the Devices Screen and the problem device was gone. BAM! Take that!

Anyway, I am not a SQL guru. I know about enough to be dangerous. In this case a little bit of time and experimentation worked out for me. Maybe it will help someone else with this problem.