(1)启动第一个实例
[root@cst ~]# su - oracle
[oracle@cst ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on 星期三 11月 9 16:05:19
2016
Copyright (c) 1982, 2009, Oracle. All rights
reserved.
SQL> connect / as sysdba
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 1202556928 bytes
Fixed Size 2212816 bytes
Variable Size 671091760 bytes
Database Buffers 520093696
bytes
Redo Buffers 9158656
bytes
数据库装载完毕。
数据库已经打开。
[oracle@cst ~]$ cd /opt/commsoft/oracle/
[oracle@cst oracle]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on
09-11月-2016 16:06:57
Copyright (c) 1991, 2009, Oracle. All rights
reserved.
启动/opt/commsoft/oracle/app/oracle/bin/tnslsnr: 请稍候...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
系统参数文件为/opt/commsoft/oracle/app/oracle/network/admin/listener.ora
写入/opt/commsoft/oracle/app/diag/tnslsnr/cst/listener/alert/log.xml的日志信息
监听:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cst)(PORT=1521)))
正在连接到
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cst)(PORT=1521)))
LISTENER 的 STATUS
------------------------
别名 LISTENER
版本 TNSLSNR for Linux: Version
11.2.0.1.0 - Production
启动日期 09-11月-2016
16:06:57
正常运行时间 0 天 0 小时 0 分 0 秒
跟踪级别 off
安全性 ON: Local OS Authentication
SNMP OFF
监听程序参数文件 /opt/commsoft/oracle/app/oracle/network/admin/listener.ora
监听程序日志文件 /opt/commsoft/oracle/app/diag/tnslsnr/cst/listener/alert/log.xml
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cst)(PORT=1521)))
监听程序不支持服务
命令执行成功
(2)启动第二个实例
[oracle@cst oracle]$ su - root
口令:
[root@cst ~]# cd /home/oracle/
[root@cst oracle]# vi .bash_profile(i 修改 ESC加:wq保存退出)
[root@cst oracle]# cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/opt/commsoft/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle
export ORACLE_SID=ykt198
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS32GB18030'
export LANG=zh_CN.GB18030
[root@cst oracle]# source .bash_profile
[root@cst oracle]# su - oracle
[oracle@cst ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on 星期三 11月 9 16:25:03
2016
Copyright (c) 1982, 2009, Oracle. All rights
reserved.
SQL> conn /as sysdba
已连接到空闲例程。
SQL> startup
exORACLE 例程已经启动。
Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 1241516144 bytes
Database Buffers 352321536
bytes
Redo Buffers 7360512
bytes
数据库装载完毕。
数据库已经打开。
SQL> exit