Correct Syntax for Restoring sQBHeaderOnly with Password

pamozerpamozer Posts: 16 New member
edited March 20, 2014 5:37AM in SQL Backup Previous Versions
I am having issues with the syntax for sqbheaderonly in SQL SERVER Managment Studio
EXECUTE master..sqlbackup '-SQL "RESTORE SQBHEADERONLY FROM DISK = ''c:\backups\FULL_DB001_superbill_24305_prod_20140219_200928_encr.sqb''With Password='''teest'''"' 

Can someone please tell me what I am missing.

thanks

Comments

  • pamozerpamozer Posts: 16 New member
    Syntax error: 'teest''' after 'c:\backups\FULL_DB001_superbill_24305_prod_20140219_200928_encr.sqb WITH PASSWORD ='
  • peteypetey Posts: 2,358 New member
    EXECUTE master..sqlbackup '-SQL "RESTORE SQBHEADERONLY FROM DISK = ''c:\backups\FULL_DB001_superbill_24305_prod_20140219_200928_encr.sqb'' WITH PASSWORD = ''teest'' "'
    
    or
    EXECUTE master..sqlbackup '-SQL "RESTORE SQBHEADERONLY FROM DISK = [c:\backups\FULL_DB001_superbill_24305_prod_20140219_200928_encr.sqb] WITH PASSWORD = [teest] "'
    
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.