Только я работаю с разрабатываемой БД
Добавляю новые поля к одной из главных таблиц, используя IBExpert
Код: Выделить всё
ALTER TABLE SKLAD_NUMBERS
add PRESENCE SMALLINT default 0;
add MIN_ZAP SMALLINT default 0;
add ZAKAZANO SMALLINT default 0;
add OTLOJENO SMALLINT default 0;
add AVG_ZAK_PRICE TPRICE default 0;
add MIN_INDIV_NACENKA TPRICE default 0;
add MAX_INDIV_NACENKA TPRICE default 0;
/* TPRICE = DOUBLE PRECISION */
Просматриваю содержимое таблицы, вижу что во всех новых полях значения NULL и пишу обновляющий запрос
Код: Выделить всё
update TABLE SKLAD_NUMBERS set
PRESENCE=0,
MIN_ZAP=0,
ZAKAZANO=0,
OTLOJENO=0,
AVG_ZAK_PRICE=0,
MIN_INDIV_NACENKA=0,
MAX_INDIV_NACENKA=0;
Через 3 мин ко мне прибегают с воплями "склад не работает" и уже успели передернуть свич.
Прихожу, FB уже работает, смотрю в логи винды:
------------------------------
log: Event Viewer -> Application
4:34:45 PM Source FirebirdGuardianDefaultIn
The description for Event ID ( 281 ) in Source ( FirebirdGuardianDefaultInstance )
cannot be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote computer.
You may be able to use the /AUXSOURCE= flag to retrieve this description;
see Help and Support for details. The following information is part of the event:
Abnormal Termination: C:\Program Files\Firebird\Firebird_1_5\bin\fbserver.exe:
terminated abnormally (4294967295) and supply theD.
4:34:46 PM Source FirebirdGuardianDefaultIn
The description for Event ID ( 251 ) in Source ( FirebirdGuardianDefaultInstance )
cannot be found. The local computer may not have the necessary registry information
or message DLL files to display messages from a remote computer.
You may be able to use the /AUXSOURCE= flag to retrieve this description;
see Help and Support for details. The following information is part of the event:
Server Started: Guardian starting: C:\Program Files\Firebird\Firebird_1_5\bin\fbserver.exefile.
#
# There are three types of c(.
log: Event Viewer. -> System
4:34:46 PM Source Service Control Manager
The Firebird Server - DefaultInstance service terminated unexpectedly.
It has done this 1 time(s).
4:34:46 PM Source Service Control Manager
The Firebird Server - DefaultInstance service entered the running state.
4:34:46 PM Source Service Control Manager
The Firebird Server - DefaultInstance service was successfully sent a start control.
4:37:33 PM Source Tcpip
The system detected that network adapter \DEVICE\TCPIP_{EDF3E15E-D67B-4C5A-B442-6D1C7C9BEBD2}
was connected to the network, and has initiated normal operation over the network adapter.
это перегрузили свич
------------------------------------------
firebird.log
P4 (Server) Wed Feb 09 16:34:44 2005
The user defined function: UDF_CLEARSKLADCOD
referencing entrypoint: clearskladcod
in module: my_udf
caused the fatal exception: An exception occurred that does
not have a description. Exception number EEDFADE.
This exception will cause the Firebird server
to terminate abnormally.
P4 (Server) Wed Feb 09 16:34:44 2005
An exception occurred that does
not have a description. Exception number EEDFADE.
This exception will cause the Firebird server
to terminate abnormally.
P4 (Server) Wed Feb 09 16:34:44 2005
An exception occurred that does
not have a description. Exception number EEDFADE.
This exception will cause the Firebird server
to terminate abnormally.
P4 (Client) Wed Feb 09 16:34:45 2005
C:\Program Files\Firebird\Firebird_1_5\bin\fbserver.exe: terminated abnormally (4294967295)
P4 (Client) Wed Feb 09 16:34:46 2005
Guardian starting: C:\Program Files\Firebird\Firebird_1_5\bin\fbserver.exe
-----------------------------
Теперь самому стало ясно. Глюкнула моя UDF
и тригер не точно написал
Код: Выделить всё
CREATE TRIGGER SKLAD_NUMBERS_BU FOR SKLAD_NUMBERS
ACTIVE BEFORE UPDATE POSITION 0
AS
begin
NEW.clear_cod = udf_clearskladcod(SKLAD_NUMBERS.dirty_cod);
а надо бы сначала проверку на изменения поля сделать, чтобы не всегда вызывалась
if (new.dirty_cod<>old.dirty_cod) then ...
end
Вопрос пока писал, сам по логам нашол ответ.
Тогда другой вопрос:
А если бы я использовал архитектуру Классик, сам FB бы не умер?