- Denish Patel
- 17th June 2009
- oracle
At OmniTi, we support various databases i.e oracle,postgresql,mysql etc.. Most of the databases are on Solaris servers. Solaris has many cool features for easy database management, one of them is SMF services.
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='database/oracle' type='service' version='0'>
<create_default_instance enabled='false'/>
<single_instance/>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service'/>
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/milestone/name-services'/>
</dependency>
<dependency name='identity' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/identity:domain'/>
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log'/>
</dependency>
<dependency name='autofs' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/autofs'/>
</dependency>
<method_context project=':default' resource_pool=':default' working_directory=':default'>
<method_credential group='oinstall' limit_privileges=':default' privileges=':default' supp_groups=':default' user='oracle'/>
<method_environment>
<envvar name='TNS_ADMIN' value='/opt/app/oracle/network/admin'/>
<envvar name='ORACLE_SID' value='TEST'/>
<envvar name='ORACLE_BASE' value='/opt/app/oracle'/>
<envvar name='ORACLE_HOME' value='/opt/app/oracle/102'/>
<envvar name='LD_LIBRARY_PATH' value='/opt/app/oracle/102/lib'/>
<envvar name='PFILE' value='/opt/app/oracle/admin/TEST/pfile/initTEST.ora'/>
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='$ORACLE_HOME/bin/sqlplus @/export/home/oracle/smf/startup.sql' timeout_seconds='500'>
<method_context/>
</exec_method>
<exec_method name='stop' type='method' exec='$ORACLE_HOME/bin/sqlplus @/export/home/oracle/smf/shutdown.sql' timeout_seconds='900'>
<method_context/>
</exec_method>
<property_group name='general' type='framework'>
<propval name='action_authorization' type='astring' value='oracle.smf.manage.oracle'/>
</property_group>
<property_group name='dependents' type='framework'>
<propval name='db-oracle_multi-user' type='fmri' value='svc:/milestone/multi-user'/>
</property_group>
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<stability value='Unstable'/>
<template>
<common_name>
<loctext xml:lang='C'>Oracle Database Server</loctext>
</common_name>
</template>
</service>
</service_bundle>
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='database/oralistener' type='service' version='0'>
<create_default_instance enabled='false'/>
<single_instance/>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service'/>
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/milestone/name-services'/>
</dependency>
<dependency name='identity' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/identity:domain'/>
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log'/>
</dependency>
<dependency name='autofs' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/autofs'/>
</dependency>
<method_context project=':default' resource_pool=':default' working_directory=':default'>
<method_credential group='oinstall' limit_privileges=':default' privileges=':default' supp_groups=':default' user='oracle'/>
<method_environment>
<envvar name='TNS_ADMIN' value='/opt/app/oracle/network/admin'/>
<envvar name='ORACLE_SID' value='TEST'/>
<envvar name='ORACLE_BASE' value='/opt/app/oracle'/>
<envvar name='ORACLE_HOME' value='/opt/app/oracle/102'/>
<envvar name='LD_LIBRARY_PATH' value='/opt/app/oracle/102/lib'/>
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='$ORACLE_HOME/bin/lsnrctl start LISTENER' timeout_seconds='50'>
<method_context/>
</exec_method>
<exec_method name='stop' type='method' exec='/home/oracle/smf/stop_listener.sh' timeout_seconds='50'>
<method_context/>
</exec_method>
<property_group name='general' type='framework'>
<propval name='action_authorization' type='astring' value='oralistener.smf.manage.oralistener'/>
</property_group>
<property_group name='dependents' type='framework'>
<propval name='db-oracle_multi-user' type='fmri' value='svc:/milestone/multi-user'/>
</property_group>
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<stability value='Unstable'/>
<template>
<common_name>
<loctext xml:lang='C'>Oracle Database Listener</loctext>
</common_name>
</template>
</service>
</service_bundle>
Leave a comment
Categories
Recent Blog
- Do you really need a DBA?
- Running VACUUM FULL in Non-blocking Mode
- Connection Scaling
- PSQL Helper: Managing Connections and Simplifying Queries
- Vacuum Those MVs!
- Working With Repmgr: Using Other 3rd Party Tools for Setting up a Standby
- Working with Amazon Aurora PostgreSQL: dag, standby rebooted again!
- Working with Amazon Aurora PostgreSQL: what happened to the stats?
- How to set application_name for psql command line utility?
- Is there a limit on number of partitions handled by Postgres?
good..when yr new blog is coming?