RESTORE LABELONLY FROM DISK ?
pf_rodier
Posts: 3
I need to execute a RESTORE LABELONLY FROM DISK command against a SQL Backup (sqb) full backup file.
I'm using the following syntax:
exec master..sqlbackup '-sql "RESTORE LabelOnly FROM DISK =''<pathname>''"'
But I get an error:
Syntax error: 'LabelOnly' after 'RESTORE'
and
name value
exitcode 850
sqlerrorcode 0
Is this command not supported?
I'm using the following syntax:
exec master..sqlbackup '-sql "RESTORE LabelOnly FROM DISK =''<pathname>''"'
But I get an error:
Syntax error: 'LabelOnly' after 'RESTORE'
and
name value
exitcode 850
sqlerrorcode 0
Is this command not supported?
Comments
Which details are you interested in looking at from the RESTORE LABELONLY output?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I ultimately modified the script and it is does not need this command anymore.
We need to create dynamic restore script and restore db on SQL instance.
I want to figure out how many sqb files backup has?, in this case it should be 4.
We are passing first sql file as parameter
I am using below command
EXEC MASTER..SQLBACKUP '-SQL "RESTORE LABELONLY FROM DISK = ''D:\backups\bfile_1.sqb''
It seems labelonly does not work
I am getting below result.
Syntax error: 'LABELONLY' after 'RESTORE'
Any help?