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.
The VeeamBackup database failed to upgrade correctly.
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')
PRINT 'Dropping [db50_update] default...'
DROP DEFAULT db50_update
IF EXISTS (SELECT * FROM sys.objects WHERE name = 'db50_logging' AND type = 'D')
PRINT 'Dropping [db50_logging] default...'
DROP DEFAULT db50_logging
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.
Please be aware that we’re making changes which will restrict access to product updates for users without an active contract.