1.启动服务
2.启动监听
3.关闭监听
4.关闭服务
[latte@tea ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 12.1.0.2.0 Production on Mon Jul 20 06:54:30 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
#启动服务
SQL> startup(启动时如果报错参考: http://xiongjiajia.iteye.com/blog/2232085)
ORACLE instance started.
Total System Global Area 1577058304 bytes
Fixed Size 2924832 bytes
Variable Size 1023413984 bytes
Database Buffers 536870912 bytes
Redo Buffers 13848576 bytes
Database mounted.
Database opened.
===========================================================================
#启动监听
[latte@tea ~]$ lsnrctl start
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 20-JUL-2015 06:56:31
Copyright (c) 1991, 2014, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
#测试查询
select * from dba_users;
===========================================================================
#停止监听
[latte@tea ~]$ lsnrctl stop
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 20-JUL-2015 06:59:12
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=tea)(PORT=1521)))
The command completed successfully
===========================================================================
停止服务
SQL> shutdown
或者
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.