?
Solved

Need to run an alter system statement at startup

Posted on 2011-03-24
7
Medium Priority
?
578 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:bmcdowell540
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 35209718
have you tried an AFTER STARTUP trigger?

0
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 35209743
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
 
LVL 1

Author Closing Comment

by:bmcdowell540
ID: 35209754
Exactly what I was looking for, thanks.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:bmcdowell540
ID: 35209810
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
 
LVL 74

Expert Comment

by:sdstuber
ID: 35209849
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
 
LVL 74

Expert Comment

by:sdstuber
ID: 35209859
actually, the trigger should be slightly "more" secure, since there is no OS file involved that could be manipulated to do other things
0
 
LVL 1

Author Comment

by:bmcdowell540
ID: 35210921
Thanks for your help.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question