[root@root~]$ su - oracle
[oracle@localhost~]$ sqlplus
Connected to an idle instance.
enter username: /as sysdba
SQL>startup------------------启动数据库实例
Oracle instance started.
Total System Global Area *****bytes
Fixed Size *****bytes
Variable Size *****bytes
Database Buffers *****bytes
Redo Buffers *****bytes
Database mounted.
Database opened.
这样就能用啦
如果没有监听。则需要进行
命令找不到,一定是环境变量没有配置对,或者由于没有正常关闭数据库造成的。我的操作:
export PATH=/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin:$PATH
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
使用oracle用户临时配置上这三个环境变量,就可以正常的 lsnrctl start 启动监听。
$ sqlplus /nolog //登录sqlplus
SQL> connect /as sysdba //连接oracle
SQL> startup //启动数据库
1、手动启动
dbstart /u01/app/oracle/product/11.2.0/dbhome_1 (ORACLE_HOME)
2、停止数据库
dbshut /u01/app/oracle/product/11.2.0/dbhome_1 (ORACLE_HOME)
3、启动监听:
lsnrctl start
4、若无ora_**_**相关的进程,则oracle数据库实例未启动
ps aux | grep ora_
5、若无任何显示,则监听器未启动
netstat -tlnup | grep 1521
6、查看监听器状态
lsnrctl status
7、若无任何显示,则EM未启动
netstat -tlnup | grep 1158
8、查看EM状态
emctl status dbconsole
需chkconfig add 添加为系统服务
9、启动Oracle服务
service oracle11g start
10、停止Oracle服务
service oracle11g stop
11、控制台(emtcl)
sqlplus / as sysdba