Subject | Re: [firebird-support] Is it possible to do a backup with a regular user? |
---|---|
Author | Euler Jr. |
Post date | 2005-07-15T20:29:02Z |
Hi,
Only sysdba can run gbak.
Create a table containing one column and one record for write sysdba
password encrypted. When your application run gbak with parameters, you
decrypt this value.
Exemple:
// save the password in Firebird SQL using Delphi
// this in another application
SQLConnection.ExecuteDirect(Format('INSERT INTO TABLE
VALUES(''%s'')',[Crypt('sysdba')]));
// in your gbak application
you pass the parameter:
DataSet.Add('SELECT PASSWORD FROM TABLE');
DataSet.Open;
gbak username SYSDBA password
Decrypt(DataSet.FieldByName('PASSWORD').AsString)
[]s
Euler Jr.
fabiano_bonin escreveu:
Only sysdba can run gbak.
Create a table containing one column and one record for write sysdba
password encrypted. When your application run gbak with parameters, you
decrypt this value.
Exemple:
// save the password in Firebird SQL using Delphi
// this in another application
SQLConnection.ExecuteDirect(Format('INSERT INTO TABLE
VALUES(''%s'')',[Crypt('sysdba')]));
// in your gbak application
you pass the parameter:
DataSet.Add('SELECT PASSWORD FROM TABLE');
DataSet.Open;
gbak username SYSDBA password
Decrypt(DataSet.FieldByName('PASSWORD').AsString)
[]s
Euler Jr.
fabiano_bonin escreveu:
> I have a form on my application that allows the user to do the backup
> of a database. This form calls 'gbak' to do this task, but i see i
> need to be SYSDBA or the owner of the database to be able to run it.
>
> But i don't want to give the sysdba password to the user, and i can't
> hide it in my application, because each customer database have it's
> own sysdba password.
>
> Is there a way to do the backup with a regular user?
>
> Thanks.
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> * Visit your group "firebird-support
> <http://groups.yahoo.com/group/firebird-support>" on the web.
>
> * To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
> <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>