Red Gate forums :: View topic - So what do you think? 5 Goodie bags available!
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation

SQB2MTF GUI utility forum

So what do you think? 5 Goodie bags available!

Search in SQB2MTF GUI utility forum
Post new topic   Reply to topic
Jump to:  
Author Message
HJoyce



Joined: 10 Oct 2005
Posts: 183

PostPosted: Tue Apr 24, 2007 10:25 am    Post subject: So what do you think? 5 Goodie bags available! Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
gillmh



Joined: 06 Jun 2007
Posts: 1

PostPosted: Wed Jun 06, 2007 4:45 pm    Post subject: utility feedback Reply with quote

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.
Back to top
View user's profile Send private message
RML51



Joined: 31 Oct 2005
Posts: 16

PostPosted: Wed Jun 13, 2007 3:48 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
GaryHampson



Joined: 07 Jan 2005
Posts: 14
Location: New York, NY

PostPosted: Fri Sep 14, 2007 8:44 pm    Post subject: Reply with quote

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)?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6667

PostPosted: Mon Sep 17, 2007 10:14 am    Post subject: Reply with quote

Hi Gary,

You can use the MS-DOS FOR command to repeat command-line tasks that don't accept wildcards, for example:
Code:
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"
Back to top
View user's profile Send private message
GaryHampson



Joined: 07 Jan 2005
Posts: 14
Location: New York, NY

PostPosted: Tue Sep 18, 2007 1:32 am    Post subject: Re: Reply with quote

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:
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:
CD e:\sqlbackup
E:\SQLBackup>for %i in (e:\sqlbackup\*.sqb) do "C:\program files\red gate\sql backup\sqb2mtf.exe" "%i" "%i.mtf"
Back to top
View user's profile Send private message
astreet



Joined: 28 Mar 2007
Posts: 22

PostPosted: Thu Jun 25, 2009 10:18 pm    Post subject: SQB2MTF GUI utility Reply with quote

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)
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6667

PostPosted: Fri Jun 26, 2009 2:47 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
astreet



Joined: 28 Mar 2007
Posts: 22

PostPosted: Fri Jun 26, 2009 4:08 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group