(转)linux下启动oracle
原文地址:[url]http://blog.sina.com.cn/s/blog_56d8ea900100noxa.html[/url]
启动数据库实例,分为两步:第一步,启动监听;第二步,启动数据库实例。
一、如何启动数据库实例
1.进入到sqlplus启动实例
[oracle@redhat ~]$ su - oracle --“切换到oracle用户”
Password:
[oracle@redhat ~]$ lsnrctl start --“打开监听”
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-OCT-2009 19:06:40
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /home/oracle/product/10g/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /home/oracle/product/10g/network/admin/listener.ora
Log messages written to /home/oracle/product/10g/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat)(PORT=1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC2)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 14-OCT-2009 19:06:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/product/10g/network/admin/listener.ora
Listener Log File /home/oracle/product/10g/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat)(PORT=1522)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@redhat ~]$ sqlplus /nolog --“进入到sqlplus”
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 14 19:06:45 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba --“连接到sysdba”
Connected to an idle instance.
SQL> startup --“启动数据库实例”
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 88082024 bytes
Database Buffers 188743680 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> shutdown immediate --“关闭数据库实例”
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@redhat ~]$ lsnrctl stop --“关闭监听”
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-OCT-2009 19:08:06
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC2)))
The command completed successfully
2.用dbstart和dbshut启动和关闭数据库实例
先启动监听 lsnrctl start
启动实例 dbstart
使用dbstart命令启动数据库比较方便,但是在linux上安装好oracle之后,第一次使用dbstart命令可能会报如下错误:
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME
原因:
dbstart和dbshut脚本文件中ORACLE_HOME_LISTNER的设置有问题,分别打开两个文件找到:用vi编辑dbstart,ORACLE_HOME_LISTNER=$1,修改为
ORACLE_HOME_LISTNER=$ORACLE_HOME
然后保存退出,此时再运行dbstart,已经不报错了,但是没有任何反应,ps一下进程,没有oracle的进程,说明oracle实例没有正常启动。
此时的原因是在/etc/oratab的设置问题,我们vi一下,发现
zgz:/home/oracle/product/10g:N
最后设置的是"N"(我的环境中只有一个实例,因此只有一行配置语句),我们需要把“N”修改为“Y”。
以上的工作做好之后,dbstart就可以正常使用了:
[oracle@redhat bin]$ lsnrctl start --“启动监听”
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-OCT-2009 19:44:53
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /home/oracle/product/10g/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /home/oracle/product/10g/network/admin/listener.ora
Log messages written to /home/oracle/product/10g/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat)(PORT=1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC2)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 14-OCT-2009 19:44:53
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/product/10g/network/admin/listener.ora
Listener Log File /home/oracle/product/10g/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat)(PORT=1522)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@redhat bin]$ dbstart --“启动数据库实例”
Processing Database instance "zgz": log file /home/oracle/product/10g/startup.log
[oracle@redhat bin]$ dbshut --“关闭数据库实例”
[oracle@redhat bin]$ lsnrctl stop --“关闭监听”
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-OCT-2009 19:45:33
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC2)))
The command completed successfully
二、如何使数据库实例和linux系统一起启动
在/etc/rc.d/rc.local中加入如下语句即可实现同系统启动实例:
su - oracle -c "lsnrctl start"
su - oracle -c "dbstart"
(转)linux下启动oracle相关推荐
- linux 下停止监听程序,Linux下启动Oracle服务和监听程序步骤
Linux下启动Oracle服务和监听程序启动和关闭步骤整理如下: 1.安装oracle: 2.创建oracle系统用户: 3./home/oracle下面的.bash_profile添加几个环境变量 ...
- Linux 下 启动 Oracle
Linux 下 启动 oracle的命令行 在root目录下,依次执行以下命令 1. su - oracle 到oracle根目录下,载入环境变量等文件. 2. sqlplus ...
- oracle 启动 linux监听,Linux下启动Oracle服务和监听程序
$ su – oracle $ sqlplus / nolog sql> conn / as sysdba sql> startup #启动Oracle,需 ...
- mbk文件导入到oracle,linux下启动oracle
linux中启动oracle 主要分两步,一个是启动监听器,一个是启动数据库实例. (1).切换到oracle 用户:su - oracle (2).(如果配置环境变量可以省略该步骤)切换到orac ...
- linux下启动Oracle服务和监听程序
注:如果读者是出现监听无法启动 请参阅本人实录解决办法:http://blog.csdn.net/johnstrive/archive/2009/08/06/4418481.aspx Oracle数据 ...
- linu怎么启动oracle,请问该如何在LINUX下启动ORACLE?
手动启动: 用 oracle用户登录(或su - oracle) lsnrctl start sqlplus / as sysdba startup exit 自动启动,要编写一个启动脚本,用root ...
- linux下启动oracle服务
手动启动: 用 oracle用户登录(或su - oracle) lsnrctl start sqlplus / as sysdba startup exit
- linux下启动oracle
一.在sqlplus使用dba账登录oracle,启动实例,并加载数据库 1.conn /as sysdba; 2.startup nomount; 3.alter database mount; 4 ...
- Linux下启动Oracle数据库服务
$ su - oracle # sqlplus /nolog # conn / as sysdba # startup # quit # lsnrctl start
最新文章
- 灵玖软件大数据采集技术提高出版行业效率
- sqlserver2008r2数据库关联孤立账号的方法
- linux文件明明存在却无法vim打开_教你几招,让你vim编辑器变得友善起来(特别水,不要点进来)...
- BlockChain:Scene application区块链场景应用集合
- 2019ICPC(南昌) - Fire-Fighting Hero(最短路+思维)
- windows10系统如何设置标题栏显色
- Spring, Hibernate and Oracle Stored Procedures
- jsweet下载编译
- 20180810 多益网络模拟笔试
- 2021-08-01 武大账号访问知网
- GAN-评价指标IS以及FID、KID
- html5 contenteditable 可编辑属性
- 从零双排java之转换流
- 06-----the inferior stopped because it triggered an exception
- Vistual Studio Community 2017 30天许可证过期
- 修改Keil MDK的背景为黑底或护眼(绿色)
- html css 微信小程序,tailwindcss 支持微信小程序配置
- .NET c#音乐播放器
- 中国金融出版社出版的2016版《银行管理》
- JuiceFS 在数据湖存储架构上的探索
热门文章
- WiFi大师终极版本4.0.3源码已经上线
- 2022最新wifi大师,wifi分销小程序源码,亲测可用
- 妈妈计算机英语怎么说,妈妈的英语口语怎么说
- iask http //ishare iask sina com cn/download/explain php fil
- 浙江省计算机三级证书怎么查,浙江省计算机三级成绩怎么查询?
- 侠盗飞车猎车手破解版_侠盗猎车手有身份危机吗?
- 人身上最大的洞是什么?
- 手把手教学电信NB模组使用OneOS FOTA
- 百度 Apollo2.0
- Oracle processes和sessions参数(进程连接数会话连接数)