Comments
Sort by recent activity
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...
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...
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),
...
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...
Yes. Like I mentioned, most of the backups on both sides work fine. Further proof that these are copies of the same databases is that the size of the backup files differs on the named instance side vs. the default instance side. / comments
Yes. Like I mentioned, most of the backups on both sides work fine. Further proof that these are copies of the same databases is that the size of the backup files differs on the named instance si...