Oracle in Processes

 

Oracle in Processes

--Oracle的进程

Figure 1-1 shows the simplest process diagram of Oracle you're likely to see and (probably) the most complicated process diagram of Oracle that you really need to understand.

        --1-1显示了最简单的Oracle进程图形,你也许见过,并且你需要真正了解最复杂的Oracle进程视图.

This, basically, is what the book is about; everything else is just the icing on the cake.

        --这图,基础的,是这本书关于的;所有的事情就像蛋糕上的糖衣(好吃又容易得到),容易理解.

                       

图片

 

 

Figure 1-1. The just enough” diagram of Oracle Database processes

  Figure 1-1 shows two types of files. Data files are where our "real"data is kept, and redo log files (often just called log files) are where we record in a continuous stream a list of all the changes we make to the data files.

--图表1-1显示两种类型的文件.数据文件是我们真是数据存放的地方,重做日志文件(经常只把它称做日志文件)是我们用连续的流方式记录变更列表,这些变更是我们对数据文件的修改.

-----------------------------------开始叙述文件----------------小节分隔线--------------------------------------------------

  The data files are subject to random access

        --数据文件易受到随即访问.

To allow random access to happen efficiently, each file has a unit I/O size, the block size, which may be 2KB, 4KB, 8KB (the commonest default), 16KB, or (on some platforms) 32KB

        --为了随机访问有高效率,每个文件有一个单元I/O尺寸,这个尺寸也许是2k,4k,8k(最通用的缺省值),16k,或者(在一些平台上)32K.

It is possible (and common) to group a number of data files into logical objects called tablespaces, and you can think of the tablespace as the natural "large-scale" unit of the databasea simple data object will be associated with a tablespace rather than a data file.

        --有可能(通常)组织一些数据文件成为逻辑对象,它叫表空间,并且你可以把表空间想象成一个自然的更大尺寸的数据库单元--简单的数据对象和表空间发生关联,而不是一个数据文件.

There are essentially three types of tablespaces, which we will meet later on: undo tablespacestemporary tablespacesand "the rest".

        --从本质上看有三种类型的表空间,我们后面会遇到:撤销表空间,临时表空间和"剩下的"(永久表空间).

-------------------------------------------------------------小节分隔线--------------------------------------------------------------------

  Oracle introduced the concept of the temporary tablespace in Oracle 8, and the undo tablespace in Oracle 9.

        --Oracle8i介绍了临时表空间的概念,在9i介绍了撤销表空间的概念.

