Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Cannot drop temp table in rootdbs

 
   Database Help (Home) -> Informix RSS
Next:  Webhosting, Domain Name, Data Center Cyprus, Host..  
Author Message
red_valsen

External


Since: Jan 11, 2011
Posts: 5



(Msg. 1) Posted: Mon Aug 22, 2011 1:32 pm
Post subject: Cannot drop temp table in rootdbs
Archived from groups: comp>databases>informix (more info?)

I noticed in an onstat -d output that our rootdbs, which is usually
empty, had jumped to 96% full. Using AGS's Server Studio, I could see
a temp table called username._temptable in rootdbs. I could also find
the temp table using this query:

select TRIM(dbsname)||":"||TRIM(owner)||"."||TRIM(tabname) ,
sysmaster:partdbsnum(T.partnum) dbspace_number,
dbinfo('dbspace',T.partnum)
dbspace_name
from
sysmaster:sysptnhdr P, sysmaster:systabnames T
where
P.partnum = T. partnum
AND
( sysmaster:bitval(flags,64)>0 OR
sysmaster:bitval(flags, 32) > 0 OR
sysmaster:bitval(flags, 128) > 0 OR
sysmaster:bitval(flags, 16384) > 0) ;

(expression) db_tst:username._temptable
dbspace_number 1
dbspace_name rootdbs

However, the table has resisted my attempts to drop it -- DBMS
continually tells me the table doesn't exist. I've quoted, escaped,
prepended, fully qualified and otherwise used every way I could think
of to reference the table. All to no avail (fie on thee, username!).

I can cross my fingers and bounce the instance, but would rather find
a reliable way to deal with problem immediately since I suspect it
will recur.

Any suggestions from the Informix intelligencia?

Using IDS 10.00.FC8 on RHEL5.4 kernel 2.6.18.

 >> Stay informed about: Cannot drop temp table in rootdbs 
Back to top
Login to vote
jrenaut

External


Since: Aug 22, 2011
Posts: 1



(Msg. 2) Posted: Mon Aug 22, 2011 2:04 pm
Post subject: Re: Cannot drop temp table in rootdbs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 22, 3:32 pm, red_valsen wrote:
> I noticed in an onstat -d output that our rootdbs, which is usually
> empty, had jumped to 96% full.  Using AGS's Server Studio, I could see
> a temp table called username._temptable in rootdbs.  I could also find
> the temp table using this query:
>
> select TRIM(dbsname)||":"||TRIM(owner)||"."||TRIM(tabname) ,
> sysmaster:partdbsnum(T.partnum) dbspace_number,
> dbinfo('dbspace',T.partnum)
> dbspace_name
> from
> sysmaster:sysptnhdr P, sysmaster:systabnames T
> where
> P.partnum = T. partnum
> AND
> ( sysmaster:bitval(flags,64)>0 OR
> sysmaster:bitval(flags, 32) > 0 OR
> sysmaster:bitval(flags, 128) > 0 OR
> sysmaster:bitval(flags, 16384) > 0) ;
>
> (expression)    db_tst:username._temptable
> dbspace_number  1
> dbspace_name    rootdbs
>
> However, the table has resisted my attempts to drop it -- DBMS
> continually tells me the table doesn't exist.  I've quoted, escaped,
> prepended, fully qualified and otherwise used every way I could think
> of to reference the table.  All to no avail  (fie on thee, username!)..
>
> I can cross my fingers and bounce the instance, but would rather find
> a reliable way to deal with problem immediately since I suspect it
> will recur.
>
> Any suggestions from the Informix intelligencia?
>
> Using IDS 10.00.FC8 on RHEL5.4 kernel 2.6.18.

User created temp tables can only be dropped by the session that
created them. Worse case is that somehow the session that created the
temp table has already exited and left the table behind. In this
case, the only way to reclaim the space would be to bounce the
server. However, if the session is still connected you could try
disconnecting it from the server and I believe it should drop any temp
tables it has open as part of the session clean up.

