What are the challenges you face when working across database platforms? Take the survey


pf_rodierpf_rodier Posts: 3
edited December 3, 2010 1:41PM in SQL Backup Previous Versions
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'
name value
exitcode 850
sqlerrorcode 0

Is this command not supported?


  • Options
    peteypetey Posts: 2,358 New member
    No, RESTORE LABELONLY is not supported.

    Which details are you interested in looking at from the RESTORE LABELONLY output?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    We we're using it in a script that generates restores scripts automatically, to refresh our support and test environments from a scheduled job.

    I ultimately modified the script and it is does not need this command anymore.
  • Options
    VirulVirul Posts: 3 New member
    Task: Redgate created bakup in split file. So i have 4 sqb files.
    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

    It seems labelonly does not work

    I am getting below result. 
    Syntax error: 'LABELONLY' after 'RESTORE'
    exitcode 850
    sqlerrorcode 0

    Any help?
Sign In or Register to comment.