1 Reply Latest reply: Jan 13, 2010 5:03 AM by 807559 RSS

    Solaris SMF configuration for Oracle CSS service

    807559
      Below is the code to create oracle CSS service with solaris SMF, it will create smf service with instance name as "default" where as i need to change it to "css"

      svc:/application/oracle/css:default

      change service instance name to

      svc:/application/oracle/css:css

      i don't know about smf and xml, can somebody help me to change css service name ?
      <?xml version="1.0"?>
      <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
      
      <!-- $Id: oracle-database-css.xml,v 1.4 2006/03/19 21:19:40 joomul Exp $ 
      
        The contents of this file are subject to the terms of the
        Common Development and Distribution License, Version 1.0 only
        (the "License").  You may not use this file except in compliance
        with the License.
      
        You can obtain a copy of the license at 
         http://www.opensource.org/licenses/cddl1.php
        See the License for the specific language governing permissions and 
        limitations under the License.
      
        Copyright 2005, 2006 Joost Mulders.
      
        This document contains a service definition for the
          Cluster Synchronization Services (CSS) process.
        This process is required for ASM and RAC. It should be started via smf(5)
        only for *non-RAC* systems. On RA clusters, this daemon is started via crs.
      -->
      
      
      <service_bundle type='manifest' name='oracle-database-css'>
       <service
        name='application/oracle/css'
        type='service'
        version='1'>
      
        <create_default_instance enabled='false' />
      
        <!-- CSS depends on multi-user. That takes care of details like filesystem -->
        <dependency
         name='multi-user'
         grouping='require_all'
         restart_on='error'
         type='service'>
         <service_fmri
          value='svc:/milestone/multi-user:default' />
        </dependency>
      
        <exec_method
         type='method'
         name='start'
         exec='$ORACLE_HOME/bin/ocssd'
         timeout_seconds='30' >
      
         <method_context>
          <method_credential
           user='oracle'
           group='dba'
           supp_groups=':default'
           privileges=':default'
           limit_privileges=':default' />
          <method_environment>
           <envvar name='ORACLE_HOME' value='/u01/app/oracle/product/10.2.0.1/asm_1' />
          </method_environment>
         </method_context>
        </exec_method>
      
        <exec_method
         type='method'
         name='stop'
         exec=':kill'
         timeout_seconds='60' >
      
         <method_context>
          <method_credential
           user='oracle'
           group='dba'
           supp_groups=':default'
           privileges=':default'
           limit_privileges=':default' />
          <method_environment>
           <envvar name='ORACLE_HOME' value='/u01/app/oracle/product/10.2.0.1/asm_1' />
          </method_environment>
         </method_context>
        </exec_method>
      
        <!-- ocssd.bin does not detach -->
        <property_group name='startd' type='framework'>
         <propval name='duration' type='astring' value='child' />
         <propval name='modify_authorization' type='astring'
          value='solaris.smf.manage.oracle.database' />
        </property_group>
      
        <property_group name='general' type='framework'>
         <propval name='modify_authorization' type='astring'
          value='solaris.smf.manage.oracle.database' />
         <propval name='action_authorization' type='astring'
          value='solaris.smf.manage.oracle.database' />
        </property_group>
      
        <stability value='Unstable' />
      
        <template>
         <common_name>
          <loctext xml:lang='C'>
           Oracle Cluster Synchronization Services (CSS)
          </loctext>
         </common_name>
         <documentation>
          <doc_link 
           name='Intro to Oracle Clusterware and Oracle Real Application Clusters' 
           uri='http://download-east.oracle.com/docs'/>
         </documentation>
        </template>
       </service>
      </service_bundle>
      Edited by: sachinonnet on Jan 12, 2010 2:01 AM
        • 1. Re: Solaris SMF configuration for Oracle CSS service
          807559
          Hi,

          i got the solution as below

          removed below line from service xml
          <create_default_instance enabled='false' />

          created another xml file for instance xml, where i specified the name of instance.
          <?xml version="1.0"?>
          <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
          
          <!-- $Id: oracle-database-instance.xml,v 1.12 2006/03/12 19:51:20 joost Exp $ 
          
            The contents of this file are subject to the terms of the
            Common Development and Distribution License, Version 1.0 only
            (the "License").  You may not use this file except in compliance
            with the License.
          
            You can obtain a copy of the license at 
             http://www.opensource.org/licenses/cddl1.php
            See the License for the specific language governing permissions and 
            limitations under the License.
          
            Copyright 2005,2006 Joost Mulders.
          
            This document contains a service definition for an Oracle database instance. 
          
            It contains some instance specific variables like ORACLE_SID and ORACLE_HOME.
            These must be filled in below. 
          
            Other -generic database- service properties are inherited from the parent
            service, 'application/oracle/database'.
          
            A database instance can be brought under SMF control by:
             * running /lib/svc/method/ora-smf autoimport
           *OR*
             * filling in the blanks (marked with '' or ':default') below
             * svccfg import <file>
          -->
          
          <service_bundle type='manifest' name='oracle-database-instance'>
           <service
            name='application/oracle/database'
            type='service'
            version='1'>
          
            <dependency name='oracle-asm' grouping='require_all' restart_on='none' type='service'>
              <service_fmri value='svc:/application/oracle/database:ASM' />
            </dependency>
             
            <!-- The SMF instance name MUST match the database instance -->
            <instance name='PDB' enabled='false'>
             <method_context
              working_directory='/u01/app/oracle/product/10.2.0.1/db'
              project=':default'
              resource_pool=':default'>
          
              <!-- 
                The credentials of the user with which the method is executed. 
              -->
              <method_credential
               user='oracle'
               group='dba'
               supp_groups=':default'
               privileges=':default'
               limit_privileges=':default'/>
          
              <method_environment>
               <envvar name='ORACLE_SID' value='pdb' />
               <envvar name='ORACLE_HOME' value='/u01/app/oracle/product/10.2.0.1/db' />
              </method_environment>
             </method_context>
          
            <!--
             A generic options property group for this database.
             This property group has currently only one variable: instance_type.
             instance_type describes the type of database instance. It's value can be
             RDBMS or ASM. RDBMS denotes a classic database instance and ASM is a storage
             manager instance. 
            -->
            <property_group name='options' type='application'>
             <stability value='External' />
          
             <propval name='instance_type' type='astring' value='RDBMS' />
          
             <propval name='modify_authorization' type='astring'
              value='solaris.smf.manage.oracle.database' />
            </property_group>
            </instance>
           </service>
          </service_bundle>