zoukankan      html  css  js  c++  java
  • 启动ASM 数据库的步骤

    1,启动ASM 数据库的步骤
    由于启动ASM 数据库必须要先启动ASM 实例,所以基本上启动步骤如下。
    1. 以oracle 用户进入操作系统
    2. $ export ORACLE_SID=+ASM
    3,
    [oracle@Rm-DevDB ~]$ sqlplus

    SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 16 16:55:02 2010

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

    Enter user-name: /as sysdba
    Connected to an idle instance.

    SQL>
    4. SQL> startup
    SQL> startup
    ASM instance started

    Total System Global Area  130023424 bytes
    Fixed Size                  2019032 bytes
    Variable Size             102838568 bytes
    ASM Cache                  25165824 bytes
    ASM diskgroups mounted
    SQL> exit
    5. SQL> exit

    6. $ export ORACLE_SID=<your_real_db_sid>
    7. SQL> sqlplus / as sysdba
    8. SQL> startup

    SQL> startup
    ORACLE instance started.

    Total System Global Area 1224736768 bytes
    Fixed Size                  2020384 bytes
    Variable Size             318770144 bytes
    Database Buffers          889192448 bytes
    Redo Buffers               14753792 bytes
    Database mounted.
    Database opened.
    需要重新启动2遍
    8.启动监听器:[oracle@Rm-DevDB ~]$ lsnrctl start

    9,启动em控制器:[oracle@Rm-DevDB ~]$ emctl start dbconsole


    2,配置listener.ora

    正常的监听器为
    [oracle@Rm-DevDB admin]$ lsnrctl status


    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 16-MAY-2010 16:36:20

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Rm-DevDB)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date                16-MAY-2010 14:54:58
    Uptime                    0 days 1 hr. 41 min. 22 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /opt/app/oracle/product/10.2.0.1/db_1/network/admin/listener.ora
    Listener Log File         /opt/app/oracle/product/10.2.0.1/db_1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Rm-DevDB)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
    Services Summary...
    Service "+ASM" has 1 instance(s).
    Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
    Service "+ASM_XPT" has 1 instance(s).
    Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "rmsdata1" has 1 instance(s).
    Instance "rmsdata1", status READY, has 1 handler(s) for this service...
    Service "rmsdata1XDB" has 1 instance(s).
    Instance "rmsdata1", status READY, has 1 handler(s) for this service...
    Service "rmsdata1_XPT" has 1 instance(s).
    Instance "rmsdata1", status READY, has 1 handler(s) for this service...
    The command completed successfully
    -------------------------------------------------------------------------
    listener.ora 这个文件的配置

    监听器的操作命令
    $ORACLE_HOME/bin/lsnrctl start,其他诸如stop,status等。具体敲完一个lsnrctl后看帮助。
    服务器端配置
    [oracle@rs2600-2 admin]$ vi listener.ora

    # listener.ora Network Configuration File: /opt/app/oracle/product/10.2.0/server/network/admin/listener.ora
    # Generated by Oracle configuration tools.

    LSNRASM =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rs2600-2)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    )

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = +ASM)
    (ORACLE_HOME = /opt/app/oracle/product/10.2.0/server)
    (SID_NAME = +ASM)
    )
    (SID_DESC =
    (GLOBAL_DBNAME = danghj)
    (ORACLE_HOME = /opt/app/oracle/product/10.2.0/server)
    (SID_NAME = danghj)
    )
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/app/oracle/product/10.2.0/server)
    (PROGRAM = extproc)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rs2600-2)(PORT = 1521))
    )
    )

    客户端的配置
    ASM_172.22.11.124 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.22.11.124)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = danghj)
    )
    )

    3,tnsnames.ora和tnsnames.ora的作用
    当你输入sqlplus sys/oracle@orcl的时候
    1. 查询sqlnet.ora看看名称的解析方式,发现是TNSNAME
    2. 则查询tnsnames.ora文件,从里边找orcl的记录,并且找到主机名,端口和service_name
    3. 如果listener进程没有问题的话,建立与listener进程的连接。
    4. 根据不同的服务器模式如专用服务器模式或者共享服务器模式,listener采取接下去的动作。默认是专用服务器模式,没有问题的话客户端就连接上了数据 库的server process。
    5. 这时候网络连接已经建立,listener进程的历史使命也就完成了。
  • 相关阅读:
    【剑指offer】和为S的连续整数序列
    【剑指offer】连续子数组最大和
    【剑指offer】从尾到头打印链表
    【Spark】概述
    【剑指offer】题目20 顺时针打印矩阵
    【剑指offer】题目36 数组中的逆序对
    【C语言】二维数组做形参
    【剑指offer】题目38 数字在排序数组中出现的次数
    SAP 锁对象 基本概念与基本操作 SE11
    线程特定数据TSD总结
  • 原文地址:https://www.cnblogs.com/danghuijian/p/4400402.html
Copyright © 2011-2022 走看看