Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure the autorun script of Oracle 10g under solaris 10

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to configure the autorun script of Oracle 10g under solaris 10. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Solaris 10 uses SMF (Service Management Facility) to centrally manage various systems and network services, which aims to reduce the difficulty of system management and reduce the probability of system errors. Practice shows that it is still very troublesome to configure and manage services through the SMF management platform. For example, it takes a lot of work to configure a third-party software customized and installed by users to SMF for management; in addition, if a service fails, it will involve both the service itself and SMF, which increases the difficulty of recovery accordingly. The goal of system management is to be as simple as possible-easy to deploy, easy to maintain, and fast to recover. It just so happens that the solaris 10 system has an oracle 10g, so use it as an example to configure an autorun script for oracle.

Let's first introduce the system environment:

System version

SunOS sery 5.10 Generic_118855-33 i86pc i386 i86pc

Oracle version

Racle Database 10g Enterprise Edition Release 10.2.0.2.0-Prod

Oracle installation path

/ opt/oracle/product/10.2/db_1

Dbstart path

/ opt/oracle/product/10.2/db_1/bin/dbstart

Oracle comes with a script dbstart, which is used to make autorun scripts. Before starting the oracle instance, let's manually run the script dbstart:

-bash-3.00$ dbstart ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net ListenerUsage: / opt/oracle/product/10.2/db_1/bin/dbstart ORACLE_HOME

Prompt that ORACL_HOME_LISTNER is not set, and then show how to use this command. Use ps-aef | grep ora to see if oracle-related processes are up, oh, not up! Modify the file dbstart to find the line ORACL_HOME_LISTNER (fortunately, there is only one line). Its default value is "$1", which means to accept a position parameter. Since the program needs to add the position parameter ORACLE_HOME manually, we might as well replace "$1" with "ORACLE_HOME" directly.

That is: ORACLE_HOME_LISTNER=$1-- > RACLE_HOME_LISTNER=$ORACLE_HOME, save and then execute the script dbstart, which is executed smoothly.

-bash-3.00$ dbstart-bash-3.00$ ps-aef | grep ora | grep-v grep oracle 964 552 0 06:40:17 pts/1 0:00 ps-aef oracle 552 546 0 06:08:08 pts/1 0:00-bash oracle 696 10 06:22:25? 0:00 / opt/oracle/product/10.2/

Db_1/bin/tnslsnr LISTENER-inherit / / listener is up

But there are no oracle processes, only oracle listeners. There is also a file / var/opt/oracle/oratab fix to be modified, which is created by manually executing root.sh during oracle installation. Open this file and there is only one line of valid configuration. Here is the output on a system:

Sery:/opt/oracle/product/10.2/db_1:N

As prompted by the comment, we need to change the value of its last field (with a colon: "as the field separator) from" N "to" Y ", save it and then execute dbstart &.

-bash-3.00$ dbstart Processing Database instance "sery": log file / opt/oracle/product/10.2/db_1/startup.log-bash-3.00$ ps-eaf | grep ora oracle 1175 10 06:54:35? 0:00 ora_j001_sery oracle 1173 11 06:54:35? 0:01 ora_j000_sery oracle 1179 10 06:54:35? 0:00 ora _ j003_sery oracle 1177 1 0 06:54:35? 0:00 ora_j002_sery. (several outputs are omitted)

At this point, the oracle instance is running. Based on this experience, we revised the file dbshut by the way.

When everything is ready, you can start writing run-level automatic scripts. Create the file / etc/rc3.d/S33dbstart in the directory where you run level 3 with the following contents:

#! / bin/bashsu-oracle-c / opt/oracle/product/10.2/db_1/bin/dbstart&

/ / few options-c will not execute this script,-c command

Give it execution permission after saving it. Similarly, create a file / etc/rcS.d/K33dbshut in the directory of run level S, with the following contents:

#! / bin/bashsu-oracle-c / opt/oracle/product/10.2/db_1/bin/dbshut &

Execute the command init 6 to restart solaris 10 to see if the oracle instance and listener are running properly. Of course, if the service management facility SMF is used to manage oracle services without runlevel, there are still many steps to complete, and those who are interested can try it.

This is the end of this article on "how to configure the autorun script of Oracle 10g under solaris 10". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report