PL/SQL (MOSC)

MOSC Banner

Using PL/SQL to start/stop listener

edited May 21, 2012 8:21PM in PL/SQL (MOSC) 5 commentsAnswered ✓
Hi,
This is going to be a really odd request but due to a customer requirement I need to be able to start/stop the oracle listener on a remote database via pl/sql.

I am running database version 11.2.0.1 and on a windows environment but will run on linux as well.

I have done some reading up and it would appear that you can run dbms_scheduler to call local OS commands. I have created a job and a .bat file 

begin
 dbms_scheduler.create_job(job_name => 'EA01', 
                               job_action=>'C:\WINDOWS\SYSTEM32\CMD.EXE  c:\temp\stop.bat',

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center