Re: dostats with ANSI logged database?
Posted in 2004
On Fri, 10 Sep 2004 13:56:14 -0400, Roy Mercer wrote: > Art, > > I did not change anything from your source. I just compiled it straight > from the IIUG. I run this as "informix" but the tables are all owned by > sysadm. The first table it stops on "psdbowner" has an owner of "PS". Odd, perhaps because I was testing as a user other than informix, I did not get to the -400 message until I had corrected the missing owner name issues. That's why I had thought you might have made those fixes in your own copy. The -400 was caused because I had missed making some of the cursors WITH HOLD. In a mode ANSI database, since a transaction is begun by the first statement executed in a session, I did not want the entire dostats session to be treated as a single transaction, so I COMMIT after every UPDATE STATISTICS if the DB type is ANSI. When I made that change long ago I missed making some of the cursors WITH HOLD so they would survive the commits. Art S. Kagel > I tried on just one table that is owned by "sysadm", see below. > > dostats9_64 -h hrprodsoc -d hrprod -t ps_a_eeo_jobcodes -f hrprod.sql > Writing commands to: hrprod.sql > Working on database: hrprod. > ps_a_eeo_jobcodes: > jobcode: > Cannot FETCH table data. SQLCODE = -400, ISAM = 0 > > Thanks for your help. > > Roy > > > Jonathan Leffler <jleffler@earthlink.net> wrote in message > news:<zx90d.11864$w%6.3986@newsread1.news.pas.earthlink.net>... >> Art S. Kagel wrote: >> > On Thu, 09 Sep 2004 11:47:39 -0400, Roy Mercer wrote: Roy, I'm looking at >> > this. Looks like I have to prepend the owner name to all tablename >> > references in the code and the generated SQL to properly handle ANSI >> > databases. >> >> You do indeed. Just as you have to prepend 'informix' to the system >> catalog tables, you have to prepend the table owner to all other tables. >> >> >> >>I am able to use dostats with any database as long as it is not ANSI >> >>logged. >> [...] >> >>Working on database: dbname. >> >>psdbowner: >> >>Cannot FETCH table data. SQLCODE = -400, ISAM = 0.