#1 Global Leader in Data Protection & Ransomware Recovery

"Error Subquery returned more than 1 value" during upgrade to 6.0.0.153

KB ID: 1374
Product: Veeam Backup & Replication
Version: 6.0.0.153
Published: 2011-12-01
Last Modified: 2020-08-13
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please try again later.

Challenge

When upgrading to version 6 of Backup & Replication, you receive the following error:

Error executing SQL Script DBUpdate.sql_filled. Line 7195. Subquery returned more than 1 value. This is not permitted when the subquery follows =,!=,<,<=,>,>= or when the subquery is used as an expression. 

Cause

The VeeamBackup database failed to upgrade correctly.

Solution

Please run the following script against the VeeamBackup database:

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

More Information

In order to run the script from cmd, please perform the following steps:

1. Save the script as *.sql file (e.g. script.sql) to local disk

2. Make sure that there are no jobs running at the moment

3. Run the following command: sqlcmd -S COMPUTER\INSTANCE -d VeeamBackup -i PATHTOSCRIPT\script.sql -o c:\resetresult.txt
where COMPUTER is the name of computer with database, INSTANCE is the name of instance (VEEAM for default installation), PATHTOSCRIPT is the path to the script. If the script needs to be applied to EM database, please edit the command and replace VeeamBackup with VeeamBackupReporting

4. Restart the Veeam services

Or you may want to login to your database with SQL management studio:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796, right click on your database and choose the “New query” option, insert the text, and click Execute.


If you continue to have trouble with this solution, contact Support. To perform an upgrade of Veeam Backup & Replication to version 6.0, you must be running version 5.0.1 or 5.0.2. If you have an earlier version of Backup & Replication, contact support for the upgrade path and files.  
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please try again later.