Correct Syntax for Restoring sQBHeaderOnly with Password

Compresses, encrypts, secures and monitors SQL Server backups.

Moderators: JonathanWatts, Chris Auckland, eddie davis, Colin Millerchip, Brian Harris, james.billings, RBA, petey

Correct Syntax for Restoring sQBHeaderOnly with Password

Postby pamozer » Wed Mar 19, 2014 9:21 pm

I am having issues with the syntax for sqbheaderonly in SQL SERVER Managment Studio
[code]
EXECUTE master..sqlbackup '-SQL "RESTORE SQBHEADERONLY FROM DISK = ''c:\\backups\\FULL_DB001_superbill_24305_prod_20140219_200928_encr.sqb''With Password='''teest'''"'
[/code]

Can someone please tell me what I am missing.

thanks
pamozer
 
Posts: 13
Joined: Mon Jan 20, 2014 8:51 pm

Here is the error I get

Postby pamozer » Wed Mar 19, 2014 9:37 pm

Syntax error: 'teest''' after 'c:\\backups\\FULL_DB001_superbill_24305_prod_20140219_200928_encr.sqb WITH PASSWORD ='
pamozer
 
Posts: 13
Joined: Mon Jan 20, 2014 8:51 pm

Postby petey » Thu Mar 20, 2014 10:37 am

Code: Select all
EXECUTE master..sqlbackup '-SQL "RESTORE SQBHEADERONLY FROM DISK = ''c:\\backups\\FULL_DB001_superbill_24305_prod_20140219_200928_encr.sqb'' WITH PASSWORD = ''teest'' "'

or
Code: Select all
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 7
petey
 
Posts: 2233
Joined: Sun Apr 24, 2005 12:34 pm


Return to SQL Backup 7

Who is online

Users browsing this forum: No registered users and 0 guests