RE: DBMS_SERVICE create service/start_service and DB Restarts doesn't start service

From: Stephens, Chris <Chris.Stephens_at_adm.com>
Date: Tue, 5 Mar 2013 14:56:43 -0600
Message-ID: <D95BD5AFADBB0F4E9BB6C53F14D3A0500679DF8E89_at_JRCEXC1V1.research.na.admworld.com>



I use a trigger.

create or replace trigger start_services after startup on database begin
 pkg_db_services.prc_start_services;
end;

create or replace PACKAGE BODY pkg_db_services AS

  PROCEDURE prc_start_services IS
    service_already_started EXCEPTION;
    PRAGMA EXCEPTION_INIT(service_already_started,-44305);

  BEGIN
    FOR i IN (SELECT NAME FROM dba_services) LOOP

      BEGIN
        dbms_service.start_service(i.NAME);
      EXCEPTION WHEN service_already_started THEN
      --this means the service is already running so no need to crash
      NULL;
      END;

    END LOOP;
   END prc_start_services;

END PKG_DB_SERVICES;
-----Original Message-----

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Christopher.Taylor2_at_parallon.net Sent: Tuesday, March 05, 2013 2:32 PM
To: oracle-l_at_freelists.org
Subject: DBMS_SERVICE create service/start_service and DB Restarts doesn't start service

I've used DBMS_SERVICE to create a service and can start it successfully and everything is working fine, EXCEPT when I bounce the database, the service doesn't automatically start. What do I need to configure to have the service auto start?

Do I need to set the SERVICE_NAMES parameter of the database to include the NEW service name?

Regards,

Chris Taylor
Oracle DBA
Parallon IT&S

--

http://www.freelists.org/webpage/oracle-l

CONFIDENTIALITY NOTICE:
        This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by email reply.

--

http://www.freelists.org/webpage/oracle-l Received on Tue Mar 05 2013 - 21:56:43 CET

Original text of this message