Subject Re: [Firebird-Architect] Bulk loader.
Author Vlad Khorsun
>>> What happens when bulk insert brings database into inconsistent state?
>>> What means does admin have to repair the database (restore consistency)?
>>
>> Of course - admin\dbo\someone else must check constraints after such
>> process if its needed.
>
> within the context of the transaction in which load was performed or
> another one?

Another one of course

> Issue I'm thinking about is that when we commit transaction
> database becomes unrestorable (i.e. one has to restore it without
> constraints first, then repair the DB, then backup it and restore it
> again)...

Yes, this is specific of our backup\restore process. Note, i don't offer to not check
constraints. I just said it may improve performance if would be done at the second phase
of bulk load process (which i believe is one statement). I.e. after data load but before the
return from statement. Therefore possible temporary constraint violation is invisible for user.
And of course user triggers can be bypassed without any harm for physical database
consistency.

>>>> Permissions
>>>> Only members of the sysadmin and bulkadmin fixed server roles can execute BULK INSERT.
>>> Hmmm... personally I would go with GRANT BULK INSERT ON <...> TO <...> .
>>
>> This is the same as including user into bulkadmin server role (in MSSQL of course)
>
> Conceptually yes, but gives a flexibilty to give bulk insert on table a
> to user john and on table b to user mary.

You right here. If we need such level of flexibility ;)

Regards,
Vlad