02 Architecture Overview

本章提要
---------------------------------------------
arthiecture, and some component
connect to oracle
这一章, 概念性的东西多一些
---------------------------------------------
ipcs -a linux 命令, 查看内存区域情况, 进程之间通信communication

1. 连接数据库(无论是本机环境, 还是客户端)
    When you connect, the Oracle software will look for a TNS connect string(a network connection).
    If,the connect string is not supplied, the Oracle software will look at the environment for a
    variable named ORACLE_SID, The ORACLE_SID is the Oracle “site identifier;”it is sort of a key to
    gain access to an instance.
    连接上以后, 你用ps -ef 会看到相对应的oracle进程, 但是这时候一个很有意思的事情是这个进程名是 oracle11g(例如)
    而你根本找不到这样一个程序在系统中, 实际这个程序就是 $ORACLE_HOME/bin/oracle.
2. 连接 instance 时, 至少需要在parameter中设置一个参数, db_name
    echo db_name=oracle11g > initora11g.ora
    startup nomount
3. 一个Instance 在它的生命周期中只能打开1个database
    例如, alter database close; alter database open; -- 这时会返回一个错误
    因为, instance 已经打开了一个database, 而 alter database close 只是关闭了数据库, 并没有关闭Instance
    这时, ps -ef 会看到进程依然存在, 所以这时需要使用 shutdown 将instance关闭, 就可以重新连接database
4. instance 组成
    SGA(share pool, buffercahe, redo and so on) + background process(pmon, smon, dbwr, lgwr, ckpt and so on)
5. 连接 oracle (client connect to server), 这种情况肯定要借助网络tcp/ip, 那么肯定要借助 tnsnames.ora
    dedicated server:
   
    dedicated server: 是用来与 client 来建立连接的.(client process 连接 dedicated server (这也是一个Process))
        现在基本上都是使用 dedicated server. 1对1(客户端一个进程对应server端一个dedicated server进程)
    shared Server: 对所有的client 用一个 pool of shared processes, 并且还需要另外一个进程 dispatcher,
        client-dispatcher, The dispatcher process will put the client’s request into the request queue in the SGA
        finish do something, the shared server will place the response in the invoking dispatcher’s response queue
        shared server 是负责处理请求的, 它本身是一个进程, 可以与内存和磁盘通信.
   
    tns listener: (dedicated server)
   
    tns listener: (shared server)
   
    

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值