1 / 13

Przemyslaw Radowiecki IT-DB -DBF

Oracle Architecture. Przemyslaw Radowiecki IT-DB -DBF. Outline. Oracle Database Oracle Instance Real Application Clusters (RAC) Network connectivity SQL statements processing. Oracle Database.

haamid
Download Presentation

Przemyslaw Radowiecki IT-DB -DBF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Oracle Architecture Przemyslaw Radowiecki IT-DB-DBF

  2. Outline • Oracle Database • Oracle Instance • Real Application Clusters (RAC) • Network connectivity • SQL statements processing

  3. Oracle Database • Organized collection of data treated as a unit. The purpose of a database is to store and retrieve related information. • Oracle’s implementation of a database consists of • data files • control files • online redo log files • A database has its name (among other properties) • ATLR, CMSONR, LCGR, INT11R, DEVDB11, TEST2, …

  4. Oracle Database Server

  5. Storage’s logical structures • Block • the smallest logical unitof data storage • Extent • continuous set of blocks • Segment • type (table, index, …) • tablespace name • Tablespace • name • maximal size • maps to one or more data files • Practical aspect: • A usercanhave a limited quota on a tablespace • in most CERN databases (all physics) 1 block = 8KB • 1 database block - the smallest piece of data to be exchanged with physical storage Database Tablespace Tablespace Tablespace Tablespace Segment Segment Segment Segment Extent Extent Extent Extent Extent

  6. Instance memory structures

  7. Instance memory structures • Buffer cache • holds copies of data blocks • server processes manipulate data from buffer cache (not directly from datafiles) • managed using LRU algorithm (Least Recently Used) • Shared pool • portion of the SGA that contains shared memory constructs such as shared SQL areas • most recently executed SQL statements • most recently used data definitions • Practical aspect: • no bind variables causes many shared SQL areas creation, which leads to high memory usage and fragmentation • ORA-04031:unable to allocate X bytes of shared memory

  8. Real Application Clusters • High Availability (HA) + Scalability solution • One database, multiple instances • managed by Oracle Clusterware • database services vs. database instance Service A Service B Service C INSTANCE1 INSTANCE2 INSTANCE3 RAC Database

  9. Real Application Clusters • Practical aspects: • rolling interventions • sessions are transparently reconnected to working instance • transactions are broken and need to be rolled back • internal information sometimes bound to instance not visible immediately in GUI tools (EM, SM) • connection specification can cause loosing of HA features, e.g. if instance specified instead of service • RAC aware applications can gain a lot, not RAC aware applications can loose a lot running on RAC

  10. Database connectivity • Oracle Net manages connections between user process and server process • On top of popular network protocols (e.g. TCP, Inter-Process Communication (IPC)) • Oracle Net address • sqlplus usern/password@’( • DESCRIPTION= • (ADDRESS= (PROTOCOL=TCP) (HOST=dbsrvg3305.cern.ch) (PORT=10121) ) • (CONNECT_DATA= • (SID=DEVDB11) • ) • )’

  11. Naming methods • Local naming method • Based on $TNS_ADMIN/tnsnames.ora • lcgr_backup = • (DESCRIPTION = • (ADDRESS = (PROTOCOL = TCP)(HOST = lcgr1-v.cern.ch)(PORT = 10121)) • (ADDRESS = (PROTOCOL = TCP)(HOST = lcgr2-v.cern.ch)(PORT = 10121)) • (ADDRESS = (PROTOCOL = TCP)(HOST = lcgr3-v.cern.ch)(PORT = 10121)) • (ADDRESS = (PROTOCOL = TCP)(HOST = lcgr4-v.cern.ch)(PORT = 10121)) • (ADDRESS = (PROTOCOL = TCP)(HOST = lcgr5-v.cern.ch)(PORT = 10121)) • (CONNECT_DATA = • (SERVER = DEDICATED)(SERVICE_NAME = lcgr_backup.cern.ch) • ) • ) • sqlplus username/password@lcg_backup • At CERN, centrally managed tnsnames.ora stored in: • \\cern.ch\dfs\Applications\Oracle\ADMIN • /afs/cern.ch/project/oracle/admin

  12. SQL statement processing • SQL statement processing phases: • Parse • Execute • Fetch • Parse paths: • Soft parse • Hard parse • Practical aspect: • Bind variables make SQL statements similar enough to use soft parse path • select name from emp where id=:id_val;

  13. Useful links • Oracle Database Concepts • http://docs.oracle.com/cd/E11882_01/server.112/e25789/toc.htm • Oracle 11g documentation • http://www.oracle.com/pls/db112/portal.all_books

More Related