Logical device 'xxxx' already exists.

Last Post 22 Feb 2008 04:56 AM by SQLUSA. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

22 Feb 2008 02:08 AM
We are facing this probleme sevral times a day:

Each of our live database has a scheduled job to make a log backup of our database each 10 minutes...
the problem is, several times a day, this job fails (whatever database).
the error message is:

Logical device 'xxxx_log_22.02.2008_09:04:01' already exists. [SQLSTATE 42000] (Error 15026). The step failed.

as you see the logical name is generated on the ly and couldn't exist already...nevertheless, I do a

if exisit

exec sp_dropdevice @vbackupdevice
before the
EXEC @v_error = master..sp_addumpdevice 'disk', @vbackupdevice, @v_filename

but some times, it is reported as already existing... and the the job fails...
This is no big issue because 10 minutes later,the job will succeed...
the proble is that our mionitoring tool reports some failures.... ,and each time we have to check logs to ensure the backup carries on working afterwards...

Did anybody had this case where a logical device isn't existing but is reported as?????

New Member
New Member

22 Feb 2008 04:56 AM
Are you dynamically making up logical devices?

Just a few? Many?

What about using file name?

declare @path nvarchar(128);
set @path = N'C:\backup\inventory.bak';
BACKUP DATABASE [Inventory] TO DISK=@path......

You can put timestamp into the @path as well.

Kalman Toth - Database, Data Warehouse & Business Intelligence Architect
SQLUSA: http://www.sqlusa.com/order2005highperformance/ The Best SQL Server 2005 Training in the World!

Acceptable Use Policy