三津石智巳

👦🏻👦🏻👧🏻 Father of 3 | 🗺️ Service Reliability Engineering Manager at Rakuten Travel | 📚 Avid Reader | 👍 Wagashi | 👍 Caffe Latte | 👍 Owarai

【感想】Oracle DBA Mentor: Succeeding as an Oracle Database Administrator

"You will hear people say things like “I cannot connect to the database.” Technically speaking, you can never connect to an Oracle database. The software application is normally running on a different machine, maybe even a web server, accessed by a browser. The application does not have direct access to the files, so it cannot connect to the database. This is where the DBA needs to know their audience. To the end user, Oracle is just a black box and they will use the term “database.” When the DBA talks to end users, they should use the same terminology to facilitate the conversation, even though the DBA knows the term is not factually correct."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

Databaseに接続することはできない。それにしてもコンピテンシーの高い著者さんだな。

"Users and applications connect to an Oracle instance, not the database."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

Instanceに接続することはできる。

"For the Oracle database, there are eight different file types, each of which is detailed here:"

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

8つのファイルタイプがある。

  • Data files
  • Temp files
  • Online redo logs
  • Archive redo logs
  • Undo tablespace files
  • Control files
  • Parameter file
  • Password file

"The Buffer Cache stores copies of blocks from the data files into memory for fast, efficient retrieval."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

Buffer cache。

"Oracle uses a modified “least recently used” algorithm to determine the data to purge from the cache should it be needed for another request."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

LRUアルゴリズム

"The Buffer Cache is so named because each block of space in the cache is called a buffer."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

Cacheの単位がBuffer。

"The dirty buffers are written to the data files only when Oracle performs a checkpoint. The following events will trigger a checkpoint:"

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

Dirty bufferはCheckpointによってのみData filesに書き込まれる。Checkpointは4つのトリガーがある。

"The redo records will be written to the online redo logs, but writing redo records directly to disk would take too much time. Transactions write redo to memory instead, to the Redo Log Buffer."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

Online redo logsに書き込む前のバッファーがRedo Log Buffer。

"When the application requests a connection to the instance, Oracle will create a server process on the database server."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

Instanceに接続すると、Server processが作られる。いわゆる「コネクション」か。

"No application connects directly to the instance. When the application does request a connection, Oracle ensures a server process is available. The application communicates only to the server process. The server process talks to the instance on behalf of the application. You can think of the server process as the middleman. The Listener accepts the incoming connection request and facilitates the connection between the application and the server process. After that, the Listener is no longer involved in whatever occurs between the two. It is a myth that the application always goes through Listener."

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

ApplicationはInstanceに接続することはできない。Server processに接続することはできる。Server processはInstanceとやり取りする。
ListenerはApplicationからの接続要求を受け取ってApplicationとServer processの接続を取り持つ。それ以降は関わらない。

https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/images/467924_1_En_20_Chapter/467924_1_En_20_Fig1_HTML.png

"Rather than rely on my diagrams of the Oracle architecture, you could look in the Database Concepts guide for some nice visualizations. In addition, Oracle Corporation has provided an interactive web page that lets you explore the Oracle architecture. You can find this web page at the following URL:"

via Check out this quote from Oracle DBA Mentor: Succeeding as an Oracle Database Administrator - https://learning.oreilly.com/library/view/oracle-dba-mentor/9781484243213/html/467924_1_En_20_Chapter.xhtml

この本、親切ですな。