b. service Oracle stop
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@ORS ~]$ logout
[root@ORS ~]# service oracle stop
Stoping Oracle Listeners ...
Done.
Stoping Oracle Databases ...
Done.
[root@ORS ~]# su - oracle
[oracle@ORS ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 26 20:17:20 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> set linesize 300;
SQL> set pagesize 30;
SQL> select * from scott.emp;
select * from scott.emp
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL>
c. service oracle start
SQL> Disconnected
[oracle@ORS ~]$ logout
[root@ORS ~]# service oracle start
Starting Oracle Databases ...
Done
Starting Oracle Listeners ...
Done.
[root@ORS ~]#
d. service oracle restart
[root@ORS ~]# service oracle restart
Stoping Oracle Listeners ...
Done.
Stoping Oracle Databases ...
Done.
Starting Oracle Databases ...
Done
Starting Oracle Listeners ...
Done.
[root@ORS ~]#
至此,Oracle服务启动&停止脚本与开机自启动设置完毕。
CentOS 6.3(x32)下安装Oracle 10g R2