日期:2014-05-16  浏览次数:20566 次

Linux下启动Oracle服务和监听程序
安装完毕oracle以后,需要创建oracle系统用户,并在/home/oracle下面的.bash_profile添加几个环境变量:ORACLE_SID,ORACLE_BASE,ORACLE_HOME。比如:
export ORACLE_SID=test export ORACLE_BASE=oracle_install_dir export ORACLE_HOME=xxx



1、启动数据库:
oracle@suse92:~> sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Jan 20 02:29:37 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 135352820 bytes
Fixed Size 455156 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 679936 bytes
Database mounted.


2、关闭数据库:
oracle@suse92:~> sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Jan 20 02:29:37 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> shutdwon abort;


3、启动监听器
oracle@suse92:~> lsnrctl start


4、停止监听器
oracle@suse92:~> lsnrctl stop


5、查看监听器状态
  lsnrctl">oracle@suse92:~>lsnrctl
  LSNRCTL> status
  LSNRCTL> exit
linux下oracle 10G启动EM和isqlplus2008年09月26日 星期五 下午 03:18注:
$ORACLE_HOME为oracle的安装路径
1,使用EM(enterprise managment)
1.1启动EM
$ORACLE_HOME/bin/emctl start dbconsole
如果出现下面相关信息,说明服务启动
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.1.0.3.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
http://localhost.localdomain:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ................................. started.
1.2使用EM
在浏览器地址中输入如下地址:
http://localhost.localdomain:5500/em/console/
如果不出现登录对话页面,请确保你的数据库服务与监听服务正常启动了
注意:如果监听程序不启动,可以通过sqlplus登录,但在此页面中不能正常显示.
现在你就可以正常使用EM了!
2,使用isqlplus
2.1启动isqlplus
$ORACLE_HOME/bin/isqlplusctl start
如果出现如下信息,说明正常启动.
iSQL*Plus 10.1.0.3.0
Copyright (c) 2004 Oracle. All rights reserved.
Starting iSQL*Plus ...
iSQL*Plus started.
2.2使用isqlplus
在浏览器地址中输入如下地址:
http://localhost.localdomain:5560/isqlplus/
这样就出现了isqlplus的登录界面,就可使用isqlplus 了
Oracle Enterprise Manager无法启动,重新配置2008年09月26日 星期五 下午 02:50今天
碰到ORACLE EM 无法启动的问题,可能是IP更改了的原因,所以我使用了EMCA命令重
新配置了一下ORACLE EM,具体过程如下:$emca -config dbcontrol db -repos recreateEMCA
开始于 2007-10-12 11:16:40
EM Configuration Assistant 10.2.0.1.0 正式版
版权所有 (c) 2003, 2005, Oracle。保留所有权利。输入以下信息:
数据库 SID: orcl
已为数据库 orcl 配置了 Database Control
您已选择配置 Database Control, 以便管理数据库 orcl
此操作将移去现有配置和默认设置, 并重新执行配置
是否继续? [yes(Y)/no(N)]: y
监听程序端口号: 1521
SYS 用户的口令:
DBSNMP 用户的口令:
SYSMAN 用户的口令:
SYSMAN 用户的口令: 通知的电子邮件地址 (可选):
通知的发件 (SMTP) 服务器 (可选):
-----------------------------已指定以下设置数据库
ORACLE_HOME ................ e:/oracle/product/10.2.0/db_1数据库主机名 ................
hailang.mshome.net
监听程序端口号 ................ 1521
数据库 SID ................ orcl
通知的电子邮件地址 ...............
通知的发件 (SMTP) 服务器 ...............-----------------------------
是否继续? [yes(Y)/no(N)]: y
2007-10-12 11:17:32 oracle.sysman.emcp.EMConfig perform
信息: 正在将此操作记录到 e:/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2007-
2007-10-12 11:17:37 oracle.sysman.emcp.util.DBControlUtil stopOMS
信息: 正在停止 Database Control (此操作可能需要一段时间)...
2007-10-12 11:17:40 oracle.sysman.emcp.EMReposConfig dropRepository
信息: 正在删除 EM 资料档案库 (此操作可能需要一段时间)...
2007-10-12 11:24:23 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功删除资料档案库
2007-10-12 11:24:24 oracle.sysman.emcp.EMReposConfig createRepository
信息: 正在创建 EM 资料档案库 (此操作可能需要一段时间)...
2007-10-12 11:34:36 oracle.sysman.emcp.EMRep