Does Restore VerifyOnly support wildcards?

This works:
exec master..sqlbackup N'-SQL "RESTORE VERIFYONLY FROM DISK = ''D:\Program Files\Microsoft SQL Server\MSSQL\Backup\File_01.sqb'', DISK = ''D:\Program Files\Microsoft SQL Server\MSSQL\Backup\File_02.sqb''"'

But this doesn't:
exec master..sqlbackup N'-SQL "RESTORE VERIFYONLY FROM DISK = ''D:\Program Files\Microsoft SQL Server\MSSQL\Backup\File_*.sqb''"'

It produces:
Verifying file:
  D:\Program Files\Microsoft SQL Server\MSSQL\Backup\File_*.sqb

Error 580: Failed to open file.  Message:  (Cannot open file "D:\Program Files\Microsoft SQL Server\MSSQL\Backup\File_*.sqb". The filename, directory name, or volume label syntax is incorrect.
)

SQL Backup exit code: 580


exitcode	580
sqlerrorcode	0
filename01	D:\Program Files\Microsoft SQL Server\MSSQL\Backup\File_*.sqb

Comments

Sign In or Register to comment.