Subject Re: [firebird-support] Firebird sysdba account
Author Helen Borrie
At 09:34 20/08/2008, you wrote:
>>>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?

No, it's not sufficient. Gbak restores what was backed up - including the security records that store the ownership properties of the objects. Restoring a backup makes the restorer the owner of the database but it doesn't change who owns the objects.

>If not, can you suggest a tool to recreate and pump the
>database?

There are various data-pumping tools around - look them up in the Contributed Downloads area of the IBPhoenix website. Myself I use the TIB_Datapump and TIB_Import components of IB Objects for my own datapumping routines and most often, IB_SQL's implementations of these components for one-off jobs.

>There are only 4 actual records in the database initially.

Records live in tables. Tables have owners - as indeed do all database objects.


>>>2) Do you connect to the database using sysdba / masterkey, or do you
>>>connect using a new owner user you created?
>>
>> I deploy a security.fdb with the needed user(s) for getting started.
>
>But won't that overwrite their existing security.fdb, if they already have
>Firebird installed, or are you talking about situations where they
>definitely do not have it installed?

Yes it will, if Firebird isn't running. If Firebird is running, of course the security database file is open read-only with exclusive write.

>If they do not have it installed, can I
>just copy my security.fdb file (with users set as I want them) and get the
>user to copy it into the appropriate folder after they install Firebird?

It won't work if Firebird is running.


>>>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.
>
>What does the utility program do? If you supply the security.fdb file, then
>the user does not need to create the Firebird username/password required,
>correct?

Correct.

>Out of interest, off topic slightly, but what software development tool do
>you use (and are others using)? I am using Delphi. Just curious.

I use Delphi mostly, with IBObjects as the data access interface. For the Services API, I use IBOAdmin and hold my mouth right. ;-)

./heLen