Subject Re: [ib-support] isql metadata extraction and script execution
Author Claudio Valderrama C.
""iananewby"" <ian@...> wrote in message
> Hi All,
> I am currently exreacting meta data for inclusion into CVS. I have
> noticed that the meta data extraction in isql (windows, Firebird RC2
> dialect 1 database) puts a SET AUTODDL OFF before stored procedures
> are created and a SET AUTODDL ON after stored procedures are
> modified.

This is the way it's created, supposedly to be able to rollback manually a
procedure creation that failed.

> If I run this script to create a new database the server crashes
> on the SET AUTODDL ON line.

Would you bet your head that the problem is at that line?
SET AUTODDL only toggles a variable inside isql, it can't crash the engine.
Its effects can do that, later.

> Should there be another pair of OFF/ONs
> and a commit between the CREATE PROCEDURE and the ALTERPROCEDURE?

Not that I'm aware. You probably hit a special case of dependencies that
causes havoc. Can you isolate it to a small case?

> If I remove all the SET AUTODDL ... commands the database restores
> correctly.

As soon a DDL command is issued, isql sends a commit. Also, it keeps data
and metadata transactions separate.

> Another gripe, is there any way of sending both the output and the
> errors from isql into the same file so It is possible to find which
> lines cause the problems?

-m will merge stdout and stderr
If you use the isql from my site, it will show script-related line numbers
for errors in a batch job.

Claudio Valderrama C. - -
Independent developer
Owner of the Interbase® WebRing