Subject | Re: [firebird-support] Stored procedure on database start |
---|---|
Author | Doru Constantin |
Post date | 2005-12-08T10:14:18Z |
> At 12:40 AM 8/12/2005 +0000, you wrote:The (adapated) question is:
> >Is there a way to auto execute a stored procedure when the database
> >starts up ? I'd like to increment a generator when the database restarts.
>
> Do you know what you mean by "database restarts"?
>
> On Superserver, the database comes online when the first connection
> request
> succeeds. It won't be offline again until every connection has detached.
>
> On Classic, there no such thing as a "server running", with or without
> connections. Each connection has its own instance of the server
> connected
> to one or more databases.
>
> Furthermore, executing a stored procedure (like any other SQL statement)
> occurs as the result of a client request.
>
> ./heLen
Is there any way to have a "trigger" on datatabase level as reaction to
the user action.
Something like
CREATE TRIGGER name [GLOBAL]
[ACTIVE | INACTIVE]
{BEFORE | AFTER} <multiple_action>
[POSITION number]
AS trigger_body
<multiple_action> ::= <single_action> [OR <single_action> [OR
<single_action>]]
<single_action> ::= {CONNECT | DISCONNECT}
CONNECTING | DISCONNECTING
to determines type of operation being executed.
/ Doru
[Non-text portions of this message have been removed]