So what do you think? 5 Goodie bags available!

SQL Backup to MTF Converter - A user interface to the SQB2MTF.exe command line utility for converting SQL Backup files (*.sqb) into native SQL Server (uncompressed) backup files.

So what do you think? 5 Goodie bags available!

Postby HJoyce » Tue Apr 24, 2007 10:25 am

Is it is user-friendly?
Does it have all the features you require?
How much of an improvement is it to have a GUI rather than using the command line utility?

Post your feedback in order to qualify for a red gate goodie bag!
Last edited by HJoyce on Tue Jun 12, 2007 5:01 pm, edited 1 time in total.
HJoyce
 
Posts: 150
Joined: Mon Oct 10, 2005 9:48 am

utility feedback

Postby gillmh » Wed Jun 06, 2007 4:45 pm

Thank you for this utility - it is just what we were looking for in regards to our Disaster Recovery testing. I was investigating the command line utility which is not particularly intuitive for restoring to a new server without SQL Backup installed, when I came across the post for this GUI. I have downloaded this and it does exactly what we're looking for.
gillmh
 
Posts: 1
Joined: Wed Jun 06, 2007 4:15 pm

Postby RML51 » Wed Jun 13, 2007 3:48 pm

We occationally have to send a copy of our db backup files to our vendor for testing. They do not have a SQL Backup license, so this will be a great tool for them to use.

Thanks!
RML51
 
Posts: 16
Joined: Mon Oct 31, 2005 2:57 pm

Postby GaryHampson » Fri Sep 14, 2007 8:44 pm

I have a production database that has a transaction log backup every 10 minutes. We also have and installation of Lumigent's AuditDB which consumes MTF backups. I would like to use a command line script to run the conversion of all .sqb files in a specified directory instead of file by file (sqb2mtf C:\\Backups\\*.sqb C:\\Backups\\*.mft). Any ideas on how to make this work (apart from having to recursively call sqb2mtf for every file in C:\\Backups)?
GaryHampson
 
Posts: 14
Joined: Fri Jan 07, 2005 7:15 pm
Location: New York, NY

Postby Brian Donahue » Mon Sep 17, 2007 10:14 am

Hi Gary,

You can use the MS-DOS FOR command to repeat command-line tasks that don't accept wildcards, for example:
Code: Select all
CD e:\\sqlbackup
E:\\SQLBackup>for %i in (e:\\sqlbackup\\*.sqb) do "C:\\program files\\red gate\\sql backup\\sqb2mtf.exe" "e:\\sqlbackup\\%i" "e:\\sqlbackup\\%i.mtf"
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Re:

Postby GaryHampson » Tue Sep 18, 2007 1:32 am

Brian Donahue wrote:Hi Gary,

You can use the MS-DOS FOR command to repeat command-line tasks that don't accept wildcards, for example:
Code: Select all
CD e:\\sqlbackup
E:\\SQLBackup>for %i in (e:\\sqlbackup\\*.sqb) do "C:\\program files\\red gate\\sql backup\\sqb2mtf.exe" "e:\\sqlbackup\\%i" "e:\\sqlbackup\\%i.mtf"
Hi Brian,

Don't know why I didn't think of that earlier. Just had to make a slight tweak in order to make it work:

Code: Select all
CD e:\\sqlbackup
E:\\SQLBackup>for %i in (e:\\sqlbackup\\*.sqb) do "C:\\program files\\red gate\\sql backup\\sqb2mtf.exe" "%i" "%i.mtf"
GaryHampson
 
Posts: 14
Joined: Fri Jan 07, 2005 7:15 pm
Location: New York, NY

SQB2MTF GUI utility

Postby astreet » Thu Jun 25, 2009 10:18 pm

Any idea how to call this in vbscript?

Set Command = WScript.CreateObject("WScript.Shell")
cmd = "for %i in (e:\\sqlbackup\\*.sqb) do "C:\\program files\\red gate\\sql backup\\sqb2mtf.exe" "%i" "%i.mtf""
Command.Run (cmd)
astreet
 
Posts: 22
Joined: Wed Mar 28, 2007 3:36 pm

Postby Brian Donahue » Fri Jun 26, 2009 2:47 pm

Hi,

If I was doing this in VB, I would dispense with the FOR command, and use Scripting.FileSystemObject to create a folderobject and enumerate the collection of files, running the command on each file.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby astreet » Fri Jun 26, 2009 4:08 pm

Hi Brian,

I am new to vbscript and was able create code to move sqb files from one directory to another. The plan is then to convert files to *.MTF so we can use AuditDB. Can you look at this code and suggest how to call sqbmtf.exe.

code below.

===========================================
Option Explicit
Dim fileCount
Const fromDir = "G:\\EPDMS01\\BACKUP01\\Log"
Const toDir = "G:\\EPDMS01\\BACKUP01\\Misc"

fileCount = CopyFile(CreateObject("Scripting.FilesystemObject"), fromDir, toDir)

On Error Resume Next
WScript.StdOut.WriteLine "Copied " & fileCount & " files."
WScript.Quit fileCount

'oFSO (object) - FileSystemObject to use
'sStart (string) = Source directory
'sEnd (string) - Destination directory

Function CopyFile(oFSO, sStart, sEnd) 'As Integer
Dim d, f, i, ext
If Right(sEnd, 1) <> "\\" Then _
sEnd = sEnd & "\\"

If Not oFSO.FolderExists(sEnd) Then _
oFSO.CreateFolder sEnd

With oFSO.GetFolder(sStart)
For Each f In .Files
ext = oFSO.GetExtensionName(f)
If Len(ext) And InStr(1, "sqb", ext, 1) And _
ShouldCopy(oFSO, sEnd & f.Name, f.DateLastModified) Then
f.Copy sEnd
i = i + 1
End If
Next 'f

For Each d In .SubFolders
i = i + CopyFile(oFSO, d, sEnd & d.Name & "\\")

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "G:\\Program Files\\Red Gate\\sqb2mtf.exe G:\\EPDMS01\\BACKUP01\\Misc\\*.sqb G:\\EPDMS01\\BACKUP01\\Misc\\*.mtf"

Next 'd
End With
CopyFile = i
End Function

'oFSO (object) - FileSystemObject
'sFile (string) - File (w/ path)
'dCutoff (date) - Date to compare to file's date.

Function ShouldCopy(oFSO, sFile, dCutoff) 'As Boolean
With oFSO
If Not .FileExists(sFile) Then
ShouldCopy = True
Exit Function
End If

ShouldCopy = .GetFile(sFile).DateLastModified < dCutoff
End With
End Function
astreet
 
Posts: 22
Joined: Wed Mar 28, 2007 3:36 pm


Return to SQB2MTF GUI utility

Who is online

Users browsing this forum: No registered users and 1 guest