Prior to that (and back to version 6where tablespaces were first introducedall tablespaces were the same.

        --在那之前(回到版本6,表空间概念被第一次提出)所有表空间是一样的.

Of the rest there are a couple of tablespaces that are considered special (even though they are treated no differently from all other tablespaces): the system tablespace and the sysaux tablespacewhich should not be used for any end-user data

        --"剩余的"里面,有一对表空间,它们被特殊的考虑(尽管处理它们的方式和其它所有的表空间没有区别):系统表空间和辅助表空间,这两个表空间不是用来给最终客户数据使用的.

The sysaux tablespace appeared in Oracle 10g as a place for Oracle to keep the more dynamic, and potentially voluminous, data generated by its internal management and maintenance packages

        --辅助表空间出现在Oracle10g做为一个位置,Oracle存放更多动态的,更多潜在的数据,这些数据由数据库自己内部管理和维护包产生.

The system tablespace is where Oracle stores the data dictionarythe metadata describing the database.

        --系统表空间是Oracle存储数据字典的地方,数据字典就是描述数据库的元数据.

-------------------------------------------------------------小节分隔线--------------------------------------------------------------------

  The log files are subject to sequential I/O, although they do have a minimum unit size, typically 512 bytes, for writes. Some log files, called online redo log files, are in fairly constant use. 

        --日志文件是属于连续的I/O,尽管它们有很小的单元尺寸,通常是512字节,用来写入.一些日志文件,叫在线日志文件,在相当恒定的使用.

The rest, called archived redo log files, are simply copies of the online redo log files that are made as each file becomes full

        --剩下的,叫归档重做日志文件,仅仅是在线日志文件的拷贝,做为每个文件变的完整.

-------------------------------------------------------------小节分隔线--------------------------------------------------------------------

  Note There are other types of files, of course, but we are going to ignore most of them. Chapter 6 does make some comments about the control file.

       --注解:还有其它类型的文件,当然,但是我们准备忽略它们中的大部分.第六章将对控制文件做一些注释

------------------------------开始叙述内存---------------小节分隔线------------------------------------------------------------------

  When the software is running under UNIX (or virtually any other operating system), a number of copies of the same oracle process are running in memory, and these copies share a large segment of memory

        --当软件在UNIX下运行时(或几乎任何其它操作系统),一定数量的相同Oracle进程副本在内存运行,这些副本进程共享一个大的内存段.

In a Windows environment, there is a single process called oracle with a number of independent threads

        --Win环境,有个叫Oracle的单进程,内部有各自独立的线程.

In this case it's a little easier to think of the threads sharing a large segment of memory

        --在这种情况下,它可以被更容易理解成,线程们共享大的内存段.

Technically, we refer to the data files as being the database and the combination of memory and running program(s) as an instance.

        --从技术角度,我们认为数据文件叫做数据库,内存和正在运行的程序的集合叫做实例.

In Real Application Clusters (RAC) we can configure several machines so that each manages a separate instance but all the instances share the same database.

        --在真实应用集群(RAC)我们能配置一些机器让每个机器管理一个独立的实例,但所有实例共享同一个数据库.

-------------------------------------------------------------小节分隔线--------------------------------------------------------------------

  The shared memory segment (technically the System Global Area, but sometimes called the Shared Global Area, and nearly always just the SGA) holds many pieces of information

        --共享内存段(技术上叫系统全局区域,但有时也叫共享全局区域,或者就是叫SGA)持有许多信息资料.

but the most significant components are the data cache, a window onto the data files holding copies of some of the data blocks,

        --但其中最有意义的组件是:数据缓存,一个数据文件的窗口,这个窗口装载一些数据块的拷贝.

the log buffer,a fairly small amount of memory used in a circular fashion to hold information that will soon be written to the log files

        --日志缓存,相当小数量的内存用来循环使用装载信息,这些信息将会被写入日志文件.

and the library cache, most significantly holding information about the SQL statements and PL/SQL blocks that have been executed in the recent past.

        --和库缓存,大部分最有意义的包含信息是关于SQL语句和PL/SQL语句块,这些语句是最近已被执行的.

Technically the library cache is part of the shared pool, but that term is a little flexible and sometimes is used to refer to any memory in the SGA that is currently unused.

        --从技术上说,库缓存是共享池的一部分,但是共享池这个专业术语有些灵活,有时是被用来表示当前任何在SGA中没有使用到的内存.

-------------------------------------------------------------小节分隔线--------------------------------------------------------------------

  Note There are a few other major memory components, namely the streams pool, the java pool, and the large pool, but really these are just areas of memory that have been isolated from the shared pool to handle particular types of specialized work. If you can cope with the shared pool, there's nothing particularly significant to learn about the other pools

--注解:有一些其它的主要内存组件,叫流池,JAVA池和大池,但是真正来说这些仅是内存中从共享池隔离出来的一块区域,用来处理特定类型的专业工作.如果你能处理共享池,没有什么特别有意的事来了解其它缓冲池.

---------------------------------开始叙述SCN-------------小节分隔线----------------------------------------------------------------

  There is one memory location in the SGA that is particularly worth mentioning: the “clock” that the instance uses to coordinate its activity. 

        --在SGA中有一个内存位置特别值得讨论:"时钟",是实例用来协调它的活动的.

This is a simple counter called the System Change Number (SCN) or, not quite correctly, the System Commit Number

        --这是一个简单的计数器叫系统变更号,或者不是十分正确,系统提交号.

Every process that can access the SGA can read and modify the SCN.

        --每个可以访问SGA的进程可以读和修改SCN.

Typically, processes read the current value of the location at the start of each query or transaction (through a routine named kcmgss—Get Snapshot SCN),

        --典型的,进程读当前值(SCN)在每个查询或事务的开始位置(通过一个叫kcmgss的程序,取得SCN的快照),

and every time a process commits a transaction, it will increment the SCN (through a routine named kcmgasGet and Advance SCN).

        --并且每次一个进程提交一个事务时,它跟增加SCN(通过一个叫kcmgas的程序-取得和上涨SCN).

The SCN will be incremented on other occasions, which is why System Change Number is a more appropriate name than System Commit Number.

        --在其它场合SCN也会被增加,这就是为什么系统变更号的叫法比系统提交号的更贴切.

----------------------------------开始叙述进程----------小节分隔线------------------------------------------------------------------- 

  There are then just three processes (or types of processand one important fact that you really need to know about. The important fact is this: end-user programs don’t touch the data files and don’t even get to touch the shared memory

--那么就三个进程(或者说三种类型进程),并且还有一个重要的事实是你的确需要知道的.这个事实是最终用户程序不接触数据文件,甚至接触不到共享内存.

-------------------------------------------------------------小节分隔线--------------------------------------------------------------------

  There is a special process that copies information from the log buffer to the log files.

        --有个特别的进程,它复制信息从日志缓存到日志文件.

This is the log writer (known as lgwr), and there is only ever one log writer in an instance

        --这就是日志书写器(叫做lgwr),在一个实例里面永远只有一个日志书写器.

There is a special process that copies information from the data cache to the data files.

        --有个特别的进程,它复制信息从数据缓存到数据文件.

This is the database writer (known as dbwr), and in many cases there will be only one such process, but for very large, busy systems, it is possible (and occasionally necessaryto configure multiple database writers, in which case they will be named dbwN (where the range of possible values for N varies with the version of Oracle).

        --这就是数据库书写器(叫做dbwr),在一些情况下将会只有一个这样的进程.但对于大型繁忙系统,它有可能(或者必须)配置多个数据库书写器在这种情况下它们被叫做dbwN(不同的Oracle版本这个N的取值范围会有变化).

-------------------------------------------------------------小节分隔线--------------------------------------------------------------------

  Finally, there will be many copies of server processes associated with the instance

        --最后,有许多服务进程的副本和实例发生关联.

These are the processes that manipulate the SGA and read the data files on behalf of the end users.

        --这些进程操作SGA,替最终用户读取数据文件.

End-user programs talk through the pipeline of SQL*Net to pass instructions to and receive results from the server processes

        --最终用户程序通过SQL*Net管道和服务进程通讯来提交指令和接收结果.

The DBA (that's you!) can choose to configure the system for two different types of server processes, dedicated server processes and shared (formerly multithreaded) server processes;

        --DBA(就是你)可以选择配置系统用两种不同类型的服务进程,专用服务进程和共享(以前多线程)服务进程;

most systems use only dedicated servers, but some systems will do most of their lightweight work through shared servers, leaving the more labor-intensive tasks to dedicated servers.

        --大多数系统只使用专用服务进程,但一些系统会把大部分轻量级工作给共享服务进程,留下更多的劳动密集型任务给专用服务进程.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值