Oracle数据库体系结构——database

本文详细介绍了Oracle数据库的体系结构,主要包括data file数据文件、control file控制文件和redo log file日志文件。数据文件是数据库在操作系统上的物理表现,控制文件记录数据库状态并维护一致性,而日志文件用于数据恢复,确保数据安全性。文章还讨论了如何管理和维护这些关键组件,包括添加、删除和迁移日志文件。
摘要由CSDN通过智能技术生成

Oracle数据库是什么?
Oracle DataBase是⼀款关系型数据库管理系统,同类的产品还有MySQL, SQLServer等。
我们会把那个承载我们核心数据的系统笼统地成为数据库服务器。
严格意义上来讲Oracle DataBase是由两个部分组成
instance+database=数据库服务
Oracle instance:⼀组后台进程和内存结构 ,后台进程就是ps -ef || grep ora_查询出来的那些
Oracle database:存放在操作系统上的物理文件,比如datafile,logfile…
在这里插入图片描述

——database数据库

1.data file数据文件

在操作系统层可以看到
【select * from v$datafile;】

2.control file控制文件
  • 在数据库使用过程中,Oracle数据库会不断更新控制文件,每个控制文件只与⼀个oracle数据库相关联。
  • 功能和特点:
    1)记录数据库当前物理状态 ,记录了数据文件datafile和日志文件logfile的所有信息。
    2)维护数据库的一致性(SCN#)
    3)是一个二进制小文件
    4)在mount阶段被读取
    5)记录RMAN备份的元数据
    控制文件信息只能通过oracle数据库修改;没有数据库管理员或用户可以编辑控制文件。
  • 查看控制文件信息:
    【select * from v$controlfile;】
    【show parameter control_files】
    冗余:有两个一样的控制文件
  • controlfile不能在操作系统层看到,必须手动生成控制文件到操作系统层面:
    【alter database backup controlfile to trace as ‘/u01/ctl01.bak’;】
  • 控制文件更新机制
    当增加、重命名、删除一个数据文件或者一个联机日志文件时,Oracle 服务器进程(Server Process)会立即更新控制文件以反映数据库结构的变化。
    日志写进程 LGWR 负责把当前日志序列号记录到控制文件中。
    检查点进程 CKPT 负责把校验点的信息记录到控制文件中。
    归档进程 ARCN 负责把归档日志的信息记录到控制文件中。
    通过视图 【v$controlfile_record_section】 可以了解到控制文件中记录了大量的数据库当前状态信息
  • 控制文件多元化(多路复用)
    两个控制文件副本(最好三个)
    每个磁盘上一个副本
    至少在单独的磁盘控制器上有一个副本
  • 手动添加控制文件:
    1)先备份参数文件
    【spfile SQL> create pfile from spfile;】
    2)查看当前控制文件信息
    【SQL> show parameter control_files; 】
    3)修改控制文件,并在参数中增加一个新的控制文件
    【 SQL> alter system set control_files=’/u01/app/oracle/oradata/orcl/control01.ctl’,

    ‘/u01/app/oracle/oradata/orcl/control04.ctl’ scope=spfile;】
    4)复制控
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The inspiration for the material contained in this book comes from my experiences developing Oracle software, and from working with fellow Oracle developers to help them build reliable and robust applications based on the Oracle database. The book is basically a reflection of what I do every day and of the issues I see people encountering each and every day. I covered what I felt was most relevant, namely the Oracle database and its architecture. I could have written a similarly titled book explaining how to develop an application using a specific language and architecture—for example, one using JavaServer Pages that speaks to Enterprise JavaBeans, which in turn uses JDBC to communicate with Oracle. However, at the end of the day, you really do need to understand the topics covered in this book in order to build such an application successfully. This book deals with what I believe needs to be universally known to develop successfully with Oracle, whether you are a Visual Basic programmer using ODBC, a Java programmer using EJBs and JDBC, or a Perl programmer using DBI Perl. This book does not promote any specific application architecture; it does not compare three tier to client/server. Rather, it covers what the database can do and what you must understand about the way it works. Since the database is at the heart of any application architecture, the book should have a broad audience. As the title suggests, Expert Oracle Database Architecture concentrates on the database architecture and how the database itself works. I cover the Oracle database architecture in depth: the files, memory structures, and processes that comprise an Oracle database and instance. I then move on to discuss important database topics such as locking, concurrency controls, how transactions work, and redo and undo, and why it is important for you to know about these things. Lastly, I examine the physical structures in the database such as tables, indexes, and datatypes, covering techniques for making optimal use of them.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值