Activity overview
Latest activity by viacoboni
Stored Procedure Results
I have not downloaded V5.0 beta, but I was very disappointed that in V4.0 it was no longer possible to take the output from dbo.sqlbackup stored procedure into a table using INSERT ... EXEC.
That i...
That looks like it would work. Slightly quicker: select @logicalname = substring(logicalname, 1, charindex(char(0), logicalname)-1) from #FileListOutputSQB where Type = 'D'
That code assumes there is always a char(0) on the logicalname col. / comments
That looks like it would work. Slightly quicker:select @logicalname = substring(logicalname, 1, charindex(char(0), logicalname)-1) from #FileListOutputSQB where Type = 'D'
That code assumes ther...
Petey,
OK, how about this? Add another column to the first result set that is compatible with the second column in the second result set. That will allow the output to be stored in a table once again. Nobody else's code should break.
Whaddya think? / comments
Petey,
OK, how about this? Add another column to the first result set that is compatible with the second column in the second result set. That will allow the output to be stored in a table once a...
Petey,
I appreciate the reply, but there are a host of reasons why I did it this way. Errors are one of them. Suppose using the new error code I get an error code. Wouldn't it be nice to show ALL the messages, including the detailed error? What if I want to see how long it took to backup a database? By returning two incompatible result sets you make that impossible for me to do using the stored procedure.
Please fix this problem. Thanks.
Vince / comments
Petey,
I appreciate the reply, but there are a host of reasons why I did it this way. Errors are one of them. Suppose using the new error code I get an error code. Wouldn't it be nice to show AL...
Can't INSERT TableName EXEC sqlbackup anymore
Version 4.0 of SQL Backup returns multiple result sets. Because the second result set has two columns and the first result set has one column, THERE IS NO WAY to take the output of the procedure i...
Run the following code, substituting your filename in the exec statement. CREATE TABLE #FileListOutputSQB (LogicalName nvarchar(128),
PhysicalName nvarchar(260),
Type char(1),
FileGroupName nvarchar(128) NULL,
Size varchar(20) NULL,
MaxSize varchar(20) NULL,
RowNum int identity(1,1))
insert #FileListOutputSQB
exec master.dbo.sqlbackup '-I -E -SQL "RESTORE FILELISTONLY FROM DISK=''e:\mssql\backup\admin\Admin_db_200603070200.SQB''"'
select size from #FileListOutputSQB where rownum = 1
declare @i int
set @I = 1
while @I <= 20
begin
select 'pos = ' + str(@i,2) + ', ascii = ' + str(ascii(substring(size,@i,1)),3) from #filelistoutputsqb where rownum = 1
set @I = @I + 1
end
/ comments
Run the following code, substituting your filename in the exec statement.CREATE TABLE #FileListOutputSQB (LogicalName nvarchar(128),
PhysicalName nvarchar(260),
...
Bad results from RESTORE FILELISTONLY
The Size and MaxSize columns should be numerics, not chars. AND they should definately not contain embedded null characters as they currently do. This has caused me no end of debugging woes...
Vince
No. I have now the two backup jobs an hour apart (each jobs backs up multiple databases), and there are no errors being reported. / comments
No. I have now the two backup jobs an hour apart (each jobs backs up multiple databases), and there are no errors being reported.
As I said initially, both jobs start at exactly the same time. Since there are a few more databases in development (default instance) than QA, QA reaches the databases that fail first. So the error happens in the default instance which got to the databases while the backup on the named instance was in progress. / comments
As I said initially, both jobs start at exactly the same time. Since there are a few more databases in development (default instance) than QA, QA reaches the databases that fail first. So the err...