Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 'temp' oracle tables
In article <01bc4c0d$fca3a480$c93b01cf_at_rob-pc>, rothkopf_at_wnyonline.com
says...
> Frances,
>
> Thanks for the info. Using the approach you're suggesting, how would one
> go about "cleaning up" these temporary tables. Particularly, if the client
> connection gets dropped (e.g. line goes down, workstation hangs, etc),
> wouldn't these "temp" tables stay out there?
>
> Thanks!
>
> --Rob Rothkopf
>
> Frances Edelstein <rbs_at_nyic.com> wrote in article
> <MPLANET.3353abb6rbs9896ac_at_snews.zippo.com>...
> > You can use the dbms_sql package to create "temp" tables. However, after
> > you create one and use it, you must explicitely drop it. You also need
> > to understand how this works when your code is in a stored procedure vs.
> > a standalone procedure. If the owner of the stored procedure has the
> > create any table priviledge, the procedure can create the table in other
> > userid's space by concatenating the name of the user running the package
> > to the name of the temp table. That user then doesn't need create table
> > procedure.
>
>
Yes, they would stay there. You could try dropping the table before
creating it again. If this 'temp' table is used often, you could
consider truncating it instead of creating it if it already exists in the
id. If you drop a table that's used every day, you could run into space
allocation problems when creating it. DBA's - any thoughts on this as a
space management problem?
-- Frances Edelstein Author of "Learning Oracle Database Programming: a Tutorial for Application Developers" Relational Business Systems Books for Oracle Developers www.rbsbooks.comReceived on Fri Apr 18 1997 - 00:00:00 CDT