Need to run an alter system statement at startup

I need to run an alter system statement every time the Oracle Database (11G R2 Windows) starts, to open an encryption wallet.  Is there a way to do this within Oracle?  I looked in the scheduler and I don't see an option.  Will I have to a Windows script to accomplish this?

Thanks
Brian
LVL 1
bmcdowell540Asked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
the trigger will need to be owned by a privileged user (with direct grants, not just through a role)

it might look something like this...

CREATE OR REPLACE TRIGGER trg_open_wallet_on_startup
AFTER STARTUP
ON DATABASE
BEGIN
   execute immediate 'alter system set encryption wallet open .....';
END trg_open_wallet_on_startup;
0
 
sdstuberCommented:
have you tried an AFTER STARTUP trigger?

0
 
bmcdowell540Author Commented:
Exactly what I was looking for, thanks.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
bmcdowell540Author Commented:
Would it be a security issue if I ran this as sys?  Currently that is how it is being done as a Windows script.
0
 
sdstuberCommented:
it is neither more nor less secure

it does need to be done by a privileged user  but doesn't need to be SYS.

you might want to create a new dedicated user that has no privileges except CREATE TRIGGER and ALTER SYSTEM,  that way you're not creating objects in Oracle's schemas
0
 
sdstuberCommented:
actually, the trigger should be slightly "more" secure, since there is no OS file involved that could be manipulated to do other things
0
 
bmcdowell540Author Commented:
Thanks for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.