Re: syntax error when running dbschema
Answered: amber (solid confidence) — dbschema fails partway through with a syntax error and the poster wants to isolate the offending table without checking 200 tables by hand; Steve Williamson's iterative 'update statistics' workaround (SE 4.*) gives a practical way to surface the bad table one at a time, though it is never confirmed by the original asker, who does not reappear in the thread.
Advisory only.
Posted in 1998
Topics: General Discussion
> I am using Informix-SQL 5.1.UD2. When I run the dbschema utility
> ("dbschema -t all -d mydatabase /tmp/dbschema.txt") the program ends
> with the error message "A syntax error has occurred." It writes the
> dbschema for roughly one third of the tables in the database. I would
> run dbschema on each table to find which is producing the error but
> there are more than two hundred. Unfortunately, dbschema does not
> output the table information alphabetically or I would simply scratch
> table names off a list until I got to the bad apple.
Don't know what your problem is, but I think it outputs the tables in
order of tabid.
June
--
june_t@hotmail.com
Grounded in Palo Alto, living on chocolate chip cookies
It may not be neat but it works in Informix SE 4.*. Load isql and:
update statistics
Wait for SQL to report the (first) missing table. Repeat until done.
In article <36707AF1.FCCD0EDD@hotmail.com>, June Tong
<june_t@hotmail.com> writes
>> I am using Informix-SQL 5.1.UD2. When I run the dbschema utility
>> ("dbschema -t all -d mydatabase /tmp/dbschema.txt") the program ends
>> with the error message "A syntax error has occurred." It writes the
>> dbschema for roughly one third of the tables in the database. I would
>> run dbschema on each table to find which is producing the error but
>> there are more than two hundred. Unfortunately, dbschema does not
>> output the table information alphabetically or I would simply scratch
>> table names off a list until I got to the bad apple.
>
--
Steve Williamson
I have not written it, but it seems you could write a select against
systables then
put it trough a foreach cursor and then write a text file which would be a db
schema in the order you want.
Just a thought
Steve Williamson wrote:
> It may not be neat but it works in Informix SE 4.*. Load isql and:
>
> update statistics>
> Wait for SQL to report the (first) missing table. Repeat until done.
>
> In article <36707AF1.FCCD0EDD@hotmail.com>, June Tong
> <june_t@hotmail.com> writes
> >> I am using Informix-SQL 5.1.UD2. When I run the dbschema utility
> >> ("dbschema -t all -d mydatabase /tmp/dbschema.txt") the program ends
> >> with the error message "A syntax error has occurred." It writes the
> >> dbschema for roughly one third of the tables in the database. I would
> >> run dbschema on each table to find which is producing the error but
> >> there are more than two hundred. Unfortunately, dbschema does not
> >> output the table information alphabetically or I would simply scratch
> >> table names off a list until I got to the bad apple.
> >
>
> --
> Steve Williamson
Bill Marshall wrote: > > I have not written it, but it seems you could write a select against > systables then > put it trough a foreach cursor and then write a text file which would be a db > schema in the order you want. > > Just a thought There is a 4gl example program in the documemtation that does just that. Not that I can remember the name or anything. Jon Strayer