日期:2014-05-16  浏览次数:20586 次

linux学习笔记之五:oracle
一、启动oracle服务
以oracle用户登录linux,可以在/etc/passwd中查看到有没有oracle用户
如果不知道oracle用户密码,可以以root账号进行重置。
#:passwd oracle

oracle用户登录后执行:
sqlplus / nolog //进入sqlshell
SQL> conn /as sysdba
SQL>startup

二、关闭oracle服务
由上面的方式进入sql shell
SQL>shutdown immediate


三、监听
如果连接时出现:TNS:无监听程序
lsnrctl start

四、监听和服务自动启动
1、修改/etc/oratab
orcl:/opt/oracle/product/10R2:Y


2、修改/etc/sysconfig/oracle
START_ORACLE_DB="yes"

## Path:        Productivity/Databases/Tools/Oracle/DB
## Type:        yesno
## Default:     no
#
# Enable clients on other computers to connect to the database
#
START_ORACLE_DB_LISTENER="yes"