| Author |
Message |
khaff
Joined: 26 Feb 2013 Posts: 1
|
Posted: Tue Feb 26, 2013 2:32 pm Post subject: Capturing the SQL Backup message output |
|
|
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 |
|
 |
petey
Joined: 24 Apr 2005 Posts: 2215
|
Posted: Wed Feb 27, 2013 1:40 pm Post subject: |
|
|
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 |
|
 |
|
|
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