Linux下启动Oracle数据库
2014-10-09 10:03
148 查看
启动数据库实例,分为两步:第一步,启动监听;第二步,启动数据库实例。
打开监听
进入到sqlplus
通过sysdba连接
启动数据库实例
关闭数据库实例
退出sql
关闭监听
启动实例
使用dbstart命令,需要指定变量ORACLE_HOME_LISTNER,此处等于ORACLE_HOME,可以在dbstart和dbshut脚本文件中,修改变量ORACLE_HOME_LISTNER的值。
ORACLE_HOME_LISTNER=$1,修改为
ORACLE_HOME_LISTNER=$ORACLE_HOME。
修改后再执行./dbstart
进入到sqlplus启动实例
切换到oracle用户[oracle@aiezfs bin]$ su - oracle
打开监听
[oracle@aiezfs bin]$ ./lsnrctl start LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 07-OCT-2014 15:41:02 Copyright (c) 1991, 2013, Oracle. All rights reserved. Starting /home/oracle/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 12.1.0.1.0 - Production System parameter file is /home/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora Log messages written to /home/oracle/app/oracle/diag/tnslsnr/aiezfs/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production Start Date 07-OCT-2014 15:41:04 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/aiezfs/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))) The listener supports no services The command completed successfully
进入到sqlplus
[oracle@aiezfs bin]$ ./sqlplus /nolog SQL*Plus: Release 12.1.0.1.0 Production on Tue Oct 7 15:41:30 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved.
通过sysdba连接
SQL> conn / as sysdba Connected to an idle instance.
启动数据库实例
SQL> startup ORACLE instance started. Total System Global Area 4.0486E+10 bytes Fixed Size 4658128 bytes Variable Size 5368712240 bytes Database Buffers 3.5031E+10 bytes Redo Buffers 82210816 bytes Database mounted. Database opened.
关闭数据库实例
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
退出sql
SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
关闭监听
[oracle@aiezfs bin]$ ./lsnrctl stop LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 07-OCT-2014 16:39:54 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) The command completed successfully
通过dbstart和dbshut启动和关闭数据库
启动监听 lsnrctl start,同上启动实例
[oracle@aiezfs bin]$ ./dbstart ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener Usage: ./dbstart ORACLE_HOME
使用dbstart命令,需要指定变量ORACLE_HOME_LISTNER,此处等于ORACLE_HOME,可以在dbstart和dbshut脚本文件中,修改变量ORACLE_HOME_LISTNER的值。
ORACLE_HOME_LISTNER=$1,修改为
ORACLE_HOME_LISTNER=$ORACLE_HOME。
修改后再执行./dbstart
相关文章推荐
- linux下oracle数据库服务和监听的启动停止
- 在Linux上自动启动和关闭Oracle数据库(9i/10g/11g)
- linux开机自动启动ORACLE数据库
- 在linux系统下,Oracle数据库开机后自动启动
- linux平台启动关闭oracle数据库
- 启动Linux 的时候实现oracle数据库与Tomcat web服务器与操作系统一同关闭与启动
- Linux下Oracle数据库的启动、关闭和数据字典的利用
- 介绍Windows/Linux下Oracle数据库进程如何启动和关闭
- linux启动关闭oracle数据库
- Linux下启动Oracle数据库
- Linux自动启动Oracle数据库
- 在Linux下怎样手动启动Oracle数据库
- Linux/UNIX环境下Oracle数据库多实例开机启动脚本
- linux平台启动关闭oracle数据库
- linux 下启动oracle数据库
- linux下启动oracle数据库实例的脚本
- linux下oracle数据库服务和监听的启动停止
- Linux下启动Oracle数据库
- oracle]linux平台启动关闭oracle数据库
- linux 下启动oracle数据库