As others have pointed out on this thread, I was wrong, and you 
can in fact pin packages in a startup trigger that have not been 
loaded into memory. I was confusing this with functions and 
procedures (and cursors) which have to be in memory before they 
are pinned and will raise an error if not already loaded. I'm not sure 
how far back pinning packages like this goes, but I tested on 8.1.6 
and it works.

I did however try to reproduce your error and found how to get the 
trigger working. I had to explicitly grant execute to sys for the 
packages before they would load from the startup trigger.

Regards,
Chris Gait

On 7 Feb 2001, at 8:50, Lindsay Stoddard wrote:

> Greetings,
> 
> I have a database startup trigger which is created from the sys account.
> The trigger is only designed to pin some packages in the shared pool.
> However, the trigger is only pinning the packages that belong to the sys
> account.  I am getting the following error in the alert log file when it
> tries to pin packages which belong to other users:
> 
> Registered presentation http://admin on database startup
> Error in executing triggers on database startup
> *** 2001-02-07 09:00:48.644
> ksedmp: internal or fatal error
> ORA-00604: error occurred at recursive SQL level 1
> ORA-01031: insufficient privileges
> ORA-06512: at "SYS.DBMS_UTILITY", line 68
> ORA-06512: at "SYS.DBMS_SHARED_POOL", line 45
> ORA-06512: at "SYS.DBMS_SHARED_POOL", line 53
> ORA-06512: at line 21
> 
> The following is a sample of the trigger:
> 
> CREATE OR REPLACE TRIGGER database_startup
> AFTER STARTUP ON DATABASE
> 
> BEGIN
> 
>    sys.dbms_shared_pool.keep('sys.standard');
>    sys.dbms_shared_pool.keep('sys.dbms_sys_sql');
>    sys.dbms_shared_pool.keep('sys.dbms_sql');
>    sys.dbms_shared_pool.keep('sys.dbms_utility');
>    sys.dbms_shared_pool.keep('sys.dbms_standard');
>    sys.dbms_shared_pool.keep('sys.dbms_output');
>    sys.dbms_shared_pool.keep('sys.dbms_pipe');
> 
>    sys.dbms_shared_pool.keep('ctxsys.driutl');
>    sys.dbms_shared_pool.keep('ctxsys.driutl');
> 
>    sys.dbms_shared_pool.keep('oas_public.htp');
>    sys.dbms_shared_pool.keep('oas_public.htp');
> END;
> /
> 
> All of the commands in the trigger can be executed successfully when logged
> into sqlplus as the sys user with the following syntax:
> 
> BEGIN
> 
>    sys.dbms_shared_pool.keep('oas_public.htp');
>    sys.dbms_shared_pool.keep('oas_public.htp');
>    . . .
> 
> END;
> /
> 
> Because of this I am wondering why the trigger errors out.
> 
> If anyone can help me I greatly appreciate it.  Oracle Support was not much
> help.
> 
> Thanks,
> 
> Lindsay Stoddard
> ACS - GSG
> 
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Lindsay Stoddard
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to