Solved

Need to run an alter system statement at startup

Posted on 2011-03-24
7
568 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
  • 4
  • 3
7 Comments
 
LVL 73

Expert Comment

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

0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 73

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 73

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

825 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