Oracle's simplest automatic startup with system ____oracle

Source: Internet
Author: User
Tags dba reserved

As the saying goes, the user is God, they sometimes ask a question very simple, just need a word, a minute will be done, but to our DBA, it may be at least half an hour or even half a month to meet his words, there is a better and faster way, I tell you this is some;

Let me just take an example, users usually need a database to be automatically started with the system for easy maintenance, but it will take at least half an hour for the DBA to configure the implementation. So after you finish reading this document today, you can finish the configuration from the start after he has said, very simple.

First, configure automatic

1. Add Startup Items
[Root@db01 ~]# cat >>/etc/rc.d/rc.local <<eof

Su-oracle-c "Lsnrctl Start"
Su-oracle-c "Sqlplus sys/oracle as Sysdba @/home/oracle/.script/.startup"
Su-oracle-c "Emctl start Dbconsole"
Eof


2. Create and edit startup files
[ROOT@DB01 ~] #su-oracle
[ROOT@DB01 ~] #mkdir-P/home/oracle/.script/

[Root@db01 ~]# cat >/home/oracle/.script/.startup <<eof
Startup
alter system register;
Exit 0
Eof

Second, restart verification:

Third, to determine whether the database and EM and monitoring have been up

# # #监听状态
[Oracle@db01 ~]$ lsnrctl Status

Lsnrctl for linux:version 11.2.0.3.0-production on 03-oct-2014 07:26:22

Copyright (c) 1991, Oracle. All rights reserved.

Connecting to (description= address= (PROTOCOL=IPC) (key=extproc1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 11.2.0.3.0-production
Start Date 03-oct-2014 07:13:54
Uptime 0 Days 0 hr. sec
Trace level off
Security On:local OS Authentication
SNMP off
Listener Parameter File/dbsoft/product/11.2.3/db_1/network/admin/listener.ora
Listener Log File/dbsoft/diag/tnslsnr/db01/listener/alert/log.xml
Listening Endpoints Summary ...
(Description= (address= (PROTOCOL=IPC) (key=extproc1521))
(Description= (address= (protocol=tcp) (HOST=DB01) (port=1521))
Services Summary ...
Service "Woo" has 1 instance (s).
Instance "Woo", Status READY, has 1 handler (s) for the This service ...
Service "Wooxdb" has 1 instance (s).
Instance "Woo", Status READY, has 1 handler (s) for the This service ...
The command completed successfully


# # #数据库状态
Sql> select Instance_name,host_name,status from V$instance;

Instance_n host_name STATUS
---------- ---------- ------------
Woo Db01 OPEN


# # #EM状态
[Oracle@db01 ~]$ emctl status Dbconsole
Oracle Enterprise Manager 11g Database Control release 11.2.0.3.0
Copyright (c) 1996, Oracle Corporation. All rights reserved.
Https://db01:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in Directory/dbsoft/product/11.2.3/db_1/db01_woo/sysman/log

So far we've decided that this can also be configured to start automatically, and it's simpler than the old method recommended by Oralce, and the old method looks like the following link:

Oracle automatically starts and shuts down with system under Linux (old method) http://www.linuxidc.com/Linux/2012-04/58143.htm

Oracle 11g Installation manual for the Redhat Linux 5.8_x64 platform http://www.linuxidc.com/Linux/2014-07/104745.htm

Install Oracle 12C notes under Linux-6-64 http://www.linuxidc.com/Linux/2013-07/86805.htm

Install Oracle 11GR2 (x64) under CentOS 6.4 http://www.linuxidc.com/Linux/2014-02/97374.htm

Oracle 11GR2 installation steps in VMware virtual machines http://www.linuxidc.com/Linux/2013-09/89579p2.htm

Install Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm under Debian

More Oracle related information see Oracle feature page http://www.linuxidc.com/topicnews.aspx?tid=12

This article permanently updates the link address : http://www.linuxidc.com/Linux/2014-10/107548.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.