Redhat as4 since the startup script under the oracle10g
About oracle install the linux system, how to restart the case in the system for service to start automatically up, there are many online tutorials and ready-made script, here is only my personal summary of the work experience. (The following is for reference only, please do not scripted)
In this paper, REDHAT AS4.8 and oracle10G, for example, Oracle installation process can refer to a 64-bit Linux environment, how to install ORACLE10G.
Oracle Database automatically start and stop the Oracle offer dbstart nationality and reach dbshut files. The document also playing to rely on / etc / oratab exists to use. You want to achieve the oracle with the Linux system to automatically start, there are two ways:
1, set to start automatically starts the database (using the root account)
1, change / etc / oratab the last line of
sid: / oracle/product/10.2.0.1: N
= "
sid: / oracle/product/10.2.0.1: Y (where sid you want to start the database)
2, change / etc / rc.local
echo "su - oracle-c 'lsnrctl start'">> / etc / rc.local
echo "su - oracle-c 'dbstart'">> / etc / rc.local
Actual operation may appear not automatically start the oracle database, the situation!
To oracle editing $ ORACLE_HOME / bin / dbstart, find the first of which 88 lines: ORACLE_HOME_LISTNER = change your own path, or you can change ORACLE_HOME_LISTNER = $ ORACLE_HOME, and $ ORACLE_HOME / bin / dbshut, find the first of which 77 lines: ORACLE_HOME_LISTNER = into your own path, or you can change ORACLE_HOME_LISTNER = $ ORACLE_HOME.
Save the script to oracle user to run dbshut and dbstart to see if closed, start the database. If not, is generally set of parameters, according to Baocuo place to find the corresponding changes.
2, configure the Oracle automatic startup script
First in / etc / rc.d / init.d / directory services configured Oracle Files
# touch / etc / rc.d / init.d / oracle
# chmod 755 / etc / rc.d / init.d / oracle
# chown-R / ect / rc.d / init.d / oracle
Then vi editing oracle file to look at the script in the input to the oracle
#! / bin / sh
#
# / Etc / rc.d / init.d / oracle
# Whoami
# Root
# Chkconfig: 345 51 49
# / Etc / init.d / oracle
# Description: starts the oracle dabase deamons
#
case "$ 1" in
start)
echo-n "Starting Oracle Databases:"
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Starting Oracle Databases as part of system up.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
su - oracle-c dbstart>> / var / log / oracle
echo "Done."
echo-n "Starting Oracle Listeners:"
su - oracle-c "lsnrctl start">> / var / log / oracle
echo "Done."
echo ""
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Finished.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
touch / var / lock / subsys / oracle
;;
stop)
echo-n "Shutting Down Oracle Listeners:"
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Shutting Down Oracle Databases as part of system down.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
su - oracle-c "lsnrctl stop">> / var / log / oracle
echo "Done."
rm-f / var / lock / subsys / oracle
echo-n "Shutting Down Oracle Databases:"
su - oracle-c dbshut>> / var / log / oracle
echo "Done."
echo ""
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Finished.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
;;
restart)
echo-n "Restarting Oracle Databases:"
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Restarting Oracle Databases as part of system up.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
su - oracle-c dbstop>> / var / log / oracle
su - oracle-c dbstart>> / var / log / oracle
echo "Done."
echo-n "Restarting Oracle Listeners:"
su - oracle-c "lsnrctl stop">> / var / log / oracle
su - oracle-c "lsnrctl start">> / var / log / oracle
echo "Done."
echo ""
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Finished.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
touch / var / lock / subsys / oracle
;;
*)
echo "Usage: oracle (start | stop | restart)"
exit 1
esac
Save the file, exit after the service to add and start the look.
# chkconfig - add oracle
# chkconfig - list oracle
chkconfig - list oracle operating results:
oracle 0: off 1: off 2: off 3: on 4: off 5: on 6: off
According to the results of the above operation, when the corresponding run level is on (for example: 5: on), in the corresponding / etc / rc.d / rcN.d (for example: and 5: on corresponds to: / etc / rc .d/rc5.d) The following will generate a file: S95oracle, using the vi S95oracle to open the file, you can see the contents of the file and the / etc / rc.d / init.d / oracle are identical, indicating a successful configuration, in fact, , S95oracle is a reference to / etc / rc.d / init.d / oracle link, we can use the file command to see:
$ file / etc/rc.d/rc5.d/S95oracle
S95oracle: symbolic link to '.. / init.d / oracle
One point:
The script file: # chkconfig: 345 51 49
Pointed out that the 3,4,5-level to start the service, 95 are in the corresponding / etc / rc.d / rcN.d (N for the front of the specified level, here is the 345) directory link files generated by the serial number (to start the priority level) S95oracle, 10 noted above in addition to the level of the corresponding / etc / rc.d / rcN.d (N, other than a 345 other than level) directory link files generated by the serial number (service stopped priority level) K10oracle
Reboot the system, you can see the process start Starting oracle, because we set the priority level of 99, generally the last to start. [OK] later on it. Due to the start emctl, may be a bit slow, the waiting time to be a little bit longer.
After the root can start the implementation of oracle start or oracle stop to start or stop services.
Note:
This script starts normally does not start instance, if you want to start with instances of the words with the script, you need to modify the file: / etc / oratab
If this file does not exist, then it must run the script file generated sh / u01/app/oracle/product/10.2.0/root.sh
Change / etc / oratab the last line of
sid: / oracle/product/10.2.0.1: N
= "
sid: / oracle/product/10.2.0.1: Y (where sid you want to start the database)
Just set up here after the tie in with the above script, boot automatically start oracle can be realized, as well as examples of the.
Common manual control database command to open the em
emctl start dbconsole
Close em
emctl stop dbconsole
Start listener
lsnrctl start <monitor name "(default is LISTENER, can be omitted)
Close
lsnrctl stop
Start emagent
emctl start agent
Close
emctl stop agent
Start an instance of
sqlplus / nolog
conn / as sysdba
startup
Close
shutdown immediate
Pass test database is
tnsping <the local service name "
========================================
Frequently Asked Questions:
Web interface buttons appear on the "mouth" of the garbled solution:
1. Stop the service, emctl stop dbconsole;
2. To the relevant directory (RHEL4 which is the / etc / java /) under the font.properties use
font.properties.zh_CN.Redhat8.0 replacement (or font.properties.zh, as long as you can Simplified Chinese.);
3. Delete
$ ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs in gif files
;
4. Re-play services (preferably to restart the server) emctl start dbconsole;
/ etc / oratab the contents of the
orcl: / oracle/10.2.0/db_1: Y
================================================== ===
The following J2EE applications has been configured, and can be used to access the URL listed below.
iSQL * Plus URL:
http://database:5560/isqlplus
iSQL * Plus DBA URL:
http://database:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:
http://database:1158/em
\ ==========================================
Useful linux commands
df-h
ps-A
top
free
cat / proc / meminfo
uname
grep MemTotal / proc / meminfo
grep SwapTotal / proc / meminfo
hostname
Related Posts of Redhat as4 since the startup script under the oracle10g
-
ORACLE10G full version centos5 installed (the installation has passed)
ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...
-
SGA extended the principle of 32bit oracle
SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...
-
High Availability Oracle Flashback
Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...
-
An example of the use of TKPROF
First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE
-
Diagnosis and principles of order
SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...
-
ORACLE 10G dataguard configuration Step by Step
oracle dataguard













Leave a Reply