首先,通过SSH (Secure Shell Client) 连接 linux系统的服务器。
在SSH (Secure Shell Client )控制台上,输入如下命令:
(1)
su 命令
功能说明:变更用户身份
功能说明:变更用户身份
--切换到oracle身份
su - oracle
(2)
export 命令
功能说明:设置或显示环境变量
功能说明:设置或显示环境变量
--得到服务名为sss的数据库实例
export ORACLE_SID=xxx
注意:这里的"ORACLE_SID"必须是大写的!!!
(3)
sqlplus /nolog
--用sqlplus登录进去
sqlplus /nolog
注意:这里的"/"与"nolog"之间,没有空格!!!
(4)
conn /as sysdba
--以DBA的权限连接
conn /as sysdba
成功
控制台显示结果示例【英文】:
Connected to an idle instance.
控制台显示结果示例【中文】:
已连接到空闲例程。
(5)
startup
--启动ORACLE服务监听
startup
成功
示例【英文】:
ORACLE instance started.
Total System Global Area 939495424 bytes
Fixed Size 2218952 bytes
Variable Size 704644152 bytes
Database Buffers 226492416 bytes
Redo Buffers 6139904 bytes
Database mounted.
Database opened.
Fixed Size 2218952 bytes
Variable Size 704644152 bytes
Database Buffers 226492416 bytes
Redo Buffers 6139904 bytes
Database mounted.
Database opened.
示例【中文】:
ORACLE 例程已经启动。
Total System Global Area 822579200 bytes
Fixed Size 2217832 bytes
Variable Size 608176280 bytes
Database Buffers 205520896 bytes
Redo Buffers 6664192 bytes
数据库装载完毕。
数据库已经打开。
Fixed Size 2217832 bytes
Variable Size 608176280 bytes
Database Buffers 205520896 bytes
Redo Buffers 6664192 bytes
数据库装载完毕。
数据库已经打开。
失败
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/product/10g/dbs/initlaszf.ora'
LRM-00109: could not open parameter file '/oracle/product/10g/dbs/initlaszf.ora'
(6)
shutdown abort
--关闭ORACLE服务监听
shutdown abort