Red Gate forums :: View topic - Capturing the SQL Backup message output
Return to www.red-gate.com RSS Feed Available

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

Capturing the SQL Backup message output

Search in SQL Backup 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
khaff



Joined: 26 Feb 2013
Posts: 1

PostPosted: Tue Feb 26, 2013 2:32 pm    Post subject: Capturing the SQL Backup message output Reply with quote

In addition to capturing the @exitcode OUTPUT and @sqlerrorcode OUTPUT from the command line, I wish to also capture the the SQL Backup messages that are returned in the first dataset. Can anyone tell me how to do this?

[/img]
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2306

PostPosted: Wed Feb 27, 2013 1:40 pm    Post subject: Reply with quote

Use the SINGLERESULTSET option e.g.

Code:
CREATE TABLE #sqb (DATA NVARCHAR(4000))

INSERT INTO #sqb EXECUTE master..sqlbackup '-sql "BACKUP DATABASE pubs TO DISK = [<AUTO>] WITH SINGLERESULTSET"'

_________________
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