As for figuring out which session owns the temp table, I know in later
versions the onstat -g ses <session id> output listed the partnumbers
for all that sessions temp tables, but I don't recall if that is the
case in 10.x.

Also, you might be able to find the part number of the temp table in
onstat -g opn output which I believe shows the part numbers for all
tables that each thread has open, and then you just need to map the
thread id to a session.

Jacques Renaut
IBM Informix Advanced Support
APD Team

 >> Stay informed about: Cannot drop temp table in rootdbs 
Back to top
Login to vote
Keith Simmons

External


Since: Aug 22, 2011
Posts: 1



(Msg. 3) Posted: Mon Aug 22, 2011 5:25 pm
Post subject: Re: Cannot drop temp table in rootdbs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 22 August 2011 21:32, red_valsen wrote:
> I noticed in an onstat -d output that our rootdbs, which is usually
> empty, had jumped to 96% full.  Using AGS's Server Studio, I could see
> a temp table called username._temptable in rootdbs.  I could also find
> the temp table using this query:
>
> select TRIM(dbsname)||":"||TRIM(owner)||"."||TRIM(tabname) ,
> sysmaster:partdbsnum(T.partnum) dbspace_number,
> dbinfo('dbspace',T.partnum)
> dbspace_name
> from
> sysmaster:sysptnhdr P, sysmaster:systabnames T
> where
> P.partnum = T. partnum
> AND
> ( sysmaster:bitval(flags,64)>0 OR
> sysmaster:bitval(flags, 32) > 0 OR
> sysmaster:bitval(flags, 128) > 0 OR
> sysmaster:bitval(flags, 16384) > 0) ;
>
> (expression)    db_tst:username._temptable
> dbspace_number  1
> dbspace_name    rootdbs
>
> However, the table has resisted my attempts to drop it -- DBMS
> continually tells me the table doesn't exist.  I've quoted, escaped,
> prepended, fully qualified and otherwise used every way I could think
> of to reference the table.  All to no avail  (fie on thee, username!)..
>
> I can cross my fingers and bounce the instance, but would rather find
> a reliable way to deal with problem immediately since I suspect it
> will recur.
>
> Any suggestions from the Informix intelligencia?
>
> Using IDS 10.00.FC8 on RHEL5.4 kernel 2.6.18.
> _______________________________________________
> Informix-list mailing list
> Informix-list.TakeThisOut@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>

Red

This temp table is probably generated by the system in response to
a large sort/merge query, find the query, stop it and the table will disappear.
Bouncing the instance will also clear the table.
To prevent this happening in future ensure you have at least one
temp temporary and one logged temporary dbspace configured to hold
these (and other similar) temp tables. Sizes will depend on the queries
being run but should be at least twice the size of the largest data set
being returned that requires sorting.

Keith
 >> Stay informed about: Cannot drop temp table in rootdbs 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How to drop a temp table using "if exists" logic ? - Hi Is there a way to drop a temp table in Informix using some kind of "if exists" logic ? In oter words I need to test for the existence of the temp table before issuing "drop table" command. Thanks a lot. Murty

size of rootdbs - Hi all, What should be the size of rootdbs .I mean the optimum size. How does the size of rootdbs affect the IDS performance? It is takijng a lot of time to initialize ..Is it normal(as per my configuration) ? Find below the my onconfig file ..which i...

Informix 11 / rootdbs filling up continuously - I run IBM Informix Dynamic Server Version 11.10.UB4TL on Solaris SPARC 10 supporting the public beta program. I recognized that the rootdbs got filled up a few days ago. I removed a logical log to free 256M of space, but now the rootdbs is filled..

Scratch Table Vs Temp Table - Hi, >From the Informix documentation, I found that both scratch table and temp table looks almost similar. But if it's similar, there's no reason to have both. So, can someone please enlighten me on the differences between scratch and temp table. ....

Logical log for Temp table - From informix manual, I found that any logical database operation will be logged in logical log. However, will any logical operation on temporary table be logged too in logical log. I ask this question as it is non sense to log logical operation for temp...
   Database Help (Home) -> Informix All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]