小布老师oracle视频讲座笔记(二)

 

Oracle Process Structure

Oracle takes advantage of various types of processes:

 —User process: Started at the time a database user requests connection to the Oracle server

  Server process: Connects to the Oracle instance and is started when a user establishes a session

Background processes: Started when an Oracle instance is started

User Process: A progrm that requests interaction with the Oracle server, Must first establish a connection, Does not interact directly with the Oracle server.

Server Process: A program that directly interacts with the Oracle Server

  Fulfills calls generated and returns results

Can be deficated or shared server

IPC: Inter Process Communication, 包括共享内存、队列、信号量等几种形式。

Background Process

Maintains and enforces relationships between physical and memory structures:

   Mandatory background processes

      DBWn PMON CKPT LGWR SMON

   Optional background processes

ARCn  LMDn  QMNn  CJQ0  LMON  RECO  Dnnn   LMS  Snnn

LCKn  Pnnn

DBWn(Database Writer), DBWn writes when:

   Checkpoint occurs

   Dirty buffers reach threshold

   There are no free buffers

   Timeout occurs

   RAC ping request is made

   Tablespace OFFLINE

   Tablespace READ ONLY

   Table DROP or TRUNCATE

   Tablespace BEGIN BACKUP

Log Witer(LGWN), LGWR writes:

   At commit

   When one-third full

   When there is 1MB of redo

   --Every three seconds

   --Before DBWn writes

System Monitor(SMON)

Responsibilities

   Instance recovery

   Rolls forward changes in noline redo log files

   Opens database for user access

   Rolls back uncommitted transactions

   Coalesces free space

   Deallocates temporary segments

Process Monitor(PMON),Cleans up after failed processes by:

   Rolling back the transaction

   Releasing locks

   Releasing other resources

   Restarting dead dispatchers

Checkpoint(CKPT): Responsible for:

   Signaling DBWn at checkpoints

   Updating datafile headers with checkpoint information

Archiver(ARCn)

   Automactically archives online redo file

Logical Structure

   Dictates how the physical space of a database is used

Hierarchy consisting of tablespaces(可以包括多个数据文件), segments(同), extents(只能在一个数据文件中) and blocks(8K)

DB Administration Tools

1.    Oracle Universal Installer

2.    Database Configuraation Assistant

3.    Database Upgrade Assistant

4.    Oracle Net Manager

5.    Oracle Enterprise Manager

6.    SQL*Plus

7.    Recovery Manager

Oracle Univeral Installer

   Used to install, upgrade, or remove software

   Based on a Java engine

   Features include

      Automatic dependency relolution

      Allows for Web-based installations

      Tracking inventory of component and suite installations

      Deinstallation of installed components

      Support for multiple Oracle homes

      Support for globalization technology

Oracle DBCA

   You use the Oracle Database Configuration Assistant to:

      Create a database

      Configure database options

      Delete a database

      Manage templates

DB Administrator Users

Users SYS and SYSTEM are created automatically

   During database creation

   Granted the DBA role

User SYS

   Owner of the database data dictionary

   Default password : change_on_install

User SYSTEM

Owner of additional internal tables and view used by Oracle tools

Default password: manager

SQL*Plus

   An Oracle tool providing

Capability to interact with and manipulate the database

Ability to start up and shut down the database, create

and run queries, add rows, modify data, and write customized reports

A subset of the standard SQL language with specific add ons

Oracle Enterprise Manager

Initialization Parameter Files

   Entries are specific to the instance being started

   Two types of parameters:

      Explicit: Having an entry in the file

      Implicit: No entry within the file, but assuming the     Oracle default values

Multiple initialization parameter files can exist

Changer to entries in the file take effect based on

the type of initialization parameter file used:

   Static parameter file, PFILR

   Persistent server parameter file, SPFILE

 

PFILE –initSID.ora

   Text file

   Modified with an operating system editor

   Changes take effect on the next start up

   Only opened during instance start up

   Default location is $ORACLE_HOME/dbs

Oracle SID

the SID is a site identifier. It and ORACLE_HOME(where the Oracle software is installed) are hashed together in UNIX to create a unique key name for attaching an SGA.If your ORACLE_HOME is not set correctly, you’ll get the ORACLE NOT AVAILABLE error.

SPFILE  spfileSID.ora

Binary file

Maintained by the Oracle server

Always resides on the server side

Ability to make changes persistent across shutdown and startup

Can self-tune parameter values

Can have Recovery Manager support backing up to the initialization parameter file

Spfile.ora file.ora可以相互转化:

create spfile from pfile;  strings spfile |more(提取二进制中的可读字符串打印出来)

Modify Parameters in SPFILE

Alter system set parameter name =value<comment=’text’><sid=’sid|*’>

<scope=memory|spfile|both><deferred>

find command

show parameter pram name;

SPFILE vs PFILE

1.  An SPFILE can be backed-up with RMAN(RMAN cannot backup PFILES)

2.  Reduce human errors.The SPFILE is maintained by the server. Parameters are checked before changes are accepted.

3.  Eliminate configuration problems (no need to have remote machine)

4.  Easy to find –stored in a central location

SPFILE is better than PFILE!

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值