zoukankan      html  css  js  c++  java
  • Linux下启动/关闭Oracle

    一、Linux下启动Oracle

      Linux下启动Oracle分为两步:

      1)启动监听;

      2)启动数据库实例;

    1.登录服务器,切换到oracle用户,或者以oracle用户登录

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

    2.打开监听服务

    [oracle@localhost ~]$ lsnrctl start

    可以通过lsnrctl status命令查看Oracle监听器运行状况

    [oracle@localhost ~]$ lsnrctl status
    

    3.以SYS用户身份登录Oracle

    复制代码
    [oracle@localhost ~]$ sqlplus /nolog
    
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Dec 1 23:29:19 2017
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    SQL> conn /as sysdba
    Connected to an idle instance.
    复制代码

    切换用户:

    CONN 用户名/密码 [AS SYSDBA],如果是sys用户一定要写上AS SYSDBA

    4.通过startup命令启动实例

    复制代码
    SQL> startup
    ORACLE instance started.
    
    Total System 
    ... ...
    Database mounted. Database opened. SQL>
    复制代码

    二、Linux下关闭Oracle

    1.关闭数据库实例

    复制代码
    SQL> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    复制代码

    2.关闭监听器

    [oracle@localhost ~]$ lsnrctl stop
  • 相关阅读:
    Zstack中任务,事件,消息之间的关系
    Zigbee折腾之旅:(一)CC2530最小系统
    计算机中原码,反码,补码之间的关系
    Python3
    Python3
    Python3
    【基础】强软弱虚引用
    SpringBoot上传文件时MultipartFile报空问题解决方法
    Mockito中的@Mock和@Spy如何使用
    Vim 多行剪切、复制和删除
  • 原文地址:https://www.cnblogs.com/lcword/p/14979917.html
Copyright © 2011-2022 走看看