“天街小雨润如酥,草色遥看近却无。最是一年春好处,绝胜烟柳满皇都。”读一首古诗,心情也随之平静下来

Linux下oracle10g的安装与配置及相关问题解决方案(七)

上一篇 / 下一篇  2010-12-30 16:56:35 / 天气: 晴朗 / 心情: 高兴 / 精华(1) / 置顶(1) / 个人分类:数据库

第四部分Oracle的使用

4.1配置oracle的环境变量

[oracle@localhost ~]$export ORACLE_BASE=/home/mytools/programs/oracle/u01/app/oracle
[oracle@localhost ~]$export ORACLE_SID=ORCL
[oracle@localhost ~]$export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
[oracle@localhost ~]$export PATH=$PATH:$ORACLE_HOME/bin

4.2启动和关闭Oracle数据库

[oracle@localhost ~]$ su oracle

[oracle@localhost ~]$ sqlplus system/system as sysdba

 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 29 23:45:16 2010

 

Copyright (c) 1982, 2005, Oracle. All rights reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

oracle已经启动,可正常访问,或者采用如下方式启动)

$sqlplus
 
SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 22:27:48 2004
 
Copyright (c) 1982, 2004, Oracle.All rights reserved.
 
Enter user-name:/ as sysdba
Connected to an idle instance.
 
SQL>startup启动oracle数据库实例

 

SQL>shutdown immediate关闭oracle数据库实例
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>exit

 

4.3启动和停止Oracle Enterprise Manager数据库控制

$emctl start dbconsole
$emctl stop dbconsole
(说明:必须启动dbconsole才能访问http://localhost.localdomain:1158/em

4.4启动和停止iSQL*Plus

$isqlplusctl start
$isqlplusctl stop

(说明:只有启动了isqlplusctl才可以使用url的形式访问,同时如果linux系统中iptables是开启状态的话,需要将5560的端口添加到开放列表中方可在其他机器上访问

http://localhost.localdomain:5560/isqlplus

4.5启动和停止监听器

监听器接受客户端的连接请求,并在验证证书后创建数据库连接。要使用OEMiSQL*Plus,必须先启动监听器。

$lsnrctl start
$lsnrctl stop

 

第五部分Oracle的卸载

5.1 运行$ORACLE_HOME/bin/localconfig delete

5.2 rm -rf $ORACLE_BASE/*

5.3 rm -f /etc/oraInst.loc /etc/oratab

5.4 rm -rf /etc/oracle

5.5 rm -f /etc/inittab.cssd

5.6 rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv

5.7 删除oracle用户和组。

 

参考文档:http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html


TAG: 问题 Linux linux Oracle oracle 安装 解决方案

 

评分:0

我来说两句

Open Toolbar