Subject Re: [Firebird-Architect] Create database -> rats' nest
Author Dmitry Yemanov
"Nando Dessena" <nando@...> wrote:
>
> What about multi-database SQL queries?

They're a subject of the 2PC transaction control, I suppose. And they should
use the database links (data providers) defined in the database. So this
isn't a good example, IMO.

> What about "create user" when
> using the scheme based on a central user database (as opposed to
> a user table embedded in the current database)?

Agreed here. You may add GRANT CREATE / ATTACH / BACKUP privileges here.

> BTW, you *can* create
> an external file through a create table statement.

IIRC, you cannot. The physical file must exist at the moment of CREATE
TABLE. But even if I'm right then I consider this a bug rather than a
feature.

In short words, I'm with you and Vlad. Server-wide SQL is handy for some
tasks. But it requires site login and connection context. I.e. it doesn't
make sense to use the current API which is database-bound. Perhaps a new
isc_service_execute_sql() call would do the trick - it would use the already
established (via isc_service_attach) services connection and parse the given
SQL to create the appropriate SPB buffers and execute the necessary service
internally. Just a nice SQL wrapper for the services API. Comments?


Dmitry