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?
CREATE TABLE #sqb (DATA NVARCHAR(4000))
INSERT INTO #sqb EXECUTE master..sqlbackup '-sql "BACKUP DATABASE pubs TO DISK = [<AUTO>] WITH SINGLERESULTSET"'
Users browsing this forum: No registered users and 0 guests