Red Gate forums :: View topic - SINGLERESULTSET option in backup command for version 5
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Backup Previous Versions
SQL Backup Previous Versions forum

SINGLERESULTSET option in backup command for version 5

Search in SQL Backup Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
AlexG



Joined: 07 Apr 2006
Posts: 14

PostPosted: Thu Sep 17, 2009 4:27 pm    Post subject: SINGLERESULTSET option in backup command for version 5 Reply with quote

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
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2301

PostPosted: Thu Sep 17, 2009 5:23 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
jalfano



Joined: 16 Oct 2007
Posts: 19
Location: New York

PostPosted: Sat Feb 27, 2010 11:47 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
jalfano



Joined: 16 Oct 2007
Posts: 19
Location: New York

PostPosted: Sat Feb 27, 2010 11:59 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2301

PostPosted: Sun Feb 28, 2010 3:02 pm    Post subject: Reply with quote

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

Code:
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
Back to top
View user's profile Send private message Send e-mail
jalfano



Joined: 16 Oct 2007
Posts: 19
Location: New York

PostPosted: Mon Mar 01, 2010 9:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2301

PostPosted: Wed Mar 03, 2010 1:19 pm    Post subject: Reply with quote

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

Code:
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
Back to top
View user's profile Send private message Send e-mail
jalfano



Joined: 16 Oct 2007
Posts: 19
Location: New York

PostPosted: Wed Mar 03, 2010 6:15 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2301

PostPosted: Thu Mar 04, 2010 4:39 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group