Subject Re: [firebird-support] Firebird sysdba account
Author Stevio
(I'm using Delphi 5 Professional with Interbase Express 5.)

I have made a new version of my database that is no longer owned by sysdba
but by my new user which has all the necessary rights over it. I just need a
little more help now in getting things working with my client application.

I have created a batch file that contains something like this:
@echo off
set /p myusername=Specify new password:
c:\Progra~1\Firebird\Firebird_1_5\bin\gsec -user SYSDBA -password
masterkey -add MYUSER -pw %myusername%

When the user runs my client application for the first time, the client
application will not be able to connect because the firebird user account
"MYUSER" has not been created yet. The client application will therefore run
the batch file.

When this happens, the command line prompt will come up asking the user to
"Specify new password: "

Once they do that, the user will be created.

Here are my issues -
1) It would be much nicer to ask the user to enter a new password using a
Delphi form, rather than the command line prompt. How can I feed the
password they specify into the batch file?

Here is how I currently run the batch file from Delphi:
ShellExecute(Handle, 'open', 'MYBATCHFILE.BAT', nil, nil, SW_SHOWNORMAL);

2) If Firebird is not installed in the location I specify in my batch file,
then my batch file will not work. How can I call gsec if I do not know where
the user has installed it?

3) It would be better not to have to use a batch file / command line at all.
Are there components that allow you to manage Firebird users and do they
work with Delphi 5 Professional?

Really appreciate your help.
Thanks,
Stephen


----- Original Message -----
From: "Stevio" <redeagle@...>
Sent: Wednesday, August 20, 2008 12:34 AM

>>>Even though my new user is the owner, I don't have sufficient rights to
>>>access the tables. How can I grant these rights to my new user?
>>
>> You *could* log in as sysdba and grant all of the necessary privileges to
>> that user, including WITH GRANT OPTION if necessary. But it's not ideal.
>> As I and several others have already explained, recreate and pump is the
>> proper solution.
>
> I did recreate the database however with the new user, using gbak. Is that
> not sufficient? If not, can you suggest a tool to recreate and pump the
> database? There are only 4 actual records in the database initially.
>
>>>3) How do you get the end-user to create the Firebird username/password
>>>required to access the database?
>>
>> By providing a utility program and the initial sysdba password.