Error executing SQL script during upgrade to Veeam Backup & Replication 6.0.0

KB ID:
1371
Product:
Veeam Backup & Replication
Version:
6.0.0
Published:
Last Modified:
2013-05-02

Challenge

When upgrading Veeam Backup & Replication from version 5.x to version 6.0.0 you get the following error:

Error executing SQL script DBupdate.sql_filled. Line 5225. There is already an object named 'db50_update in the database'.


User-added image

Cause

A previous attempt to upgrade the software was terminated.

Solution

Run the following script against VeeamBackup database using SQL Server Management Studio

SET NOCOUNT ON
 
DECLARE @value int
 
SET @value = (SELECT MAX([current_version]) FROM [dbo].[Version])
 
PRINT 'Maximum version=' + cast(@value as nvarchar(max))
 
DELETE FROM [dbo].[Version]
 
INSERT INTO [dbo].[Version] ([current_version]) VALUES(@value)
 
IF EXISTS (SELECT * FROM sys.objects WHERE name = 'db50_update' AND type = 'D')
BEGIN
        PRINT 'Dropping [db50_update] default...'
        DROP DEFAULT db50_update
END
 
IF EXISTS (SELECT * FROM sys.objects WHERE name = 'db50_logging' AND type = 'D')
BEGIN
        PRINT 'Dropping [db50_logging] default...'
        DROP DEFAULT db50_logging
END
 
PRINT 'Success'
GO


Rate the quality of this KB article: 
4.7 out of 5 based on 3 ratings

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.

Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text:

Submit