Subject | Re: script issue |
---|---|
Author | Nick Upson |
Post date | 2011-05-31T14:15:53Z |
solved:
the solution is to turn off autoddl "set autoddl off;" at the start of
each script
the solution is to turn off autoddl "set autoddl off;" at the start of
each script
On 31 May 2011 13:01, Nick Upson <nick.upson@...> wrote:
> I have a difference script, generated using dbworkbench, which works
> fine when applied via this product, when I attempt to apply it using
> isql it fails in many places.
> If I change PLACE1 to have a commit then it works, but I can't do that
> manually, the scripts are 1000's of lines.
>
> I figure the issue is a difference in the connection parameters but I
> can't see the db workbench ones and I've tried anything that might be
> useful in isql to no effect.
>
>
> typically:
>
> /* various ddl statements such as this one */
>
> CREATE TABLE TBLPOLLSUBPROGVER
> (
> VERID INTEGER NOT NULL,
> POLLSUBPROGID INTEGER NOT NULL,
> POLLPROGID INTEGER NOT NULL,
> POLLSUBPROGDESC VARCHAR( 30) NOT NULL COLLATE UTF8,
> TIMETYPE SMALLINT NOT NULL,
> TIMEPERIOD SMALLINT DEFAULT NULL,
> DST SMALLINT DEFAULT NULL,
> TIMEOFDAY SMALLINT DEFAULT NULL,
> STARTTIME SMALLINT DEFAULT NULL,
> ENDTIME SMALLINT DEFAULT NULL,
> DAYTYPE SMALLINT NOT NULL,
> DAYSOFWEEK SMALLINT DEFAULT NULL,
> DAYOFMONTH SMALLINT DEFAULT NULL,
> POLLDATE DATE DEFAULT NULL,
> PARAMETERSET INTEGER DEFAULT NULL,
> RXDATASIZE SMALLINT DEFAULT 0,
> RXBLOCKS SMALLINT DEFAULT 0,
> CONSTRAINT PK_TBLPOLLSUBPROGVER PRIMARY KEY (VERID, POLLSUBPROGID)
> );
>
> /* then these, PLACE1 */
>
> update rdb$relation_fields set rdb$null_flag = 1
> where rdb$relation_name = 'TBLACTIVEPOWER'
> and rdb$field_name = 'ELEMENTID';
> update rdb$relation_fields set rdb$null_flag = 1
> where rdb$relation_name = 'TBLACTIVEPOWER'
> and rdb$field_name = 'REPORTTYPE';
> update rdb$relation_fields set rdb$null_flag = 1
> where rdb$relation_name = 'TBLACTIVEPOWER'
> and rdb$field_name = 'SAMPLETIME';
> update rdb$relation_fields set rdb$null_flag = 1
> where rdb$relation_name = 'TBLACTIVEPOWER'
> and rdb$field_name = 'MONITORNUM';
>
> /* this is the error I get */
>
> Statement failed, SQLCODE = -913
> deadlock
>