Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global temporary table not found

Status
Not open for further replies.

alwaysAnewbie

Programmer
Sep 12, 2002
23
US
I created a global temporary table in a database that I do not own but have create table permissions on. I can access the table from within the session I created the table but other sessions (for the same user) cannot see the table.

session 1 Logs in and executes create table:

CREATE MULTISET GLOBAL TEMPORARY TABLE dbname.tablename (
column1 CHAR(6) NOT NULL,
column2 CHAR(6),
etc...

Session 1 inserts data
Insert into dbname.tablename values ('VALUE1','VALUE2'......

1 record inserted

Session 2 logs in and executes :
Insert into dbname.tablename values ('VALUE1','VALUE2'......

Error Table/view/trigger/procedure 'dbname.tablename' does not exist.

Why can't session 2 find the table?
 
dezarnb
I have never used global temporary tables myself. But according to the documentation the characteristics of this type of table include the following:

Global temporary tables are private to the session which created them.

Their contents cannot be shared by other sessions.

Martin
 
If I am reading them right what the manuals actually say is that the data is private to the session. The whole point of a global temporary table is that only the structure of the table is stored in the data dictionary. Each session can use that structure with their own data. This allows multiple sessions to use an application that needs temporary table space without mixing data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top