资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

oracle开机怎么启动,oracle开机自动启动

如何配置oracle数据库开机自己启动

在命令行输入services.msc,打开服务界面如下:

创新互联坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都网站设计、网站制作、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的石龙网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

找到ORACLE的两个服务,双击设为自动,开机就可以自己启动了。

如何在Linux中设置开机自动启动oracle

对于LINUX 操作系统 有很多技术知识是我们需要学习的。这里我就给大家介绍Linux中设置oracle开机自动启动的 方法 。一起来看看吧。

Linux中设置oracle开机自动启动的方法

在terminal中切换到root用户

查看/etc/oratab文件的内容,其内容如下

[root@golonglee ~]# cat /etc/oratab | grep -v ^$

#

# This file is used by ORACLE utilities. It is created by root.sh

# and updated by the Database Configuration Assistant when creating

# a database.

# A colon, ':', is used as the field terminator. A new line terminates

# the entry. Lines beginning with a pound sign, '#', are comments.

#

# Entries are of the form:

# $ORACLE_SID:$ORACLE_HOME::

#

# The first and second fields are the system identifier and home

# directory of the database respectively. The third filed indicates

# to the dbstart utility that the database should , "Y", or should not,

# "N", be brought up at system boot time.

#

# Multiple entries with the same $ORACLE_SID are not allowed.

#

#

oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N

使用命令vi /etc/oratab编辑文件/etc/oratab,在最后添加如下内容

##### what I have written is as following

oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Y

#####Finished wrote in 2015-12-24

说明:/home/oracle/app/oracle/product/11.2.0/dbhome_1为oracle的安装目录,要根据实际情况进行修改。

(注意:图中我用红色标记的N要改成Y)

找到最后的内容

oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N

复制该行oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N并注释掉

粘贴该行,并将该行

oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N最后的N

改为Y

最后按2次ESC键,并输入:wq并按下enter保存,退出

使用命令vi /etc/rc.d/rc.local编辑rc.local文件,添加如下内容

##### what I have written is as following

su oracle -lc "/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"

su oracle -lc /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart

#####Finished wrote in 2015-12-24

说明:因为第一行命令中有空格所以用双引号(英文的双引号)

/home/oracle/app/oracle/product/11.2.0/dbhome_1为oracle的安装目录,要根据实际情况进行修改。

最后按2次ESC键,并输入:wq并按下enter保存,退出,重启机器,验证成功。

是不是很简单呢~快跟着我一起学习吧!!!如果觉得这篇 文章 不错的话就给我点一个赞吧。

如何启动oracle

1、打开命令行窗口界面,可以同时按住逗ctrl+R地键,在弹出来的运行窗口中输入cmd。2、启动oracle服务,在命令行窗口中输入逗netstartoracleserviceXXXX地后面的XXXX实际是需要根据您自己的数据库实例名进行替换。如果您不知道,可以看下逗计算机管理地界面下的服务中,能不能找到服务名类似的服务。提示逗服务已经启动成功地就说明服务启动起来了。3、启动监听程序,在命令行窗口输入lsnrctlstart,等到提示逗命令执行成功地就可以了。4、接下来就开始加载数据库实例了。在命令行窗口输入逗sqlplus/assysdba地登录到一个空闲的例程。5、登录完成后,输入逗startup地。这个过程可能有点慢,直到出现逗数据库已经打开地则表示实例启动成功了。6、测试一下把,随便连接一个数据库用户,如果提示逗连接成功地则说明数据库服务现在可以正常使用了。注意事项如果操作过程中提示逗监听已经启动地,逗服务已经运行地等,则可以跳过相应步骤,继续执行。

oracle开机自启动

1) 建立用户, 组, 目录

[root@node1 ~]# id oracle

id: oracle: No such user

[root@node1 ~]# groupadd -g 54321 oinstall

[root@node1 ~]# groupadd -g 54322 dba

[root@node1 ~]# useradd -u 54321 -g oinstall -G dba oracle

[root@node1 ~]# passwd oracle

Changing password for user oracle.

New password:

BAD PASSWORD: it is based on a dictionary word

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokens updated successfully.

[root@node1 ~]# mkdir -p /u01/app/oracle

[root@node1 ~]# chown -R oracle:oinstall /u01/

2) 环境变量

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export ORACLE_SID=ora11g

export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

LANG=C

3) Cat /etc/sysctl.conf

kernel.shmmax = 4294967295

kernel.shmall = 2097152

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default=1048576

net.core.rmem_max=4194304

net.core.wmem_default=262144

net.core.wmem_max=1048576

fs.aio-max-nr=1048576

4) oracle 开机自启

[root@node1 ~]# cp /etc/init.d/network /etc/init.d/oracle

[root@node1 ~]# vim /etc/init.d/oracle

[root@node1 ~]# chmod +x /etc/init.d/oracle

[root@node1 ~]# chkconfig oracle on

[root@node1 ~]# cat /etc/init.d/oracle

[oracle@node1 auto_backup]$ cat /etc/init.d/oracle

#! /bin/bash#

chkconfig: 2345 10 90

#

Source function library.

. /etc/init.d/functions

# See how we were called.

case "$1" in

start)

su - oracle -c "/home/oracle/startdb11g"

;;

stop)

su - oracle -c "/home/oracle/stopdb11g"

;;

*)

echo #34;Usage: $0 {start|stop}"

exit 2

esac

exit $rc

[oracle@node1 auto_backup]$ chkconfig oracle on


本文标题:oracle开机怎么启动,oracle开机自动启动
路径分享:http://cdkjz.cn/article/phjgpd.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220