Solved

Need to run an alter system statement at startup

Posted on 2011-03-24
7
564 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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ORACLE SQL DEVELOPER Query ? 5 59
Invalid Identifier Error 3 65
Parametric query in oracle 6 37
Encryption Decryption in Oracle 12 60
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now