So what do you think? 5 Goodie bags available!

HJoyceHJoyce Posts: 186
edited June 26, 2009 11:08AM in SQB2MTF GUI utility
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!
Helen Joyce
SQL Backup Project Manager
Red Gate Software

Comments

  • 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.
  • 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!
  • 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)?
  • Hi Gary,

    You can use the MS-DOS FOR command to repeat command-line tasks that don't accept wildcards, for example:
    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 Gary,

    You can use the MS-DOS FOR command to repeat command-line tasks that don't accept wildcards, for example:
    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:
    CD e:\sqlbackup 
    E:\SQLBackup>for %i in (e:\sqlbackup\*.sqb) do "C:\program files\red gate\sql backup\sqb2mtf.exe" "%i" "%i.mtf"
    
  • 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)
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • 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
Sign In or Register to comment.