• <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>

    Oracle Linux下啟動Oracle服務和監聽程序

    介紹在Oracle Linux 6中啟動oracle實例和監聽服務.這里注意,啟動任務時,需要使用oracle用戶,如果不是oracle用戶,使用su - oracle命令切換到oracle用戶。Oracle Linux 6;紅帽6.5;CentOS6.5操作相同。

    東西/原料

    • Oracle Linux 6;紅帽6.5;CentOS6.5
    • Oracle 11G已經安裝完當作
    • PL/SQL developer
    • vi

    方式/步調

    1. 1

      以oracle用戶登錄系統,若是是root用戶,利用su - oracle切換用戶

    2. 2

      以oracle用戶cd到oracle的bin目次,

      cd $ORACLE_HOME/bin,如下:

      [oracle@localhost ~]$ cd $ORACLE_HOME/bin

      [oracle@localhost bin]$ pwd

      /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin

      [oracle@localhost bin]$ 

    3. 3

      以nolog體例運行sqlplus,如下

      [oracle@localhost bin]$ sqlplus /nolog

      SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 26 14:02:52 2015

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

      SQL> 

    4. 4

      以sysdba毗連數據庫,如下

      SQL> conn /as sysdba

    5. 5

      輸入用戶名sys 和暗碼

    6. 6

      啟動數據庫實例,如下

      SQL> startup;

      期待半晌,比及database opened就是打開數據庫實例當作功了。

    7. 7

      利用號令shutdown abort  ;或者  shutdown immediate ; 封閉數據庫

    8. 8

      退出數據庫毗連,如下:

      SQL> exit

      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

    9. 9

      以oracle用戶cd到oracle的bin目次,

      cd $ORACLE_HOME/bin,如下:

      [oracle@localhost ~]$ cd $ORACLE_HOME/bin

      [oracle@localhost bin]$ pwd

      /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin

      [oracle@localhost bin]$ 

    10. 10

      啟動數據庫監聽辦事,如下:

      [oracle@localhost bin]$ lsnrctl start

      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-NOV-2015 14:07:10

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

      TNS-01106: Listener using listener name LISTENER has already been started

    11. 11

      若是oracle用戶的情況變量沒有設置裝備擺設,[oracle@localhost ~]$ vi .bash_profile,添加如下內容:

       .bash_profile

      # Get the aliases and functions

      if [ -f ~/.bashrc ]; then

              . ~/.bashrc

      fi

      # User specific environment and startup programs

      umask 022

      ORACLE_BASE=/home/oracle/app/oracle/

      export ORACLE_BASE

      ORACLE_HOEM=/home/oracle/app/oracle/product/11.2.0/dbhome_1/

      export ORACLE_HOME

      ORACLE_SID=orcl

      export ORACLE_SID

      LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH

      PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/lib:/usr/lib

      export PATH

      DISPLAY=localhost:0.0

      ~                                                                               

      ~                                                                               

      ~                                                                               

      ~                                                                               

      Type  :quit<Enter>  to exit Vim                               1,1           All

    注重事項

    • 利用 source .bash_profile號令,使情況變量設置裝備擺設立即生效
    • 發表于 2020-01-06 17:00
    • 閱讀 ( 827 )
    • 分類:其他類型

    你可能感興趣的文章

    相關問題

    0 條評論

    請先 登錄 后評論
    聯系我們:uytrv@hotmail.com 問答工具
  • <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>
    久久久久精品国产麻豆