?
Solved

How to know GBak completed successfully

Posted on 2003-03-23
9
Medium Priority
?
564 Views
Last Modified: 2010-04-04
My program will calling the GBak.exe to Restore a Gbk database, is there anywhere to know that the Restore process was completed successfuly ??

I need to restore a huge database, and it may take a few hours to complete the process, anuwhere to know whether the Gbak.exe is hang(stop responding) or still in the process ??


Thks.

Regards,
Raymond.
0
Comment
Question by:nclong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
9 Comments
 

Accepted Solution

by:
BLayman earned 252 total points
ID: 8193230
What version of IB just out of curiosity?

There's no good way to check against GBak itself since it spends most of its time waiting on IB_Server.

And hung is the same as REALLLY REEAALLLY REALLLY slow.  

I've used several manual methods that can be automated.  First I check the CPU usage.  However sometimes it is down incredibly low and it is still working.  So I primarily rely on the size of the GDB file.  If it has grown in the space of an hour, I let it go.  If not, I consider it hung.  

Programatically, you can check the file to the byte level every 15 minutes.  If it hasn't grown, the program is hung.

Inelegant, I know.
0
 
LVL 12

Assisted Solution

by:esoftbg
esoftbg earned 248 total points
ID: 8228259
If you use InterBase 6.0 or later it is possible to use component TIBBackupService (TIBRestoreService) to build Backup (Restore) process in your application /not to call it as external process/.
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 8292985
When you build your Restore (Backup) process into your application using the construction:

function  RestoreDB: Boolean;
var
  B:      Boolean;
begin
  B := True;
  try
    try
      // Here is code for Restoring DataBase...
    except
      B := False;
    end;
  finally
    Result := B;
  end;
end;

This function will return True when the process completes successful or will return False if it fails at runtime.

Emil
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:CleanupPing
ID: 9316631
nclong:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 

Expert Comment

by:BLayman
ID: 10650906
Not to be a point hog but esoftbg's answer does not address the question at all since the question is "when gbak has not yet returned control to the main program how do I tell if it is still really doing something?"  and esoftbg's suggestion assumes that it has returned control  to the main program.  
GBak is unfortunately a seperate SLOWWW running process.  In addition, it would not raise an exception upon failure as it would be an external execution.   So, as I said, it does not address the main question at all...
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10662130
My comments give good way to watch closely backup / restore process of a InterBase / FireBird database using TIBBackupService (TIBRestoreService) components in DELPHI application /not to call it as external process/.
I know that the question is about an external process, but I try to help suggesting POSSIBLE INTERNAL WAY TO ACHIEVE DESIRED EFFECT. I have realised that ibn my applications and it works fine ....
0
 

Expert Comment

by:BLayman
ID: 10663180
I'm sorry, I didn't notice your 3/28/03 comment mentioning TIBBackupService.  I should have reread this thread more closely.  I thought your only post was a try/except example which, on its own, is too generic to be of any assistance.  Since the questioner did not state their IB version, your suggestion is quite possbily appropriate.

I withdraw my earlier statement.  Please, split the points.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question