Oralcle 10g Fedora Core X上快速安装指南(5) Database opened. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options [oracle@fedora oracle]$ Start Enterprise manager server: [oracle@fedora oracle]$ emctl start dbconsole 4.2. Stopping database services Stop Enterprise manager server: [oracle@fedora oracle]$ emctl stop dbconsole You can stop the database via dbshut utility: [oracle@fedora oracle]$ dbshut or via SQL*Plus: [oracle@fedora oracle]$ sqlplus / as sysdba
SQL*Plus: Release 10.1.0.2.0 - Production on Sat Feb 21 18:11:23 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options [oracle@fedora oracle]$ Stop TNS listener: [oracle@fedora oracle]$ lsnrctl stop 4.3 Automating oracle startup and shutdown To automatically start/shut oracle database during system startup/shutdown you need to write a script in /etc/rc.d/init.d directory. You can view or Download an example script. Copy the script to /etc/rc.d/init.d as root user, edit environment variables to match your settings and modify its permissions: [root@fedora root]# chown root.root /etc/rc.d/init.d/ora10 [root@fedora root]# chmod 755 /etc/rc.d/init.d/ora10 The script I wrote uses chkconfig utility to simplify service management. It is configured to start oracle services in runlevels 3 and 5,with start priority 95 and stop priority 1. Initialize new service: [root@fedora root]# chkconfig ora10 reset [root@fedora root]# chkconfig --list ora10