青岛茶叶网站建设,图片站wordpress,济宁网站建设公司公司,搜索引擎外部优化有哪些渠道环境:centos 6.5 oracle 11g自启动之前问题虚拟机里的oracle环境#xff0c;每次重启完系统#xff0c;用plsql developer连接#xff0c;先是报错:无TNS监听程序解决方法是切换到系统的oracle用户#xff0c;执行lsnrctl start#xff0c;但是执行之前#xff0c;因为O…环境:centos 6.5 oracle 11g自启动之前问题虚拟机里的oracle环境每次重启完系统用plsql developer连接先是报错:无TNS监听程序解决方法是切换到系统的oracle用户执行lsnrctl start但是执行之前因为ORACLE_HOME环境变量没有生效还要是环境变量文件生效步骤如下:[oraclelocalhost ~]$source .bash_profile[oraclelocalhost ~]$echo $ORACLE_HOME/home/oracle/app/oracle/product/11.2.0/dbhome_1[oraclelocalhost ~]$lsnrctl start启动完成后再次连接又报错:oracle没有启动。启动步骤如下:[oraclelocalhost ~]$ sqlplus /nologsql*Plus: Release 11.2.0.1.0 Production on Wed Oct 19 14:29:10 2016Copyright (c) 1982,2009,Oracle. All rights reserved.sql conn / as sysdbaConnected to an idle instance.sql startupORACLE instance started.Total System Global Area 776646656 bytesFixed Size 2217384 bytesVariable Size 490736216 bytesDatabase Buffers 281018368 bytesRedo Buffers 2674688 bytesDatabase mounted.Database opened.配置自启动下面把上述过程都配置成开机启动。环境变量生效可能是因为我的oracle用户不是桌面登录的是从终端su切换过来的.bash_profile文件没有运行。我把文件里的内容写入.bashrc文件后重启就可以了。TNS监听以及oracle服务自启动编辑: /etc/oratab文件把最后一行的N改成Y# 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.##orcl:/home/oracle/app/product/11.2.0/dbhome_1:Y路径可能不同编辑 /etc/rc.local 文件,增加 最后两行:#!/bin/sh## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you dont# want to do the full Sys V style init stuff.touch /var/lock/subsys/localservice smb restartsu - oracle -c lsnrctl startsu - oracle -c dbstartsu - oracle -c emctl start dbconsoledbstart是数据库自带的启动脚本我们只要加到rc.local中让它开机调用就可以了。但是还需要编辑一下它。修改dbstart的ORACLE_HOME_LISTNER使其指向$ORACLE_HOME:# First argument is used to bring up OracleNet ListenerORACLE_HOME_LISTNER$ORACLE_HOME重启虚拟机发现plsql developer可以直接连接上了。