1、启动oracle的步骤

1、启动oracle的步骤

Linux下启动oracle分为以下两步:

  • 1.1、启动lsnrctl监听。
  • 1.2、启动数据库实例。

2、启动oracle监听

首先登陆服务器,切换到oracle用户。

[admin@dataserver ~]$ su - oracle
密码:
[oracle@dataserver ~]

接下来,检查oracle监听器运行状态,通过lsnrctl status命令查看。

[oracle@dataserver ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-4月 -2016 14:39:39

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=30.85.227.24)(PORT=1521)))
TNS-12543: TNS:destination host unreachable
 TNS-12560: TNS:protocol adapter error
  TNS-00513: Destination host unreachable
   Linux Error: 113: No route to host
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=30.85.227.23)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@dataserver

上述反馈的结果即为oracle监听没有启动,下面执行启动监听,通过命令lsnrctl start,结果如下:

[oracle@dataserver ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-4月 -2016 14:51:06

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dataserver/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=30.85.227.24)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
 TNS-12560: TNS:protocol adapter error
  TNS-00515: Connect failed because target host or object does not exist
   Linux Error: 99: Cannot assign requested address

Listener failed to start. S

 
上述反馈为监听启动失败,是因为其监听的IP30.85.227.24,并非服务器的IP,所以需要调整这个IP为服务器当前的IP。

在oracle用户下,进入目录/u01/app/oracle/product/11.2.0/dbhome_1/network/admin,修改listener.ora文件。注意这个目录因具体服务器而异。 

listener.ora文件打开,内容如下,调整其中的HOST IP即可。

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 30.85.227.28)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 30.85.227.23)(PORT = 1521))
    )

  )

ADR_BASE_LISTENER = /u01/app/oracle

调整完监听IP后,重启监听器,执行lsnrctl start,

[oracle@dataserver admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-4月 -2016 15:09:15

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dataserver/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=30.85.227.28)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=30.85.227.23)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                15-4月 -2016 15:09:15
Uptime                    0 days 0 hr. 0 min. 5 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/dataserver/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=30.85.227.28)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=30.85.227.23)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@dataserver admin]$

至此,oracle监听器启动成功!

3、启动oracle实例

以system用户身份登陆oracle

[oracle@dataserver admin]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 4月 15 15:23:04 2016

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

SQL> conn as sysdba
Enter user-name: system
En

然后启动实例,通过startup命令:

SQL> startup
ORACLE instance started.

Total System Global Area 4.0620E+10 bytes
Fixed Size          2216024 bytes
Variable Size        2.3354E+10 bytes
Database Buffers     1.7180E+10 bytes
Redo Buffers           84054016 bytes
Database mounted.
Database opened.
SQL>8

4、关闭oracle实例

通过shutdown命令关闭oracle实例。

SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> 

来自为知笔记(Wiz)

时间: 2024-09-28 23:08:49

1、启动oracle的步骤的相关文章

Linux下启动Oracle服务和监听程序

注:如果读者是出现监听无法启动 请参阅本人实录解决办法:http://blog.csdn.net/johnstrive/archive/2009/08/06/4418481.aspx Oracle数据库是重量级的,其管理非常复杂,将其在Linux平台上的启动和关闭步骤整理一下. 安装完毕oracle以后,需要创建oracle系统用户,并在/home/oracle下面的.bash_profile添加几个环境变量:ORACLE_SID,ORACLE_BASE,ORACLE_HOME.比如: expo

Oracle 安装步骤

目录 Oracle 安装步骤 一.安装流程 二.登录流程 三.新建数据库 四.图形化连接 Oracle 安装步骤 一.安装流程 解压oracle 11g两个压缩文件 点击安装,修改目录,新建一个文件夹,叫oracle,复制进去,其他不用修改,直接安装 VSS Writer停用,手动 RecoveryService 停用,手动 Listener和Orcl都是手动 二.登录流程 1.启动sql plus sqlplus /nolog 2.连接,以dba的身份连接到orcl数据库 conn sys/[

启动Oracle时提示:ORA-01078:failure in processing system parameters

一.使用环境操作系统:CentOS release 6.2 (Final) 数据库:Oracle 12g数据库主目录:/ora12/product/product/12.1.0/db_1 二.问题描述 用sys用户登录sqlplus后,用startup命令启动Oracle时提示:ORA-01078:failure in processing system parametersLRM-00109: could not open parameter file '/ora12/product/prod

linux下启动oracle

1.使用liunx终端连接到服务器 2.root帐户切换到oracle帐户:su - oracle 3.手动启动oracle  (先开启实例,再开启监听) 1)启动数据库实例: sqlplus / as sysdba startup exit 2)启动监听 lsnrctl start exit 到此,oracle已完成启动. 4.使用pl/sql developer连接数据库 username: password: database: connect as: 5.linux下关闭数据库  (先关

LINUX启动ORACLE监听和服务

可通过secureCRT或者telnet直接连 启动监听命令:lsnrctl start 成功启动后:sqlplus /nolog 回车 conn / as sysdba 回车 startup 回车 select * from user_tables; 回车 有结果,ok 启动监听和服务成功 附由于无服务导致的错误: 关于ORA-01034和ORA-27101的一种解决方法 1 先看oracle的监听和oracle的服务是否都启动了.启动oracle监听:cmd的命令行窗口下,输入lsnrctl

linux下启动oracle服务命令

以redflag(redhat /centos)linux下的 oracle 10g 为例: 如果oracle安装和配置都没有问题的话: 依次执行以下代码即可启动oracle服务. #su - oracle $sqlplus / as sysdba >startup >exit $lsnrctl start $ps -ef|grep oracle ps -ef|grep oracle为查看oracle服务,如果现实列表服务一般表示oracle服务已经启动.

CentOS6.3 下启动Oracle service和listener

一.启动Oracle数据库和监听器 首先切换到Oracle专有用户: [[email protected] ~]# su - oracle [[email protected] ~]$ 1.启动数据库: [[email protected] ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Wed Sep 3 08:48:19 2014 Copyright (c) 1982, 2009, Oracle. All right

如何利用JDBC启动Oracle 自动追踪(auto trace)

有时我们需要对执行SQL的具体执行过程做一个追踪分析,特别是在应用程序性能优化的时候.Oracle两个工具可以帮助我们做好性能分析,一个是SQL_TRACE,一个是SESSION_EVENT.SQL_TRACE跟踪SQL执行过程,如解析时间.执行时间.查询时间等:SESSION_EVENT跟踪执行过程的等待事件,如等待客户端响应时间,等待本地磁盘IO事件等等. 开启Oracle自动追踪必须使用DBA权限. 使用JDBC开启SQL_TRACE的方法: conn.prepareStatement("

11i REP-3000: 启动 Oracle Toolkit 时发生内部错误.

+---------------------------------------------------------------------------+ 应用对象程序库: Version : 11.5.0 - Development Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved. FNDCPPGD_XML module: 并发程序详细资料报表 - Oracle XML Publisher +---------