FAQ
Hi all,

(Oracle 11.1.0.7)

We're using named services to implement application node affinity on a RAC
database. These services were created using :

srvctl add service -s srv_xxx -d rac11d -r rac11d2 -a rac11d1 -P BASIC

When the database starts up these services need to be started explicitly
using :

srvctl start service -d rac11d -s srv_xxx

I see that in 11.2 the srvctl add service command takes a '-y AUTOMATIC' to
start the service when the DB starts. Is there an option in 11.1 that I've
missed or is it just not there?

Thanks,

Steve

This email is intended solely for the use of the addressee and may
contain information that is confidential, proprietary, or both.
If you receive this email in error please immediately notify the
sender and delete the email.

Search Discussions

  • Bobak, Mark at Aug 17, 2010 at 2:07 am
    Hi Steve,

    We have 10.2, 11.1, and 11.2 RAC, but I'm only using named services on 11.2, so, I never noticed it before.

    I don't think you missed anything. Looks like it's not there in 11.1 or earlier versions.

    One thought, totally untested and pure speculation:

    How about a database startup trigger that calls dbms_service.start_service?

    Hope that helps,

    -Mark

    From: oracle-l-bounce_at_freelists.org On Behalf Of Steve Baldwin
    Sent: Monday, August 16, 2010 8:49 PM
    To: oracle-l@freelists.org
    Subject: Starting named services at DB start

    Hi all,

    (Oracle 11.1.0.7)

    We're using named services to implement application node affinity on a RAC database. These services were created using :

    srvctl add service -s srv_xxx -d rac11d -r rac11d2 -a rac11d1 -P BASIC

    When the database starts up these services need to be started explicitly using :

    srvctl start service -d rac11d -s srv_xxx

    I see that in 11.2 the srvctl add service command takes a '-y AUTOMATIC' to start the service when the DB starts. Is there an option in 11.1 that I've missed or is it just not there?

    Thanks,

    Steve

    This email is intended solely for the use of the addressee and may

    contain information that is confidential, proprietary, or both.

    If you receive this email in error please immediately notify the

    sender and delete the email.
  • Steve Baldwin at Aug 17, 2010 at 3:42 am
    Thanks Mark !! That's a great idea. I'll give it a go.

    Steve
    On Tue, Aug 17, 2010 at 12:07 PM, Bobak, Mark wrote:

    Hi Steve,



    We have 10.2, 11.1, and 11.2 RAC, but I�m only using named services on
    11.2, so, I never noticed it before.



    I don�t think you missed anything. Looks like it�s not there in 11.1 or
    earlier versions.



    One thought, totally untested and pure speculation:



    How about a database startup trigger that calls dbms_service.start_service?



    Hope that helps,



    -Mark



    *From:* oracle-l-bounce_at_freelists.org [mailto:
    oracle-l-bounce@freelists.org] *On Behalf Of *Steve Baldwin
    *Sent:* Monday, August 16, 2010 8:49 PM
    *To:* oracle-l@freelists.org
    *Subject:* Starting named services at DB start



    Hi all,

    (Oracle 11.1.0.7)

    We're using named services to implement application node affinity on a RAC
    database. These services were created using :

    srvctl add service -s srv_xxx -d rac11d -r rac11d2 -a rac11d1 -P BASIC

    When the database starts up these services need to be started explicitly
    using :

    srvctl start service -d rac11d -s srv_xxx

    I see that in 11.2 the srvctl add service command takes a '-y AUTOMATIC' to
    start the service when the DB starts. Is there an option in 11.1 that I've
    missed or is it just not there?

    Thanks,

    Steve



    ---------------------------------------------------------------------------------------

    This email is intended solely for the use of the addressee and may

    contain information that is confidential, proprietary, or both.

    If you receive this email in error please immediately notify the

    sender and delete the email.

    ---------------------------------------------------------------------------------------


    This email is intended solely for the use of the addressee and may
    contain information that is confidential, proprietary, or both.
    If you receive this email in error please immediately notify the
    sender and delete the email.
  • Bobak, Mark at Aug 17, 2010 at 3:49 am
    Glad I could help!

    Let us know if it works.

    Shameless plug:

    MOTS is a month away!

    The Michigan Oak Table Symposium is coming up in Ann Arbor, MI, on Sept 16-17th.
    Many of the top Oracle speakers in the world will be present, including Jonathan Lewis, Cary Millsap, Tanel Poder, and many more!

    For a complete list of speakers, and pricing and registration info, see: http://michigan.oaktable.net/

    There are still a few seats left! Sign up now!

    -Mark
    From: Steve Baldwin
    Sent: Monday, August 16, 2010 11:43 PM
    To: Bobak, Mark
    Cc: oracle-l@freelists.org
    Subject: Re: Starting named services at DB start

    Thanks Mark !! That's a great idea. I'll give it a go.

    Steve
    On Tue, Aug 17, 2010 at 12:07 PM, Bobak, Mark > wrote:
    Hi Steve,

    We have 10.2, 11.1, and 11.2 RAC, but I'm only using named services on 11.2, so, I never noticed it before.

    I don't think you missed anything. Looks like it's not there in 11.1 or earlier versions.

    One thought, totally untested and pure speculation:

    How about a database startup trigger that calls dbms_service.start_service?

    Hope that helps,

    -Mark

    From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Steve Baldwin
    Sent: Monday, August 16, 2010 8:49 PM
    To: oracle-l@freelists.org
    Subject: Starting named services at DB start

    Hi all,

    (Oracle 11.1.0.7)

    We're using named services to implement application node affinity on a RAC database. These services were created using :

    srvctl add service -s srv_xxx -d rac11d -r rac11d2 -a rac11d1 -P BASIC

    When the database starts up these services need to be started explicitly using :

    srvctl start service -d rac11d -s srv_xxx

    I see that in 11.2 the srvctl add service command takes a '-y AUTOMATIC' to start the service when the DB starts. Is there an option in 11.1 that I've missed or is it just not there?

    Thanks,

    Steve

    This email is intended solely for the use of the addressee and may

    contain information that is confidential, proprietary, or both.

    If you receive this email in error please immediately notify the

    sender and delete the email.

    This email is intended solely for the use of the addressee and may

    contain information that is confidential, proprietary, or both.

    If you receive this email in error please immediately notify the

    sender and delete the email.
  • Steve Baldwin at Aug 17, 2010 at 4:26 am
    Just to let you all know that I tried Mark's suggestion and it seems to work
    perfectly. I still need to test it a bit more but looks like we're on a
    winner !!

    Thanks a lot Mark.

    Cheers,

    Steve
    On Tue, Aug 17, 2010 at 1:49 PM, Bobak, Mark wrote:

    Glad I could help!



    Let us know if it works.



    Shameless plug:



    MOTS is a month away!



    The Michigan Oak Table Symposium is coming up in Ann Arbor, MI, on Sept
    16-17th.

    Many of the top Oracle speakers in the world will be present, including
    Jonathan Lewis, Cary Millsap, Tanel Poder, and many more!



    For a complete list of speakers, and pricing and registration info, see:
    http://michigan.oaktable.net/



    There are still a few seats left! Sign up now!



    -Mark

    *From:* Steve Baldwin
    *Sent:* Monday, August 16, 2010 11:43 PM
    *To:* Bobak, Mark
    *Cc:* oracle-l@freelists.org
    *Subject:* Re: Starting named services at DB start



    Thanks Mark !! That's a great idea. I'll give it a go.

    Steve

    On Tue, Aug 17, 2010 at 12:07 PM, Bobak, Mark
    wrote:

    Hi Steve,



    We have 10.2, 11.1, and 11.2 RAC, but I�m only using named services on
    11.2, so, I never noticed it before.



    I don�t think you missed anything. Looks like it�s not there in 11.1 or
    earlier versions.



    One thought, totally untested and pure speculation:



    How about a database startup trigger that calls dbms_service.start_service?



    Hope that helps,



    -Mark



    *From:* oracle-l-bounce_at_freelists.org [mailto:
    oracle-l-bounce@freelists.org] *On Behalf Of *Steve Baldwin
    *Sent:* Monday, August 16, 2010 8:49 PM
    *To:* oracle-l@freelists.org
    *Subject:* Starting named services at DB start



    Hi all,

    (Oracle 11.1.0.7)

    We're using named services to implement application node affinity on a RAC
    database. These services were created using :

    srvctl add service -s srv_xxx -d rac11d -r rac11d2 -a rac11d1 -P BASIC

    When the database starts up these services need to be started explicitly
    using :

    srvctl start service -d rac11d -s srv_xxx

    I see that in 11.2 the srvctl add service command takes a '-y AUTOMATIC' to
    start the service when the DB starts. Is there an option in 11.1 that I've
    missed or is it just not there?

    Thanks,

    Steve



    ---------------------------------------------------------------------------------------

    This email is intended solely for the use of the addressee and may

    contain information that is confidential, proprietary, or both.

    If you receive this email in error please immediately notify the

    sender and delete the email.

    ---------------------------------------------------------------------------------------







    ---------------------------------------------------------------------------------------

    This email is intended solely for the use of the addressee and may

    contain information that is confidential, proprietary, or both.

    If you receive this email in error please immediately notify the

    sender and delete the email.

    ---------------------------------------------------------------------------------------


    This email is intended solely for the use of the addressee and may
    contain information that is confidential, proprietary, or both.
    If you receive this email in error please immediately notify the
    sender and delete the email.
  • Steve Baldwin at Aug 18, 2010 at 4:23 am
    I seem to have hit a snag with the trigger approach.

    A quick recap on our config :

    11.1.0.7 Standard Edition 2 node cluster - rac01d1 (host=opbld05) and
    rac01d2 (host=opbld06)

    1 service - bb created with :

    srvctl add service -s bb -d rac01d -r rac01d1 -a rac01d2 -P BASIC

    My tnsnames.ora entry looks like this :

    bb.build =

    (DESCRIPTION =

    (ADDRESS_LIST =
    (LOAD_BALANCE = on)
    (FAILOVER = on)
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = opbld05-vip.xxx.com)
    (PORT = 1521)
    )
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = opbld06-vip.xxx.com)
    (PORT = 1521)
    )
    )
    (CONNECT_DATA =
    (SERVER = shared)
    (SERVICE_NAME = bb.build.xxx.com)
    )

    )

    Here's the issue :

    If I start the service with 'srvctl start service -d rac01d -s bb', any
    client connecting to _at_bb.build lands on node 1 (rac01d1) as expected. If
    node 1 goes down, the service is migrated to node 2 - again, as expected.

    If however I start the service using dbms_session.start_service, I have to
    direct it to the correct node (unlike srvctl). At that point the service
    can no longer be stopped or relocated with srvctl.

    For example :

    [oracle_at_opbld05 ~]$ rlwrap sqlplus / as sysdba

    SQL*Plus: Release 11.1.0.7.0 - Production on Tue Aug 17 23:05:51 2010

    Copyright (c) 1982, 2008, Oracle. All rights reserved.

    Connected to:
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
    With the Real Application Clusters option

    SQL> exec dbms_service.start_service('bb')

    PL/SQL procedure successfully completed.

    SQL> Disconnected from Oracle Database 11g Release 11.1.0.7.0 - 64bit
    Production
    With the Real Application Clusters option
    [oracle_at_opbld05 ~]$ srvctl stop service -d rac01d -s bb
    PRKP-1063 : Service bb is already stopped.
    [oracle_at_opbld05 ~]$ lsnrctl status | grep bb
    Service "bb.build.multiservice.com" has 1 instance(s).
    [oracle_at_opbld05 ~]$ rlwrap sqlplus stbaldwindba/xxx_at_bb.build

    SQL*Plus: Release 11.1.0.7.0 - Production on Tue Aug 17 23:07:12 2010

    Copyright (c) 1982, 2008, Oracle. All rights reserved.

    Connected to:
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
    With the Real Application Clusters option

    SQL> Disconnected from Oracle Database 11g Release 11.1.0.7.0 - 64bit
    Production
    With the Real Application Clusters option
    [oracle_at_opbld05 ~]$ srvctl stop service -d rac01d -s bb -i rac01d1
    PRKP-1065 : Service bb is already stopped on instance rac01d1.
    [oracle_at_opbld05 ~]$ rlwrap sqlplus / as sysdba

    SQL*Plus: Release 11.1.0.7.0 - Production on Tue Aug 17 23:08:00 2010

    Copyright (c) 1982, 2008, Oracle. All rights reserved.

    Connected to:
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
    With the Real Application Clusters option

    SQL> exec dbms_service.stop_service('bb', dbms_service.all_instances)

    PL/SQL procedure successfully completed.

    SQL> Disconnected from Oracle Database 11g Release 11.1.0.7.0 - 64bit
    Production
    With the Real Application Clusters option
    [oracle_at_opbld05 ~]$ srvctl start service -d rac01d -s bb

    However the bigger problem is that if I start the service using
    dbms_service.start_service and node 1 goes down, the service is not
    automatically migrated to node 2.

    I'm assuming the problem is that dbms_service.start_service is not
    registering with crs. If I start the service with srvctl, here's what I see
    with crs_stat :

    [oracle_at_opbld05 ~]$ crs_stat ora.rac01d.bb.cs
    NAME=ora.rac01d.bb.cs
    TYPE=application
    TARGET=ONLINE

    STATE=ONLINE on opbld05

    [oracle_at_opbld05 ~]$ crs_stat ora.rac01d.bb.rac01d1.srv
    NAME=ora.rac01d.bb.rac01d1.srv
    TYPE=application
    TARGET=ONLINE

    STATE=ONLINE on opbld05

    However if I start the service with dbms_service.start_service, I see this :

    [oracle_at_opbld05 ~]$ crs_stat ora.rac01d.bb.cs
    NAME=ora.rac01d.bb.cs
    TYPE=application
    TARGET=OFFLINE

    STATE=OFFLINE

    [oracle_at_opbld05 ~]$ crs_stat ora.rac01d.bb.rac01d1.srv
    NAME=ora.rac01d.bb.rac01d1.srv
    TYPE=application
    TARGET=OFFLINE

    STATE=OFFLINE

    Does this sound like a bug, intended functionality (???), or do I need to do
    something else along with dbms_service.start_service in order to have the
    service registered properly with crs and thereby migrated in case of node
    failure.

    Thanks again.

    Steve
    On Tue, Aug 17, 2010 at 6:01 PM, Timo Raitalaakso wrote:


    Hi!

    About the issue in Morgan's Library hci page. It is using database startup
    trigger as Mark suggested.

    http://morganslibrary.org/hci/hci012.html

    --
    Rafu
    http://rafudb.blogspot.com/

    On 17.8.2010 5:07, Bobak, Mark wrote:

    How about a database startup trigger that calls
    dbms_service.start_service?
    I see that in 11.2 the srvctl add service command takes a '-y AUTOMATIC'
    to start the service when the DB starts. Is there an option in 11.1 that
    I've missed or is it just not there?

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

    ---------------------------------------------------------------------------------------

    This email is intended solely for the use of the addressee and may
    contain information that is confidential, proprietary, or both.
    If you receive this email in error please immediately notify the
    sender and delete the email.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedAug 17, '10 at 12:48a
activeAug 18, '10 at 4:23a
posts6
users2
websiteoracle.com

2 users in discussion

Steve Baldwin: 4 posts Bobak, Mark: 2 posts

People

Translate

site design / logo © 2022 Grokbase