SINGLERESULTSET option in backup command for version 5

Forum for users of Red Gate SQL Backup tool

Moderator: Chris Auckland

SINGLERESULTSET option in backup command for version 5

Postby AlexG » Thu Sep 17, 2009 4:27 pm

Hi,
does SINGLERESULTSET exist only in version 6
command bellow run with success on version 6.2
EXECUTE master..sqlbackup N'-SQL \"BACKUP DATABASE [My DB] TO DISK = ''\\\\server01\\dev\\SQL2005\\<AUTO>.sqb'' WITH COMPRESSION = 3, INIT, MAILTO_ONERROR = ''me@mysite.com;'', SINGLERESULTSET \"'

and produce error on version5
SQL Backup v5.0.0.2770
------------------------------------------
Syntax error: 'SINGLERESULTSET' after ','


goal is to get 1 dataset in return

Thank you
AlexG
 
Posts: 14
Joined: Fri Apr 07, 2006 7:07 pm

Postby petey » Thu Sep 17, 2009 5:23 pm

IIRC, you need at least version 5.3 to use the SINGLERESULTSET option.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2226
Joined: Sun Apr 24, 2005 12:34 pm

Postby jalfano » Sat Feb 27, 2010 11:47 pm

We are using SQLBackup version 5.4.0.55 and when I include the WITH SINGLERESULTSET parameter to the end of the command it is still giving me two result sets.

One result set gives me the information about the backup file and the second is giving me exit code information just like when I don't use the WITH SINGLERESULTSET option.

Is there something that I am missing? I need to get this working because we are making some custom restore scripts that require header information.

Thanks,

John
jalfano
 
Posts: 19
Joined: Tue Oct 16, 2007 9:01 pm
Location: New York

Postby jalfano » Sat Feb 27, 2010 11:59 pm

About 5 min after I posted it I realized I was putting the ending double quote right after the path which was excluding the WITH SINGLERESULTSET command.

Now my problem is that in SQLBackup 6.0+ it works fine but in SQLBackup 5.4.0.55 I'm getting a syntax error saying that there's a syntax error SINGLERESULTSET after WITH. But it says this is supported since 5.3. Can anyone tell me if this is a mistake?

John
jalfano
 
Posts: 19
Joined: Tue Oct 16, 2007 9:01 pm
Location: New York

Postby petey » Sun Feb 28, 2010 3:02 pm

The SINGLERESULTSET option is supported in version 5.3 and later. Are you using the SINGLERESULTSET option with the BACKUP command e.g.

Code: Select all
EXEC master..sqlbackup '-sql \"BACKUP DATABASE pubs TO DISK = [e:\\temp\\pubs.sqb] WITH SINGLERESULTSET\"'

or some other command?

Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2226
Joined: Sun Apr 24, 2005 12:34 pm

Postby jalfano » Mon Mar 01, 2010 9:56 pm

I'm trying to use it for the RESTORE HEADERONLY command. I need to extract information from the header in order to do what I need to do.

John
jalfano
 
Posts: 19
Joined: Tue Oct 16, 2007 9:01 pm
Location: New York

Postby petey » Wed Mar 03, 2010 1:19 pm

SINGLERESULTSET with RESTORE HEADERONLY works in 5.3.0.178 and later, so something like this:

Code: Select all
EXEC master..sqlbackup '-sql \"RESTORE HEADERONLY FROM DISK =[e:\\temp\\pubs.sqb] WITH SINGLERESULTSET\"'

will return the header details in a single result set.

Could you please check the version of SQBCoreService.exe that's installed for the SQL Server instance that's rejecting the SINGLERESULTSET option?

Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2226
Joined: Sun Apr 24, 2005 12:34 pm

Postby jalfano » Wed Mar 03, 2010 6:15 pm

I ran the exact code you posted above and just replaced the path with a path to one of our files. I'm still getting the same error \"Syntax error: 'SINGLERESULTSET' after 'WITH'\"

File version of SQBCoreService.exe is 5.1.0.2781

When I go to help > about it says I'm using Red-Gate SQLBackup 5.4.0.55

Windows version is Windows Server 2003 Enterprise Edition x64 SP2

SQL Server is SQL Server 2005 Standard Edition x64 SP3 CU1
(9.0.4207)

Please let me know if you need any other information.

Thanks!

John
jalfano
 
Posts: 19
Joined: Tue Oct 16, 2007 9:01 pm
Location: New York

Postby petey » Thu Mar 04, 2010 4:39 am

The version of SQBCoreService.exe you are using needs to be 5.3.0.178 or newer. To upgrade this file:

- locate the SQBServerSetup.exe file on any workstation that has the SQL Backup GUI installed. The file will be located in the SQL Backup installation folder. The version should be 5.4.0.55, since that's the version of your GUI.

- copy SQBServerSetup.exe to the box running your SQL Server instance

- ensure no SQL Backup processes are running, and if possible, no SQL Backup GUIs are connected to that SQL Server instance.

- run SQBServerSetup.exe on the box

This will upgrade the SQL Backup Agent service, the command line interface, and the extended stored procedures to version 5.4.0.55.

Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2226
Joined: Sun Apr 24, 2005 12:34 pm


Return to SQL Backup Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests