Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> After logon trigger
Hi
I am trying to use an after logon trigger to create a session temp table rather that create it at the time the procedure that uses it calls it. Two reasons for doing this is for performance ? the other is so that I can reference it in a cursor.
TRIGGER create_temp_table
AFTER LOGON ON DATABASE
DECLARE
v_CreateString VARCHAR2(100);
BEGIN
v_CreateString := 'CREATE GLOBAL TEMPORARY TABLE t_tmp_stddev ( v_part NUMBER, readings NUMBER) ON COMMIT PRESERVE ROWS';
EXECUTE IMMEDIATE v_CreateString;
END; TIA Peter McLarty E-mail: Peter.Mclarty_at_Mincom.com Technical Consultant WWW: http://www.Mincom.com APAC Technical Services Phone: +61 (0)7 3303 3461 Brisbane, Australia Mobile: +61 (0)402 094 238
---------------------- Facsimile: +61 (0)7 3303 3048
-- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise.Received on Wed Dec 12 2001 - 01:19:34 CST