Solved

Unable to programmatically restore Firebird d/b

Posted on 2011-03-05
7
1,068 Views
Last Modified: 2013-12-09
I have the code below... it does NOT work!  However, if I take the same string and put it in a command prompt, works like a champ... the "firebirdinstallationpath" is correct (I verified it).

Why won't this work?
string debugString = " -REP -user sysdba -pass masterkey \"" + backupFilename + "\" " + dbPath;
            Process.Start(firebirdInstallationPath + "gbak.exe", debugString);

Open in new window

0
Comment
Question by:rmmarsh
  • 4
  • 2
7 Comments
 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
ID: 35044760
you should never use "replace", always restore to a different location and move the resulting file if it restores ok, it is perfectly possible to take a backup that cannot restore, using replace you have lost your good database as well then.

that said, check file permissions, gbak at the operatin gsystem level is run by the user but the database is run by the firebird user
0
 

Author Comment

by:rmmarsh
ID: 35044766
Hi Nick... glad to hear from you... I'll give it a try and get back to you...

0
 
LVL 16

Expert Comment

by:sjklein42
ID: 35044769
Just in case, get rid of the leading blank character in debug string.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:rmmarsh
ID: 35044794
That worked like a champ!  I don't understand why, tho'... can you enlighten me?
0
 
LVL 16

Expert Comment

by:sjklein42
ID: 35044860
Hi.  Which one worked like a champ?
0
 

Author Comment

by:rmmarsh
ID: 35044864
Nicks...
0
 

Author Closing Comment

by:rmmarsh
ID: 35044869
Thanks again...
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

809 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