August 11, 2004 at 1:29 pm
Hi to all:
I'm bulding an app to execute backups of sql databases for our helpdesk.
I added the possibility to check the backups mades, by executing the SQLVerify method of the restore object. I'm using Visual Basic .NET.
The problem is that I can't get the messages returned by the events. (I mean Percentage completed).
I declared the object withevents, and if I run then SQLRestore method instead of the SQLVerify (Just for testing) I can get the messages in the event. But using SQLVerify, it won't return anything.
It actually executes, because I can check with sp_who2 and DBCC INPUTBUFFER that the app is actually running a RESTORE VERIFYONLY.
Any help would be appreciate.
Thanks in advanced.
August 13, 2004 at 1:11 am
Hi,
I would suggest to use SQL-DMO as I always use that for all my SQL Administrative Apps.
Viraj Patel (askviraj@rediffmail.com)
August 13, 2004 at 7:26 am
From SQL BOL
The SQLVerify method does not perform a restore of any SQL Server database or transaction log.
To the best of my knowledge without building an app real quick, it will only throw an error on failure, otherwise nothing happens as far as return.
August 13, 2004 at 7:40 am
This is SQLDMO.
The SQLVerify method is part of the SQLDMO.Restore object.
Antares, I don't agree when saying that the verify doesn't return anything.
Even from QA, running a RESTORE VERIFYONLY with return the percentage completed and the final status. And from BOL, the PercentComplete Event refers to SQLBackup, SQLRestore and SQLVerify, so I think that it should return the same that the other methods.
April 3, 2006 at 1:47 am
Private Sub oVerifyEvent_Complete(ByVal Message As String)
PrintStat Message
End Sub
PrintStat Message
End Sub
ProgressBar1.Value = Percent
DoEvents
End Sub
gDatabaseName = CmBDatabaseName.Text
Set oVerify = New SQLDMO.Restore
Set oVerifyEvent = oVerify
oVerify.Action = SQLDMORestore_Database
oVerify.Database = gDatabaseName
gBkupRstrFileName = RestorePad & gDatabaseName & ".bak"
oVerify.Files = gBkupRstrFileName
oVerify.ReplaceDatabase = True
oVerify.PercentCompleteNotification = 5
oVerify.SQLVerify gSQLServer
May 9, 2006 at 11:03 am
I was wondering if you ever got this resolved. I am writing a small app in Visual foxpro 8.0 to use SqlVerify, but there is no response whatsoever.
Actually, this line :
llVerified = oRestoreEvent.SQLVerify(oSqlServer)
returns NULL.
Any ideas ?
thanks,
Bob
May 10, 2006 at 4:55 am
no, still waiting for someone with a solution...
May 10, 2006 at 4:56 am
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply