x

Verify failed. Backup information for database 'XYZ' not found. [SQLSTATE 42000] (Error 50000). The step failed.

Hi Experts ,

I have SQL AGENT Job full backup job step

 DECLARE @fname NVARCHAR(100) = N'V:\Backup\XYZ_Q1_backup_' + CONVERT(NVARCHAR(10), SYSDATETIME(), 112 ) + N'.bak';
 
 BACKUP DATABASE [XYZ] TO  DISK = @fname WITH COMPRESSION,  STATS = 10
 
 DECLARE @backupSetId AS INT
 SELECT @backupSetId = position FROM msdb..backupset WHERE database_name=N'XYZ' AND backup_set_id = 
     ( SELECT MAX( backup_set_id ) FROM msdb..backupset WHERE database_name=N'XYZ' );
 
 IF @backupSetId IS NULL
 BEGIN
     RAISERROR( N'Verify failed. Backup information for database ''XYZ'' not found.', 16, 1 )
 END
 
 RESTORE VERIFYONLY FROM  DISK = @fname WITH  FILE = @backupSetId


i am getting error everytime it runs

10 percent processed. [SQLSTATE 01000] (Message 3211) 20 percent processed. [SQLSTATE 01000] (Message 3211) 30 percent processed. [SQLSTATE 01000] (Message 3211) 40 percent processed. [SQLSTATE 01000] (Message 3211) 50 percent processed. [SQLSTATE 01000] (Message 3211) 60 percent processed. [SQLSTATE 01000] (Message 3211) 70 percent processed. [SQLSTATE 01000] (Message 3211) 80 percent processed. [SQLSTATE 01000] (Message 3211) 90 percent processed. [SQLSTATE 01000] (Message 3211) Processed 256 pages for database 'XYZ', file 'XYZ_P' on file 1. [SQLSTATE 01000] (Message 4035) Processed 31158096 pages for database 'XYZ', file 'XYZ_F1' on file 1. [SQLSTATE 01000] (Message 4035) Processed 31181464 pages for database 'XYZ', file XYZ_F2' on file 1. [SQLSTATE 01000] (Message 4035) 100 percent processed. [SQLSTATE 01000] (Message 3211) Processed 98985 pages for database 'XYZ', file 'XYZ_log' on file 1. [SQLSTATE 01000] (Message 4035) BACKUP DATABASE successfully processed 62438801 pages in 2183.508 seconds (223.403 MB/sec). [SQLSTATE 01000] (Message 3014) Verify failed. Backup information for database 'XYZ' not found. [SQLSTATE 42000] (Error 50000). The step failed.

what should i do to solve the problem ?

more ▼

asked May 17 at 08:16 AM in Default

avatar image

shamim007
210 6

I'm not at a computer where I can check these things, but are you sure about your logic? Doesn't RESTORE VERIFYONLY...FILE=... require the FILE parameter to be the internal name of a database file within the database?

What do you see if you to RESTORE FILELISTONLY on that backup?

May 16 at 07:49 AM ThomasRushton ♦♦
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

If the backup verification step is failing, it could be a path that can't be resolved. Make sure that the path that you used to generate the backup is the same path that you use to verify the backup. Also, check your network reliability. Sometimes, backup verification times out and causing the step to fail. You can have the backup verification step on a separate process.

more ▼

answered May 18 at 04:23 AM

avatar image

jason_clark03
421 3 7

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x2171
x5

asked: May 17 at 08:16 AM

Seen: 110 times

Last Updated: May 18 at 04:23 AM

Copyright 2017 Redgate Software. Privacy Policy